×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Re:Bug in handling the :MS# command in LX200 Basic

  • Posts: 151
  • Thank you received: 27
hello!
after working on my telescope controller TSC for a while, I finally came back to solving an issue that bugged me for a while. I had/have the following problem.
  • when connecting to the controller via LX200 Basic, all works fine
  • when issuing a Slew command, the command is carried out but the position display in kstars is wrecked

after playing around in my code, I think i found the reason; "Slew" issues three commands, the desired position Sr and Sd, and a "Slew possible" command, :MS#.
Sr and Sd await a response, 1 if the coordinate is reasonable or 0 otherwise. I respond with "1" to each of these commands. Now here is the strange thing. INDI should
  • send Sr ... and wait for the answer
  • send Sd ... and wait for the answer
  • send MS and wait for the answer

well, it does not; it sends Sd and MS as one command and apparently, does not expect two replies. as a result, the declination string and the RA string are read in the wrong order, and declination and RA are exchanged - which leads to a totally chaotic display, of course.

if i do not reply to :MS# as required in the LX200 protocol, everything is fine ...
yours
wolfi
4 years 7 months ago #41910

Please Log in or Create an account to join the conversation.

  • Posts: 1029
  • Thank you received: 301
Nice find. At some point later there must be a flush of the input stream, which "fixes" the garbage remaining in the queue. Do you plan to issue a PR for the generic LX200 protocol handling? Or to override this specific part in your own code?

-Eric
4 years 7 months ago #41947

Please Log in or Create an account to join the conversation.

  • Posts: 151
  • Thank you received: 27
hi!
erm ... i am not familiar with the abbreviation “PR”. There is a workaround since most programs i have tried do not give a ... about the :MS# response, so if it is omitted, at least sky safari, cdc and kstars work fine. but it should be fixed as it is really in the LX200 protocol ...
yours wolfi
4 years 7 months ago #41956

Please Log in or Create an account to join the conversation.

  • Posts: 1957
  • Thank you received: 420
4 years 7 months ago #41957

Please Log in or Create an account to join the conversation.

  • Posts: 151
  • Thank you received: 27
Hi!
So I shall locate the error and take are of this, and then issue a pull request? or shall i issue a bug report via github.com/indilib/indi/issues?utf8=✓&q=LX200 ?
yours wolfi
Last edit: 4 years 7 months ago by Wolfgang Birkfellner.
4 years 7 months ago #42136

Please Log in or Create an account to join the conversation.

  • Posts: 1029
  • Thank you received: 301
You can do both: first you explain the problem in an issue, then you create a fix and push a pull request, then people with LX200 mounts discuss or test the change, then when both dust and arguments settle, the issue can be closed.

-Eric
4 years 7 months ago #42140

Please Log in or Create an account to join the conversation.

Time to create page: 0.637 seconds