×

INDI Library v1.9.6 Released (21 May 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Driver OnStep (LX200 like) for INDI

  • Posts: 320
  • Thank you received: 41
Tryed ':r+#','r-#','rP#','rR#','rI#','rM#','rb#','rF#'

0.008 :GVP# On-Step#
120.006 :r+#
0.205 r-# 0
0.205 rP# 0
0.206 rR# 0
0.205 rI# 0
0.207 rM# 0
0.205 rb# 0
0.204 rF# 0
0.006 :FA# 0
0.005 :fA# 0


Also after reading your discussion with Howard I understand:
OnStep and OnStepX behave differently (which we already did know but it is worse that I suspected
Timeouts in SWS will not be changed soon
Rotator is not yet mature and we should only use :GX98# expectin R#, D#, N#

and if I understand well SWS changes the behavior of OnStep so that rA# FA# return not the same as with USB
7 months 2 weeks ago #77650

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

  • Posts: 320
  • Thank you received: 41
@Khalid,

Go the SWS Working, not exactly true :-)

I can connect my PC to SMW but my phone ( and I tried with three other Android) still does not want to connect.
I don't know if I am alone in this case but since I never use it ...
7 months 2 weeks ago #77652

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

  • Posts: 320
  • Thank you received: 41
Differences USB / SWS
It is clear that SWS does something different than OnStep over USB.
thr first ":r" command hangs for 120s

Why I don't know but this is for sure one point to investigate.

USB ==========
0.016 :GVP# On-Step#
0.016 :r+# 0
0.016 r-# 0
0.016 rP# 0
0.016 rR# 0
0.016 rI# 0
0.016 rM# 0
0.016 rb# 0
0.016 rF# 0
0.016 :FA# 0

0.016 :GVP# On-Step#
0.016 :r-# 0
0.016 :r+# 0
0.016 rP# 0



SWS =============
0.007 :GVP# On-Step#
120.008 :r+#
0.205 r-# 0
0.206 rP# 0
0.206 rR# 0
0.205 rI# 0
0.205 rM# 0
0.205 rb# 0
0.204 rF# 0

0.007 :GVP# On-Step#
120.006 :r-#
0.205 r+# 0
0.206 rP# 0
7 months 2 weeks ago #77653

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

  • Posts: 320
  • Thank you received: 41
Most probably will not survive today :-)

Now I cannot connect anymore to the SWS ....
I tried to enable access point mode to join my router to make further tests and nothing.
ESSID appears and disappears ...
==> Re flash and pray!, kill a chicken, sacrifice a lam ... ready for the containment jacket :-)
7 months 2 weeks ago #77654

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

  • Posts: 300
  • Thank you received: 24
James,

I think we have a solution that will probably make everything work as it did before SWS.

Basically rotator detection has to be with:
:GX98#
And waiting for at least 250 ms for a reply.

And if it returns N# there is no rotator and no more polling for it should be done.

Let me know when you have a fix, and I will test it.
7 months 2 weeks ago #77655

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

  • Posts: 320
  • Thank you received: 41
Khalid,

I tested the modification, it seems to work.
See attached file

I will do some tests but so far no timeouts

Except the :GX03# that reports 1 s ?????
Last edit: 7 months 2 weeks ago by Alain Zwingelstein.
7 months 2 weeks ago #77656
Attachments:

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

  • Posts: 300
  • Thank you received: 24
Success!
No more timeouts ...

Some comments before we get this in Jasem's PPA ...

I noticed that this line is no longer there. Is that intentional?
- FI::updateProperties();
For curiosity's sake, I added it back, recompiled, and tested. Works well.

There are also these warnings:
Don't know if we care or not.

drivers/telescope/lx200_OnStep.cpp:549:23: warning: comparison with string literal results in unspecified behavior [-Waddress]
if (response=="R" | response=="D")
^~~
drivers/telescope/lx200_OnStep.cpp:549:39: warning: comparison with string literal results in unspecified behavior [-Waddress]
if (response=="R" | response=="D")
^~~
drivers/telescope/lx200_OnStep.cpp:549:21: warning: suggest parentheses around comparison in operand of ‘|’ [-Wparentheses]
if (response=="R" | response=="D")

Finally, can you please remove this commented out line, for clarity?
+ //if (!sendOnStepCommand(":rG#")) // do we have a Rotator 1
7 months 2 weeks ago #77657

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

  • Posts: 320
  • Thank you received: 41
FI::updateProperties(); still there on line 539 ????
Which line are you missing?

Of course it needs cleanup before issuing a pull request
7 months 2 weeks ago #77658

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

  • Posts: 300
  • Thank you received: 24
This is a diff from your source file against what is now in Jasem's repo.
-    setVersion(1, 12);   // don't forget to update libindi/drivers.xml
+    setVersion(1, 13);   // don't forget to update libindi/drivers.xml
 
     setLX200Capability(LX200_HAS_TRACKING_FREQ | LX200_HAS_SITES | LX200_HAS_ALIGNMENT_TYPE | LX200_HAS_PULSE_GUIDING |
                        LX200_HAS_PRECISE_TRACKING_FREQ);
@@ -543,7 +543,10 @@ bool LX200_OnStep::updateProperties()
         LOGF_DEBUG("OSFocuser1: %d, OSFocuser2: %d, OSNumFocusers: %i", OSFocuser1, OSFocuser2, OSNumFocusers);
 
         //Rotation Information
-        if (!sendOnStepCommand(":rG#"))  // do we have a Rotator 1
+        //if (!sendOnStepCommand(":rG#"))  // do we have a Rotator 1
+        char response[20];
+        getCommandString(PortFD, response, ":GX98#");
+        if (response=="R" | response=="D")
         {
             LOG_INFO("Rotator found.");
             OSRotator1 = true;
@@ -703,7 +706,6 @@ bool LX200_OnStep::updateProperties()
         deleteProperty(OSSetPressureNP.name);
         deleteProperty(OSSetHumidityNP.name);
         deleteProperty(OSSetAltitudeNP.name);
-        FI::updateProperties();
         RI::updateProperties();
     }
     LOG_INFO("Initialization Complete");
@@ -2868,7 +2870,9 @@ bool LX200_OnStep::ReadScopeStatus()
     }
 
     //TODO: Improve Rotator support
+    if (OSRotator1){
     OSUpdateRotator();
+    }
 
     //Weather update
     getCommandString(PortFD, TempValue, ":GX9A#");
 

It was removed by Jame's recent PR, and it is already in Jasem's.

See this

github.com/indilib/indi/pull/1569/files

And INDI works for me over WiFi with SWS with and without that line there.

So we are good here.
 
7 months 2 weeks ago #77659

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

  • Posts: 320
  • Thank you received: 41
@Khalid, @James
the warnings are compiler flags dependent but anyhow I changed the way to compare to be consistent within the code.

I was not aware about the last commit so re-included the FI::updatyeProperties

but to submit a pull request we need to update also the header file and drivers.xml

so last attachment.

I leave up to James to do the pull request if he don"t mind
7 months 2 weeks ago #77660
Attachments:

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

  • Posts: 300
  • Thank you received: 24
Tested it again, and it works great!

How about changing the response checking to be:

if (response[0] == 'R' || response[0] == 'D')

That is faster than strstr, and less error prone.
7 months 2 weeks ago #77661

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

  • Posts: 320
  • Thank you received: 41
Just for info,


did somebody already use usbip?
here is how I dis test a set-up and found it working well.
I did not test from a Windows PC but it should work too.
 
7 months 2 weeks ago #77662
Attachments:

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

Time to create page: 0.441 seconds