Repository navigation
FakePPS: raise the PPS edge before logging - #104
Merged
Merged
Conversation
The jitter line was printed to stdout (journald pipe, flushed by std::endl) between the busy-wait and gpiod_line_set_value, so the edge went out after a write() of variable length. Print it after the edge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0158FTTDzFsuHg97qLmDZN8z
michalpelka
force-pushed
the
mp/fakepps-edge-first
branch
from
November 30, 2026 00:10
80815c7 to
1774bc1
Compare
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.
Problem
The jitter line was printed to stdout (journald pipe, flushed by
std::endl) between the busy-wait andgpiod_line_set_value, so the PPS edge went out after awrite()of variable length.Measured on MandEye IMU data (STM32
gps_timere-anchors on every PPS): timestamp steps at each second of 21.7 us RMS, up to 78 us, against 0.35 us within a second.Change
Print the line after the GPIO edge instead of before it.
Test
Deployed on a MandEye RPi 5 with NTP disabled. The spread seen on the scope against GPS PPS with infinite persistence was RPi clock drift, not jitter: the edge moves steadily, with no random jumps.
Not yet re-checked on an IMU recording.
🤖 Generated with Claude Code
https://claude.ai/code/session_0158FTTDzFsuHg97qLmDZN8z