×

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

Bi-monthly release with minor bug fixes and improvements

Eqmod alignment cleared when a new client is connected

  • Posts: 210
  • Thank you received: 104
I have a problem with the Eqmod alignment data that are cleared when a new client is connected or an existing client send <getProperties version='1.7'/>
This is using the last version from the ppa: 0.3+r3339~201708231229~ubuntu17.04.1

To reproduce the problem :
- start indiserver indi_eqmod_telescope
- connect to real mount or the simulator
- set sync-mode to Add point on sync
- slew and sync to three stars, you see Number of point=3 triangles=1
- connect with telnet and send <getProperties version='1.7'/>
- you get an error message about AlignData.xml file not found
- slew to a new star and sync, you see Number of point=1 triangles=0

I not tested but maybe if AlignData.xml is present you can get the old alignment data ?

Any idea where to search for the problem? I am a bit lost with the alignment code.
6 years 7 months ago #18698

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

I think the problem is in line #107 of align.cpp where it initialize the variables, but this shouldn't be called more than once in the session. Jean-Luc should be able to explain more.
6 years 7 months ago #18709

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

  • Posts: 210
  • Thank you received: 104
Thank you Jasem.

Align::Init() is only called by Align::updateProperties().
This let me trace the problem to align->updateProperties(); called by EQMod::ISGetProperties at line 399 of eqmod.cpp.
Commenting this line fix the problem.

The AlignData.xml is still loaded the first time by align->updateProperties from EQMod::updateProperties at line 669

Do the other thing in Align::updateProperties() must be done by EQMod::ISGetProperties() ? ,
maybe the telescope->deleteProperty part when we disconnect?
In this case the call to align->updateProperties(); can be moved out of the if (isConnected()) block in EQMod::ISGetProperties?
Last edit: 6 years 7 months ago by Patrick Chevalley.
6 years 7 months ago #18725

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

  • Posts: 210
  • Thank you received: 104
I add a few more IDLog and see my last suggestion is not necessary, EQMod::updateProperties call align->updateProperties when the telescope is disconnected.

So in my opinion line 396 to 401 of eqmod.cpp can be removed, but it is probably best to wait Jean-Luc advice.
6 years 7 months ago #18726

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

  • Posts: 210
  • Thank you received: 104
I normally not save my alignment data because I use a mobile setup, but testing for this issue I found a problem with the way the AlignData.xml is saved.
I make a PR with the fix: github.com/indilib/indi/pull/341
The following user(s) said Thank You: Jean-Luc
6 years 7 months ago #18728

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

  • Posts: 226
  • Thank you received: 88
Thanks Patrick for pointing out those issues and fixing the file loading problem.
On my side I think I've fixed the issue concerning the initialization of the pointset. Made pull request 347 .
Actually this error may also concern horizon limits, I'll have to check.
Jean-Luc.
The following user(s) said Thank You: Patrick Chevalley
6 years 7 months ago #18902

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

  • Posts: 210
  • Thank you received: 104
Thank you Jean-Luc!

I tested your change and everything work fine.

I not use horizon limit but I can give it a try.
6 years 7 months ago #18930

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

  • Posts: 210
  • Thank you received: 104
Just try the simulator with horizon limit.

I set 4 points and write the file.
Then connect a new client (phd2)
I can confirm that the list is reset as after adding a new point it show: Rank=0 (Total 1 points)
6 years 7 months ago #18931

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

  • Posts: 226
  • Thank you received: 88
Yes, same error here. Fixed in PR 354 . ~/.indi/horizonData.txt file is also loaded on first connection now, if it exists.
Thanks.
The following user(s) said Thank You: Patrick Chevalley, Eric, Jim
6 years 7 months ago #18955

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

Time to create page: 0.777 seconds