×

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

Bi-monthly release with minor bug fixes and improvements

PECInterface

  • Posts: 161
  • Thank you received: 39

PECInterface was created by james_lan

Right now, INDI has support for PEC playback in a number of drivers, but recording is limited to only EQmod and soon OnStep. Rather than have a whole batch of this that and the other,

Similar to a FocuserInterface or GuiderInterface, I'd propose something like this:

//PECInterface
//axis 0=RA, 1=DEC, others?
IPState StopPECPlayback (int axis);
IPState StartPECPlayback (int axis);
IPState ClearPECBuffer (int axis);
IPState StartPECRecord (int axis);
IPState SavePECBuffer (int axis);
IPState PECStatus (int axis);
IPState ReadPECBuffer (int axis);
IPState WritePECBuffer (int axis);
bool ISPECRecorded (int axis);
//End PECInterface

Variables: (OS is for OnStep, that'd be removed) for each axis.
ISwitchVectorProperty OSPECStatusSP;
ISwitch OSPECStatusS[5];
ISwitchVectorProperty OSPECIndexSP;
ISwitch OSPECIndexS[2];
ISwitchVectorProperty OSPECRecordSP;
ISwitch OSPECRecordS[3];
ISwitchVectorProperty OSPECReadSP;
ISwitch OSPECReadS[2];

As well as change enum TelescopePECState
{
PEC_UNKNOWN = -1,
PEC_OFF = 0,
PEC_ON = 1
};

to:

enum TelescopePECState
{
PEC_UNKNOWN = -1,
PEC_OFF = 0,
PEC_ON = 1,
PEC_PLAYING = 1,
PEC_RECORDING = 2,
PEC_WAIT_PLAY = 3,
PEC_WAIT_RECORD = 4
};

To allow for recording, and notifying when waiting for an index point, which is how several telescopes do it, rather than encoders. (Depending on the worm ratio, that can be a state something is in for a while.)

I wanted to get feedback on this before presenting it as a code proposal, in case there are methods or things forgotten.

The two main methods of PEC seem to be:
1) Hall switch/visual interruptor/microswitch - Single index used, which is the case for OnStep, Meade LX200s (Smart Drive), NexStar(Can't confirm, but seems to be the case)
2) Encoders - Not sure what uses this (OnStep can use them if there is an index pulse.) Some Meade LX200s?
OK, 3
3) Virtual - It keeps a record of where it is, then records it, but has no index to base it on. Surprisingly Eqmod apparently handles it this way ( eq-mod.sourceforge.net/docs/eqmod_vs-pec.pdf ) though I thought it interacted with indexes as in #1, and OnStep can, if there is no index.

Note that as far as recording, some telescopes do not provide methods to record in their protocols, for example the LX200, where you can read and write PEC data, but not trigger a recording. So as far as flags:

HAS_PEC_PLAYBACK
HAS_PEC_RECORD
HAS_PEC_MANIPULATION (R/W from the PEC index)



Overall, it's a fairly simple thing, but the Eqmod people have implemented recording one way, I'd like as person #2 to make it implemented in a better way for #3+, etc.

So thoughts, or should I not bother, and just implement it for #2, similar to #1? (I have had more detailed suggestions written up, but I'm about to not be able to work on it for about 2 weeks, so I wanted to let people comment on it.)

There's also this, but I don't think it went anywhere: indilib.org/forum/general/1331-pec-corre...driver.html?start=12
The following user(s) said Thank You: Jasem Mutlaq, Jim
Last edit: 5 years 8 months ago by james_lan.
5 years 8 months ago #27485

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

Replied by Jasem Mutlaq on topic PECInterface

That's a great idea. Can you also patch EQMod to take into account these changes along with OneStep? A PR would be great to examine everything in one place, but overall I like this!
5 years 8 months ago #27502

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

  • Posts: 161
  • Thank you received: 39

Replied by james_lan on topic PECInterface

I'd certainly patch EQmod if I did this. (Mind you I can't test it on Eqmod, or any of the others. Excluding software (I don't have a new enough autostar, or advanced enough nexstar)

I'm looking for anything I missed as well.

So far on breakdown of what can/should support these things:
PEC_PLAYBACK: Many/OnStep/Eqmod/Autostar II/LX200 GPS/NexStar
PEC_RECORD: OnStep/Eqmod/NexStar
PEC_MANIPULATION: OnStep/Eqmod/Autostar II/NexStar

(NexStar based on finding it in libnexstar, haven't checked INDI.)

There's also the software PEC, which seems like a good ideas as mentioned in that thread. Should that be done as an Ekos module? (I'm not necessarily volunteering to write it, but wanted to make sure that it could be handled by the same interface, so I probably need to add a playback from file.)
5 years 8 months ago #27546

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

Time to create page: 0.678 seconds