×

INDI Library v1.9.3 Released (11 Nov 2021)

Bimonthly Stable INDI Library release introduces new drivers and fixes for existing ones. Some highlights:

Driver OnStep (LX200 like) for INDI

  • Posts: 149
  • Thank you received: 35
After checking with V3, V4, V5 & OnStepX (aka V10) everything seems to work well, and I've started a pull request for it to main.

(github's diffs seem broken so especially if looking at the TrackState & similar code, I'd highly suggest just looking at the file instead of diffs.)

The KStars/Ekos Align issue is solved and hopefully any others where a Slew is detected as ending immediately, as I finally found one place that EqNP was set that I missed somehow. (Shouldn't have, but finally.)

kstars/logs$ cat 2021-10-05/* | grep -c "Slew det"
90
kstars/logs$ cat 2021-10-06/* | grep -c "Slew det"
2

This is mostly the result of the align module (testing various versions, ~20 for each version tested), the two that happened today were both Meridian Flips triggered by Ekos. This is with 300+ Slews/Gotos in each day's tests. (Full is: "Slew detected, suspend solving...")

I'll let people know when it's accepted, then please try to break it before INDI 1.9.3.

Also OnStepX has the :GX90# fixed in git.
The following user(s) said Thank You: Alain Zwingelstein
1 month 4 weeks ago #76398

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

  • Posts: 149
  • Thank you received: 35
The pull request has been merged, and it looks like the PPA for nightly is updated. Please let me know if there are any issues! (I see one person with bluetooth issues in another thread, but I suspect that's unrelated (and the changes likely won't affect it.))
1 month 3 weeks ago #76462

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

  • Posts: 289
  • Thank you received: 33
Hi James,

I have a strange behavior with OnStep.
1) Site Management Tab
2) Set a Site name
3)When selecting another Site Onstep Crashes

I am trying to debug but found nothing so far
Any idea?

kstars 3.5.6 Beta
INDI Library: 1.9.3
Code v1.9.2-21-g2ea67102f. Protocol 1.7.
OnStep 4.24.k
Last edit: 1 month 2 weeks ago by Alain Zwingelstein.
1 month 2 weeks ago #76688

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

  • Posts: 149
  • Thank you received: 35
Sorry for not replying, this was getting annoying to track down. It's not directly an OnStep issue, but seems to be a more general LX200telescope one.

There are 2 ways to fix it.

First a description of the problem:
It's these two lines in lx200telescope.cpp @about 684:
IText *tp = IUFindText(&SiteNameTP, names[0]);
IUSaveText(tp, texts[0]); IDSetText(&SiteNameTP, "Site name updated");

It will then crash when these lines are called about 870, actually on the IDSetSwitch(&SiteNameTP, nullptr) when it tries to send it out, but the reason is:
if (isSimulation())
IUSaveText(&SiteNameTP.tp[0], "Sample Site");
else {
getSiteName(PortFD, SiteNameTP.tp[0].text, currentSiteNum);

Now, The reason it crashes is that IUSaveText will reallocate the string length to strlen()+1 (for null) It's originally allocated as (about 1225):
SiteNameT[0].text = new char[64];

IUSaveText does this (literally the only line function):
tp->text = strcpy(realloc(tp->text, strlen(newtext) + 1), newtext);

So as long as the getSiteName method of calling the pointer directly (SiteNameTP.tp[0].text) is used, and no IUSaveText is, it's good. When it's used as the getSiteName, (Changing sites) it has a shortened string, and dies when trying to send the XML out. Which is why it only dies only after a change of site, and fetches the changed to site's name.

First fix is to avoid reallocation in the set function :
strncpy(SiteNameTP.tp[0].text,texts[0],64);
IDSetText(&SiteNameTP, "Site name updated");


The Second is to modify the getSiteName to also use IUSaveText:
if (isSimulation())
IUSaveText(&SiteNameTP.tp[0], "Sample Site"); //Update this as well? Under sim, it doesn't seem to crash.
else {
//getSiteName(PortFD, SiteNameTP.tp[0].text, currentSiteNum); //Original Call
char temp_site_name[64] = {0};
getSiteName(PortFD, temp_site_name, currentSiteNum);
IText *tp = IUFindText(&SiteNameTP, "Name"); //Should change the line ( IUFillText(&SiteNameT[0], "Name", "", "");) so it's not just 'Name'?
IUSaveText(tp, temp_site_name);
}

@knro, Any preference on which way is more proper/better for INDI? It looks like lx200pulsar2.cpp uses the getSiteName method and if the 2nd solution is chosen it would need to be updated as well. I'm inclined to use the first solution, as it's simpler, and there seem to be a few
The following user(s) said Thank You: Alain Zwingelstein
Last edit: 1 month 1 week ago by james_lan. Reason: Stupid formatting!
1 month 1 week ago #76974

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

I pushed a fix to this, please test from Git.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
The following user(s) said Thank You: Alain Zwingelstein
1 month 6 days ago #77074

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

  • Posts: 289
  • Thank you received: 33
@Jasem,

I checked the fix but still have kstars crash when clicking on the "Set" button for Site Names (in the Site Management Panel)
1 month 5 days ago #77080

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

I can't reproduce the crash here (with LX200 Autostar simulator) when setting the site name. Are you sure you compiled from latest GIT and installed?
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 month 5 days ago #77090

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

  • Posts: 289
  • Thank you received: 33
In fact it is true, with the simulator there is no bug!
An yes, I installed and compiled the latest git source.
I tested with LX200_Classic, LX200_Basic, LX200_OnStep in real situation (controller attached)
Last edit: 1 month 5 days ago by Alain Zwingelstein.
1 month 5 days ago #77092

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

  • Posts: 44
  • Thank you received: 0
Hi Jasem, i installed Indi server on my Raspberry Pi via APT.

My question is when is the APT repository updated? At the same time has the github repository?

I would prefer to stick to apt update/upgrades if i could.

Thanks,
Chad
1 month 5 days ago #77096

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

  • Posts: 149
  • Thank you received: 35
Simulator just assigns it, so never calls IUUpateText

Each call to getSiteName needs to be changed. I have added a pull request which should fix all the remaining locations.

github.com/indilib/indi/pull/1550

And because I suck at git branches, you can check directly from github.com/james-lan/indi
The following user(s) said Thank You: Alain Zwingelstein
Last edit: 1 month 5 days ago by james_lan. Reason: added links
1 month 5 days ago #77101

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

  • Posts: 289
  • Thank you received: 33
@Jame, @Jasem,

I just built the last git and it works fine.
I tested with Onstep and with all lx200 variants (Classic ...)
The following user(s) said Thank You: james_lan
1 month 4 days ago #77140

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

  • Posts: 44
  • Thank you received: 0
@james_lan try Github desktop.  When i started to use it git started to make more sense too me.

desktop.github.com/
1 month 4 days ago #77145

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

Time to create page: 1.043 seconds