×

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

Bi-monthly release with minor bug fixes and improvements

IOptron Driver NOT WORKING with 8401 Hand Controller

  • Posts: 155
  • Thank you received: 10
I fully agree, we must relax the timing or allow for the driver to ignore it.
6 years 9 months ago #17461

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

I wrote a new driver for Gotonova since the differences were too great to modify existing ZEQ25. You will see "Gotonova" driver in tomorrow's PPA update. Please test that one.
The following user(s) said Thank You: Khalid
6 years 9 months ago #17462

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

  • Posts: 322
  • Thank you received: 31
You are awesome!

Late yesterday, I started to understand how the code was structured, and was thinking of the exact same thing, but you beat me to it.

I compiled from source, using a git clone. Good news and bad news.

Good news is that the park command now works, and returns the scope to the NCP position. So that is an improvement.

However, the same timeout problem persists. Second slew is short and :SE?# are followed by a timeout.

So I went to cutecom, and tested the same sequence of commands: set RA/DEC, issue :MS#, followed by :SE?# to check the status. The strange thing is that it works fine in cutecome. Returns 1 when the mount is slewing, and returns 0 once the mount has beeped and slew is done.

I don't know how INDI's code is different from cutecom. I thought that it is timing, and added
usleep(2000000);

At the top of the isSlewComplete() function. But that made no difference.

Then I found the bug, we were copying a short number of characters. Once I fixed this, the scope works fine. It slews and slews to object after object without issues.

Here is the patch:
diff --git a/libindi/drivers/telescope/lx200gotonova.cpp b/libindi/drivers/telescope/lx200gotonova.cpp
index dc0aefa..657309e 100644
--- a/libindi/drivers/telescope/lx200gotonova.cpp
+++ b/libindi/drivers/telescope/lx200gotonova.cpp
@@ -201,11 +201,11 @@ bool LX200GotoNova::isSlewComplete()
     int nbytes_read    = 0;
     int nbytes_written = 0;
 
-    strncpy(cmd, ":SE?#", 16);
+    strncpy(cmd, ":SE?#", 6);
 
     DEBUGF(INDI::Logger::DBG_DEBUG, "CMD (%s)", cmd);
 
-    if ((errcode = tty_write(PortFD, cmd, 4, &nbytes_written)) != TTY_OK)
+    if ((errcode = tty_write(PortFD, cmd, 6, &nbytes_written)) != TTY_OK)
     {   
         tty_error_msg(errcode, errmsg, MAXRBUF);
         DEBUGF(INDI::Logger::DBG_ERROR, "%s", errmsg);

One final though on the naming. The GotoNova name is used for the hand controller, as well as the upgrade kit. The 8401 is the hand controller, and it can in theory be used for other Alt Az mounts, and 8400 is the upgrade kit's part number (the very first thing that iOptron made). So you should name the alias as "GotoNova 8400 Kit", or "GotoNova Kit" to avoid cases where people would use this driver for non-equatorial mounts and complaining.

Also, for the other thread that is now closed to comments, if you can edit your comment there, and add that the ultimate solution is the new driver called "Gotonova something", so that people don't try the ZEQ25 driver and getting stuck. This way, anyone coming from Google (like I did) will get fresh and accurate info.

And, where do I send the million dollar cheque? ;-)
Last edit: 6 years 9 months ago by Khalid.
6 years 9 months ago #17476

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

  • Posts: 322
  • Thank you received: 31
Jasem,

Can you please commit my patch for GotoNova? I verified that it fixes the stalled slew issue.
6 years 8 months ago #17585

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

Khaled,

I pushed a new driver for Gotonova, you didn't get it thus far?
6 years 8 months ago #17587

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

  • Posts: 322
  • Thank you received: 31
I did get it and it works except for one bug, which I provided a fix for here . With this patch, the mount works well. Can you please include that patch in the source tree?
6 years 8 months ago #17589

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

Please try a git pull now. Thanks!
6 years 8 months ago #17590

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

  • Posts: 155
  • Thank you received: 10
Hello Jasem,

While I can confirm slewing movement by the mount, the Ekos Mount Control and INDI control of mount speed or manual movement in any given direction is still NOT working. I am just guessing this is an error in the command or sequence timing.

