×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

[SOLVED] Problems with IEQ45pro libindi v1+ for my ZEQ25

  • Posts: 173
  • Thank you received: 19
Yes knro,
I was testing the ZEQ25 driver on the pi and was getting the dreaded latitude error there. I assumed that was because you hadn't implemented the code from yesterday since you didn't seem too happy with that solution. I was trying to get my version running on there to test my equipment. That's the reason for trying to compile....

I am not sure if you saw my earlier post about receiving the object is below horizon messages even though I know the object is not below the horizon.

--Jon
Last edit: 8 years 5 months ago by Jon.
8 years 5 months ago #5931

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

Yes I didn't implement the delay, why would it only fail on the latitude? There must be something else going on.
8 years 5 months ago #5943

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

  • Posts: 173
  • Thank you received: 19
Just to be clear, it's not always latitude. Sometimes it's longitude but it's never both. I just discovered that today.

--Jon
8 years 5 months ago #5944

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

  • Posts: 173
  • Thank you received: 19
I also noticed this today in the command language spec for the zeq25

"The longitude can only be entered in the range of -180 to 180, east is positive" Could this be part of the problem?


Never mind....this was stupid....................I got hung up on the 283* longitude stuff again. :silly:
--Jon
Last edit: 8 years 5 months ago by Jon.
8 years 5 months ago #5945

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

  • Posts: 173
  • Thank you received: 19
I believe I have found the problem and corrected it in the code below. The error_type was being referenced before it was set....
<code>int setStandardProcedure(int fd, const char * data)
{
char bool_return[2];
int error_type;
int nbytes_write=0, nbytes_read=0;

DEBUGFDEVICE(lx200Name, DBG_SCOPE, "CMD <%s>", data);

error_type = tty_read(fd, bool_return, 1, LX200_TIMEOUT, &nbytes_read);

if ( (error_type = tty_write_string(fd, data, &nbytes_write)) != TTY_OK)
return error_type;

tcflush(fd, TCIFLUSH);

if (nbytes_read < 1)
return error_type;

if (bool_return[0] == '0')
{
DEBUGFDEVICE(lx200Name, DBG_SCOPE, "CMD <%s> failed.", data);
return -1;
}

DEBUGFDEVICE(lx200Name, DBG_SCOPE, "CMD <%s> successful.", data);

return 0;

}</code>


While this code resolves the connection error, it will not allow the mount to slew to the selected object if the usleep commands are removed .
--Jon
Last edit: 8 years 5 months ago by Jon.
8 years 5 months ago #5946

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

  • Posts: 173
  • Thank you received: 19
While my earlier code edit works, after connection, the scope will not go to any objects when selected in kStars as it says they are below the horizon. I had these messages in the version that used the usleep code but the scope would still slew/track to those locations.
I find it interesting that the lat/lon coordinates will set properly without using the usleep commands if you move the error_type as I tried but don't allow the mount to slew. I believe there is something going on in the stream that is above my pay grade.
For now, I am just going to use the usleep commands as that does allow the mount to work. It slews and tracks fine. I receive an occasional ra/dec error but not too often. As for the "object below horizon" messages from kStars, well they are obviously bogus but I have no idea why. I will continue to try new ideas but for now, my "idea well" is dry...... :unsure:

--Jon
Last edit: 8 years 5 months ago by Jon.
8 years 5 months ago #5950

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

That code doesn't work, you're reading the reply before you send the command? Is anyone else experiencing this problem (latitude/longitude setting?) If you enable full debug logging, does it timeout after issuing the command?
8 years 5 months ago #5954

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

  • Posts: 47
  • Thank you received: 6
Tomorrow I will test the latest svn code on my mount and let you know.
Thank you.
8 years 5 months ago #5956

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

  • Posts: 173
  • Thank you received: 19
I have attached two logs from runs with and without the usleep commands in the setStandardProcedure function. Below is the most minimal version of the function that will work for me. Sorry to be a pest with this but it's really bugging me.
*************************************************************************************
int setStandardProcedure(int fd, const char * data)
{
 char bool_return[2];
 int error_type;
 int nbytes_write=0, nbytes_read=0;
 
 DEBUGFDEVICE(lx200Name, DBG_SCOPE, "CMD <%s>", data);
 
 if ( (error_type = tty_write_string(fd, data, &nbytes_write)) != TTY_OK)
    	return error_type;
 
error_type = tty_read(fd, bool_return, 1, LX200_TIMEOUT, &nbytes_read);
 
usleep(10000);
 tcflush(fd, TCIFLUSH);
usleep(10000);
 
 if (nbytes_read < 1)
   return error_type;
 
 if (bool_return[0] == '0')
 {
     DEBUGFDEVICE(lx200Name, DBG_SCOPE, "CMD <%s> failed.", data);
     return -1;
 }
 
 DEBUGFDEVICE(lx200Name, DBG_SCOPE, "CMD <%s> successful.", data);
 
 return 0;
 
}
*******************************************************************************************************

File Attachment:

File Name: lx200zeq25...leep.zip
File Size:2 KB


--Jon
Last edit: 8 years 5 months ago by Jon.
8 years 5 months ago #5965
Attachments:

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

I added a custom setStandardProcedure for ZEQ25 as above, I think you can run svn up and test. The reason you see set longitude/latitude twice is because the first time it is loaded from the configuration file, and then KStars also send location updates automatically on start up. You can enable/disable that in KStars INDI options. It shouldn't matter though.
The following user(s) said Thank You: Piero, Jon
8 years 5 months ago #5967

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

  • Posts: 173
  • Thank you received: 19
Thanks knro.....
Another thing I am wondering, I am getting 'object below horizon' messages no matter where I slew. The scope slews fine, i just keep getting the following message:

2015-11-22T15:31:18: CMD <:GR#>
2015-11-22T15:31:17: Object below horizon.
2015-11-22T15:31:17: Error Slewing to JNow RA 14:50:34 - DEC 74:05:27
2015-11-22T15:31:17: RES <1>
2015-11-22T15:31:17: CMD <:MS#>
2015-11-22T15:31:17: <Slew>

Since the RES is 1, doesn't that mean that 1 is being returned from Slew(PortFD)? Would it be safe to go with:
//int err=0;
        /* Slew reads the '0', that is not the end of the slew */
        if (Slew(PortFD) < 1)
        {
            EqNP.s = IPS_ALERT;
            IDSetNumber(&EqNP, "Error Slewing to JNow RA %s - DEC %s\n", RAStr, DecStr);
            slewError(err);
            return  false;
        }
rather than:
int err=0;
        /* Slew reads the '0', that is not the end of the slew */
        if (err = Slew(PortFD))
        {
            EqNP.s = IPS_ALERT;
            IDSetNumber(&EqNP, "Error Slewing to JNow RA %s - DEC %s\n", RAStr, DecStr);
            slewError(err);
            return  false;
        }
in the goto?

Thanks again.....

--Jon
8 years 5 months ago #5977

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

Seems ZEQ25 and Meade send different replies for the same command, so the ZEQ25 driver is using its own slew command now.
The following user(s) said Thank You: Piero
8 years 5 months ago #5980

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

Time to create page: 0.644 seconds