Repository navigation
AutoPub and the example decode through RaftCore's shared poll decode and value reader - #4
Merged
Merged
Conversation
…and value reader - AutoPub decodes with DeviceTypeRecords::decodeNewestPollRecord (static overload, with the context's working space, so nothing is allocated on the bus task for a full-length poll). It padded short polls itself; now every on-device consumer does the same in one place. The working space holds up to 32 records within 1 KB (it was 8): an LSM6DS FIFO read holds up to 20, and with 8 the newest of a full read was dropped. - The ExampleDiscoverable ~/read reply decoded subscriber data without padding, so a FIFO device gave "undecodable sample". It now uses decodeNewestPollRecord and AttrFieldDesc::getValue. - AutoPub's CDR serialiser keeps its own value reader (it is independent of RaftCore); it reads values the same way, arrays and scaling included. Built (ExampleDiscoverable, SysTypeMain) against RaftCore and RaftI2C with these changes; not run on hardware. Needs RaftCore with DeviceTypeRecords::decodeNewestPollRecord and AttrFieldDesc::getValue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Change
DeviceTypeRecords::decodeNewestPollRecord(the static overload, with the context's own working space, so nothing is allocated on the bus task for a full-length poll). It padded short polls itself before; now every on-device consumer (DeviceManager named values, RaftI2C, RaftMicroPy, RaftROS) does it in one place.~/readreply decoded subscriber data without padding, so a FIFO device gave "undecodable sample". It now usesdecodeNewestPollRecordandAttrFieldDesc::getValue.Depends on robdobsn/RaftCore#53 and robdobsn/RaftI2C#18.
Tested
ExampleDiscoverable (SysTypeMain) builds against RaftCore#53 and the RaftI2C change. Not run on hardware.
🤖 Generated with Claude Code