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