I stepped into a problem last night where PHD2 remains suspended after focusing finished. The Guide module assumed PHD2 would be in state GUIDING while PHD2 remained suspended. Here is the extract from the logs:
<code>[2020-04-09T01:04:27.017 CEST DEBG ][ org.kde.kstars.ekos.guide] - PHD2: request: "{\"id\":5783,\"jsonrpc\":\"2.0\",\"method\":\"set_paused\",\"params\":[true,\"full\"]}"
[2020-04-09T01:04:27.018 CEST DEBG ][ org.kde.kstars.ekos.capture] - setFocusStatus: 5
[2020-04-09T01:04:27.018 CEST INFO ][ org.kde.kstars.ekos.focus] - "Capturing image..."
[2020-04-09T01:04:27.243 CEST DEBG ][ org.kde.kstars.ekos.scheduler] - Focus State "In Progress"
[2020-04-09T01:04:27.285 CEST DEBG ][ org.kde.kstars.ekos.guide] - PHD2: event: "{\"Event\":\"Paused\",\"Timestamp\":1586387067.284,\"Host\":\"star-hunter\",\"Inst\":1}\r\n"
[2020-04-09T01:04:27.285 CEST INFO ][ org.kde.kstars.ekos.guide] - "PHD2: Guiding Paused."
[2020-04-09T01:04:27.288 CEST DEBG ][ org.kde.kstars.ekos.capture] - Guiding state changed from "Guiding" to "Suspended"
[2020-04-09T01:04:27.288 CEST INFO ][ org.kde.kstars.ekos.guide] - "Guiding suspended."
[2020-04-09T01:04:27.291 CEST DEBG ][ org.kde.kstars.ekos.scheduler] - Guide State "Suspended"
[2020-04-09T01:04:27.294 CEST DEBG ][ org.kde.kstars.ekos.guide] - PHD2: response: "{\"jsonrpc\":\"2.0\",\"result\":0,\"id\":5783}\r\n"
[2020-04-09T01:04:27.436 CEST DEBG ][ org.kde.kstars.ekos.guide] - PHD2: event: "{\"Event\":\"GuideStep\",\"Timestamp\":1586387067.435,\"Host\":\"star-hunter\",\"Inst\":1,\"Frame\":1987,\"Time\":4304.212,\"Mount\":\"INDI Mount [Avalon StarGo]\",\"dx\":-0.044,\"dy\":0.088,\"RADistanceRaw\":0.025,\"DECDistanceRaw\":0.096,\"RADistanceGuide\":0.025,\"DECDistanceGuide\":0.096,\"RADuration\":23,\"RADirection\":\"West\",\"DECDuration\":29,\"DECDirection\":\"South\",\"StarMass\":127352,\"SNR\":237.03,\"HFD\":4.64,\"AvgDist\":0.12}\r\n"
[2020-04-09T01:04:27.436 CEST DEBG ][ org.kde.kstars.ekos.capture] - Guiding state changed from "Suspended" to "Guiding"
[2020-04-09T01:04:27.437 CEST INFO ][ org.kde.kstars.ekos.guide] - "Guiding resumed."
</code>
The critical point is at 01:04:27.436 where PHD2 reports a guiding step although it is suspended. This has the consequence that the EKOS guiding module thinks PHD2 is in the guiding mode and sets the status to GUIDING. Here is the code snippet:
<code>void Guide::setAxisDelta(double ra, double de)
{
//If PHD2 starts guiding because somebody pusted the button remotely, we want to set the state to guiding.
//If guide pulses start coming in, it must be guiding.
if(guiderType == GUIDE_PHD2 && state != GUIDE_GUIDING)
setStatus(GUIDE_GUIDING);
</code>
As mentioned in the comments the intention behind this is that PHD2 has changed its state, but I think this assumption is at least too general. I personally tend to remove this statement, since from my point of view this is at least the wrong place to change the state.
Any thoughts about this?
As a workaround, I suggest avoiding to suspend guiding during focussing, until this problem is fixed.
- Wolfgang