Dan
Last edit: 6 years 8 months ago by Dan Holler.
6 years 8 months ago #17606
Attachments:

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

  • Posts: 322
  • Thank you received: 31
Yesterday, I had the scope out, I was using the context menu from Kstars, and that worked.

But, I confirm what Dan found: that the arrow keys from Ekos "Mount Control" do not work.

And perhaps directly related, when doing a 'Capture and Solve' from Ekos Align, it keeps trying iteration after iteration because 'accuracy not met', with no improvement in the accuracy.

Looking through the code, and in page 42 of the 8401 hand controller manual, perhaps the following patch would fix the problem. I can't test it until late at night.
diff --git a/libindi/drivers/telescope/lx200gotonova.cpp b/libindi/drivers/telescope/lx200gotonova.cpp
index 29fda90..eecf7d8 100644
--- a/libindi/drivers/telescope/lx200gotonova.cpp
+++ b/libindi/drivers/telescope/lx200gotonova.cpp
@@ -593,20 +593,20 @@ int LX200GotoNova::moveGotoNovaTo(int direction)
     switch (direction)
     {
     case LX200_NORTH:
-        DEBUGF(DBG_SCOPE, "CMD <%s>", ":mn#");
-        tty_write_string(PortFD, ":mn#", &nbytes_write);
+        DEBUGF(DBG_SCOPE, "CMD <%s>", ":Mn#");
+        tty_write_string(PortFD, ":Mn#", &nbytes_write);
         break;
     case LX200_WEST:
-        DEBUGF(DBG_SCOPE, "CMD <%s>", ":mw#");
-        tty_write_string(PortFD, ":mw#", &nbytes_write);
+        DEBUGF(DBG_SCOPE, "CMD <%s>", ":Mw#");
+        tty_write_string(PortFD, ":Mw#", &nbytes_write);
         break;
     case LX200_EAST:
-        DEBUGF(DBG_SCOPE, "CMD <%s>", ":me#");
-        tty_write_string(PortFD, ":me#", &nbytes_write);
+        DEBUGF(DBG_SCOPE, "CMD <%s>", ":Me#");
+        tty_write_string(PortFD, ":Me#", &nbytes_write);
         break;
     case LX200_SOUTH:
-        DEBUGF(DBG_SCOPE, "CMD <%s>", ":ms#");
-        tty_write_string(PortFD, ":ms#", &nbytes_write);
+        DEBUGF(DBG_SCOPE, "CMD <%s>", ":Ms#");
+        tty_write_string(PortFD, ":Ms#", &nbytes_write);
         break;
     default:
         break;
@@ -622,7 +622,7 @@ int LX200GotoNova::haltGotoNovaMovement()
     int error_type;
     int nbytes_write = 0;
 
-    if ((error_type = tty_write_string(PortFD, ":q#", &nbytes_write)) != TTY_OK)
+    if ((error_type = tty_write_string(PortFD, ":Q#", &nbytes_write)) != TTY_OK)
         return error_type;
 
     tcflush(PortFD, TCIFLUSH);
Last edit: 6 years 8 months ago by Khalid. Reason: Corrected command for halting movement
6 years 8 months ago #17612

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

yeah I just saw that, I actually removed those functions completely since they are identical to LX200Generic. Please git pull and try again. Regarding accuracy, there is :CM vs :CMR just like LX200-Astrophysics driver. I guess that needs to be implemented as well.

EDIT: Ok, added support for :CMR now
Last edit: 6 years 8 months ago by Jasem Mutlaq.
6 years 8 months ago #17613

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

  • Posts: 322
  • Thank you received: 31
Regarding: "... there is :CM vs :CMR just like LX200-Astrophysics driver. I guess that needs to be implemented as well".

So, the code from lx200ap can be just lifted into the GotoNova driver? What about the user interface part how would :CM and :CMR be used?
6 years 8 months ago #17615

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

It's already implemented in Gotonova now, it's set to :CM by default and you can switch it to :CMR in INDI Control Panel.
The following user(s) said Thank You: Khalid
6 years 8 months ago #17618

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

Time to create page: 0.346 seconds