×

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

Bi-monthly release with minor bug fixes and improvements

Driver OnStep (LX200 like) for INDI

  • Posts: 161
  • Thank you received: 39
From a glance it seems like it's going to cause extra state changes on certain codes with regard to parking (calling setParked(x) results in a change to either PARKED or IDLE, and a variable IsParked being set (accessible through isParked()) and I think that's changed in the past.

Issues with what you've got:
F shouldn't change TrackState. (Park failed, but the state should be processed via n/N )
p and nN only, if it's pn, it'll produce TRACKING when it should be IDLE (here again state should be processed via n/N)
Not sure why the myTrackState?

That own-goto branch of mine, I didn't handle it right, either, when I looked at your code: (F, I and p should be moved in my code before the n/N/P processing, because of the potential call to setParked(false) in them, which could result in an idle state.) Basically moving up the ==parkdata== / ==end...== section should have fixed that issue. (I have pushed the branch, but not tested it, as I need to get away from the computer for a bit, as I keep looking and running through the same logic and questioning it, so I'm going to stop and come back in a while so I don't break anything too badly.)

Please have a look though: github.com/james-lan/indi/blob/own-goto/...ope/lx200_OnStep.cpp (Note it doesn't include IsNewSwitch() settings which can change it.)

Note the multi unparked in ( indilib.org/forum/development/1406-drive...html?start=660#73262 ) should be resolved in the current version, as each call will set status, but will only correct the internal parked variable when needed. (That I have tested some, and so far I haven't had issues with it.)

Issues/TrackState manipulation remaining with mine:
Scope may get set for a split second to TrackState=SCOPE_IDLE when unparking, but that will be correct shortly thereafter within the function. due to the call to set IsParked
Same with parking (but to the correct TrackState=SCOPE_PARKED) so non issue

One thing that could be done is skip the OSStat == OldOSStat check. That would resolve the sync issue and why when you start/stop tracking it gets corrected. (With the isParked() guards around it shouldn't cause any issues for the correct things to be set with regards to TrackState, not sure about the rest of it.) So we'd need to make sure things don't cause issues like messing with TrackState can, but that I think is probably the best case. But it could mask TrackState and other issues as well.

Alright, I'm off, let me know what you all think. (Apologies, I left this up last night, but aside from me being less tired everything else should be the same.)
2 years 9 months ago #73335

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

  • Posts: 452
  • Thank you received: 71
Hi James,

Yes leaving coding away some time will do good.
Looking all the time at a problem makes us blind :-)

I will have a look on your code.
In the meantime "myTrackState" is removed (was just a testing variable)
I have now a situation where OnStep TrackState is sync with Ekos except for SCOPE_PARKING where Ekos still states Slewing.
But I notice no other strange behavior.
2 years 9 months ago #73338

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

  • Posts: 452
  • Thank you received: 71
Serge,

I experience no crashes with Kstars (I have 3.5.5 Beta, but I had also none with 3.5.4 Stable)
I cannot reproduce the Park issues, it works fine for me but I must agree I do test all manually not in sequencing.
I never tested the Ekos automation so far.
Can you share your scripts?
2 years 9 months ago #73340

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

  • Posts: 62
  • Thank you received: 1
I have removed all Indi drivers (just keep CCD simulator and LX200OnStep) and i have no crashes.
The park problem is only in automated sessions.
My sequence is very simple:
- Unpark mount
- Goto a star
- take one shoot (light, 1s)
- Park the mount

Perhaps for Kstars, "Park"ing and "Park"ed are the sames
2 years 9 months ago #73342

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

  • Posts: 62
  • Thank you received: 1
For me, in the mount tab (Ctrl K, tab mount, i unpark mount, goto a star, the unpark button is grey (mount is really unparked)
If I click on the park button, it instantly turns grey (parked mount) as the mount continues to move to the park point.
I can click on the unpark button while the mount is not yet parked (it is moving to its park position). So the mount stops where it is. and goes into tracking.
Maybe this is the normal operation.
The only problem is that the automatic sequence stops when the mount is not yet parked.

My shelter can send the park order to the mount directly on OnStep (by WiFi).
I can use this solution.
I do not park the mount at the end of the sequence but only the shelter (which will park the mount for him).
Last edit: 2 years 9 months ago by Serge CLAUS.
2 years 9 months ago #73343

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

  • Posts: 452
  • Thank you received: 71
I just started a sequence that makes the following:

Unpark
Track and Focus on a star
take 10 dark
take 10 flat
take 10 pictures
track and focus on another star
take 10 dark
take 10 flat
take 10 pictures
park
shutdown

and seems to work as expected (I use ccd simulator)

Where I am not happy is that Ekos still states Slewing instead of Parking but this is most probably deep in Ekos not Indi so I am a bit dry on that.

Still to test some other things and set-up a debugging ...
time to sleep :-)
2 years 9 months ago #73345

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

  • Posts: 452
  • Thank you received: 71
Hi Claus,I did another test this morning.A sequence:- Unpark- Track Venus- Take a suite of shots- Track Mars- Take a suite of shots- ParkI include as attachment the logs so that you can see whats going on.For me everything works fine but there might be some confusion between what Ekos Scheduler reports and what the actual TrackState is.At end of sequence it says mount parked but in fact it refers to the scheduler not to the TrackState[2021-07-09T12:03:05.677 CEST INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'Mars' 5x1\" Luminance completed its sequence of 0 light frames."[2021-07-09T12:03:05.683 CEST INFO ][ org.kde.kstars.ekos.scheduler] - "No jobs left in the scheduler queue."[2021-07-09T12:03:05.684 CEST INFO ][ org.kde.kstars.ekos.scheduler] - Starting shutdown process...[2021-07-09T12:03:06.740 CEST INFO ][ org.kde.kstars.ekos.scheduler] - "Parking mount in progress..."[2021-07-09T12:03:07.432 CEST DEBG ][     org.kde.kstars.ekos.mount] - Mount status changed from  "Tracking"  to  "Slewing"[2021-07-09T12:03:07.438 CEST INFO ][     org.kde.kstars.ekos.guide] - "Mount is moving. Resetting calibration..."[2021-07-09T12:03:07.440 CEST INFO ][     org.kde.kstars.ekos.guide] - "Calibration is cleared."[2021-07-09T12:03:07.789 CEST INFO ][ org.kde.kstars.ekos.scheduler] - "Mount parked."[2021-07-09T12:03:10.933 CEST INFO ][ org.kde.kstars.ekos.scheduler] - Disconnecting INDI...
2 years 9 months ago #73353
Attachments:

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

  • Posts: 322
  • Thank you received: 31
I don't use Park/Unpark, and therefore don't see the same symptoms that you do.

But I did notice one odd thing with the most recent stable KStars from Jassem's PPA, and perhaps from one release before that.

Previously, when I started a slew, I had a notification that said "Mount reached destination", but only when the mount has reached the target.

Now, when I start a slew, that notification is displayed immediately when the slew is just starting.

I don't see any other ill effect.

But I think this is related to what you folks are seeing.
2 years 9 months ago #73357

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

  • Posts: 452
  • Thank you received: 71
Khalid,

I didn't use the scheduler till now so I was not aware about all these things.
But now that I try to reproduce the behavior Claus is seeing I discover a lot of things where I get more and more confused.
So far I did check, Telescope Status is only managed by "TrackState" and running Indi in debugger it appears that this variable is reflecting what wee expect (the firmware status IDLE, SLEWING, TRACKING, PARKING and PARKED) but Ekos shows some other states like "Moving E, Moving W .... so what Ekos shows is definitively not directly reflecting the Firmware state and may be this is what creates confusion.

But fo now I did some tests whith the Scheduler and it seems to work as expected with the version I have on my git
github.com/azwing/indi

@ Claus,

I don't use CDC. Does it have a scheduler?
2 years 9 months ago #73358

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

  • Posts: 62
  • Thank you received: 1
@Alain

Yes CCDCiel has a good scheduler.
2 years 9 months ago #73363

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

  • Posts: 452
  • Thank you received: 71
James,

I tested the "own-goto" branch and I found ti does work except for the unpark issue.

I also checked the behavior whithout testing (strcmp(OSStat, OldOSStat) != 0) no change so test might be overkill but for sure not the reason.

So far all my tests with Scheduler were successful, the only change I made in my code is the SetParked(false); in case of failure but only if if (isParked()) is true

Test results
2021-07-10T13:42:56 Shutdown complete.
2021-07-10T13:42:56 Ekos stopped.
2021-07-10T13:42:55 INDI devices disconnected.
2021-07-10T13:42:51 Mount parked.
2021-07-10T13:42:50 Parking mount in progress...
2021-07-10T13:42:49 No jobs left in the scheduler queue.
2021-07-10T13:42:48 Job 'Altais' is complete.
2021-07-10T13:42:38 Job 'Altais' capture is in progress...
2021-07-10T13:42:38 Job 'Altais' focusing is complete.
2021-07-10T13:42:29 Job 'Altais' is focusing.
2021-07-10T13:42:29 Job 'Altais' slew is complete.
2021-07-10T13:38:54 Job 'Altais' is slewing to target.
2021-07-10T13:38:51 Job 'HD 188119' is complete.
2021-07-10T13:38:41 Job 'HD 188119' capture is in progress...
2021-07-10T13:38:41 Job 'HD 188119' focusing is complete.
2021-07-10T13:37:11 Job 'HD 188119' is focusing.
2021-07-10T13:37:11 Job 'HD 188119' is restarting its focusing procedure.
2021-07-10T13:37:11 Warning: job 'HD 188119' focusing failed.
2021-07-10T13:37:11 Job 'HD 188119' is focusing.
2021-07-10T13:37:11 Job 'HD 188119' is restarting its focusing procedure.
2021-07-10T13:37:11 Warning: job 'HD 188119' focusing failed.
2021-07-10T13:35:35 Job 'HD 188119' is focusing.
2021-07-10T13:35:34 Job 'HD 188119' slew is complete.
2021-07-10T13:32:29 Job 'HD 188119' is slewing to target.
2021-07-10T13:32:26 Mount unparked.
2021-07-10T13:32:23 Ekos started.
2021-07-10T13:32:19 Scheduler started.
 
Last edit: 2 years 9 months ago by Alain Zwingelstein.
2 years 9 months ago #73371

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

  • Posts: 62
  • Thank you received: 1
I've downgraded my setup:
Ubuntu Mate 20.04 -> Ubuntu Mate 18.04
And compiled indi drivers 1.8.9
And all is working \o/
I'm waiting for Indi 1.9.9 for upgrade :-)
2 years 9 months ago #73478

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

Time to create page: 1.332 seconds