Repository navigation
fix(guiding): guide pulses dropped during active pulses + display render delaying pulse end - #313
Merged
Merged
Conversation
V1.13.14 (#261) added an isSlewingTRK() guard to guidePulse() to refuse pulses when the mount is not tracking (e.g. after the RA tracking limit auto-stop). However slewStatus() reports NOT_SLEWING for the entire duration of any active guide pulse, so the guard also silently dropped every pulse that arrived while another one was still running. Clients that wait for pulse completion before sending the next one (PHD2 via the ASCOM driver polling :GIG#) never hit this. Blind senders (INDI/EKOS) do: with typical 500-3000ms pulses on a 1-2s cadence, most corrections were dropped and guiding was effectively dead. Both :MG replies are empty, so the client cannot detect the drop. Test the STATUS_TRACKING status flag directly via the new isTracking() accessor instead. This keeps the intended refusal when actually not tracking (limit reached, tracking off, parked) and restores the pre-V1.13.14 last-one-wins behavior for overlapping pulses. Co-Authored-By: Claude Code <noreply@anthropic.com>
V1.13.7 (#248) added an updateInfoDisplay() call to the else-branch of the guiding block in loop(), refreshing the display mid-pulse. A full SSD1306 frame (~1KB over the default 100kHz I2C, no Wire.setClock is configured) blocks loop() for roughly 100ms, and guiding also bypasses the slew-based 5Hz refresh throttle (slewStatus() is masked while guiding, so the idle 30Hz rate applies). The end-time check only runs at the top of each loop() iteration, so every pulse could overshoot its requested duration by up to one render. The display is not left stale: guidePulse() renders once at each pulse start, and the normal end-of-loop refresh covers the gaps between pulses. Co-Authored-By: Claude Code <noreply@anthropic.com>
andre-stefanov
approved these changes
Oct 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two fixes for guide-pulse handling, from a user report about guiding clients (not board-specific):
1. Guide pulses arriving during an active pulse were silently dropped
V1.13.14 (#261) added an
isSlewingTRK()guard toguidePulse()to refuse pulses when the mount is not tracking (e.g. after the RA tracking limit auto-stop). ButslewStatus()reportsNOT_SLEWINGfor the entire duration of any active guide pulse, so the guard also rejected every pulse that arrived while another one was still running — on either axis.:GIG#) never overlap pulses, so they are unaffected.:MG…#replies are empty, so the client cannot detect the drop.Fix: test the
STATUS_TRACKINGstatus flag directly via a newisTracking()accessor. The intended refusal (limit reached, tracking off, parked) is preserved; overlapping pulses get the pre-V1.13.14 last-one-wins semantics again.2. Info display renders during guide pulses delayed the pulse end
V1.13.7 (#248) added an
updateInfoDisplay()call to the else-branch of the guiding block inloop(). A full SSD1306 frame (~1 KB over the default 100 kHz I2C — noWire.setClock()is configured) blocksloop()for roughly 100 ms, and guiding also bypasses the slew-based 5 Hz refresh throttle (slewStatus()is masked while guiding, so the idle 30 Hz rate applies). The pulse end-time check only runs at the top of eachloop()iteration, so every pulse could overshoot its requested duration by up to one render (~100 ms worst case) — real extra guide displacement, since the stepper ISR keeps stepping during the render.Fix: skip the render while a pulse is running. The display is not left stale —
guidePulse()renders once at each pulse start, and the normal end-of-loop()refresh covers the gaps between pulses.Testing
pio run -e rampsgreen with both changes (-Werror)developand this branch — pre-existing local-config issue (Configuration_local_esp32dev.hpp), not from these changes; CI builds clean without local configsMount.cpp(native env builds core/ports/adapters only); CI covers itFollow-up idea (not in this PR):
Wire.setClock(400000)would cut render time ~4x for all display paths.🤖 Generated with Claude Code