Repository navigation
Conversation
The api-v2 protos now document UART GenericInputConfig/PM25AQIConfig and GPS Config period as seconds. GPS SetPollPeriod now takes the uint32 seconds field directly and converts to ms with integer math (clamping on overflow) instead of float math behind a dead unsigned < 0 check. Fix stale ms docs on the UART/GPS period members. Fixes #1012 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
tyeth
commented
Oct 27, 2026
tyeth
left a comment
Member
Author
There was a problem hiding this comment.
Test this. Seems to highlight the need for mS still in uartBase
This branch has not been deployed
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.
Fixes #1012
Wippersnapper_Protobuf#223 changed the documented unit of the UART (
GenericInputConfig.period,PM25AQIConfig.period) and GPS (Config.period)periodfields from milliseconds to seconds.The generated wrappers in
src/protosalready say seconds, and both components already multiplied by 1000 on receipt, so runtime behaviour was effectively correct. This tidies the remaining mismatches:GPSHardware::SetPollPeriodnow takes theuint32_tseconds field directly and converts to ms with integer math, clamping instead of overflowing. This replaces float math behind apoll_period < 0check that was always false on an unsigned type.SetSensorPeriodPrvdoc indrvUartBase.h, which claimed it converts seconds to ms. It stores a millis() timestamp.Not built locally; relying on CI for build and lint.
🤖 Generated with Claude Code