Repository navigation
feat: add the e-stop, watchdog, status LED and parsing modules - #1
Merged
Merged
Conversation
The e-stop sampling and command watchdog are the logic Slice_DCMT and Slice_RLHT share by copy, minus each family's safe-state policy: the core owns the state interrupt handlers read, sets it with interrupts off, and returns an edge for the Slice to act on. bootWait() restamps the watchdog when the wait ends, so a boot timeout under 1 s no longer trips on the first loop pass. The status LED driver is the one benched in feastorg/Slice_DCMT#55. parseLong() and parseFloat() accept only a whole decimal token in range. Each module has host tests. A sweep of 18 mutations, one per checked behaviour, turned its target test red every time. The example builds for nanoatmega328new and nano_every with no library warnings.
6 of 9 tasks
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.
The v0.1 modules from feastorg/.github#4:
bsc::EStopandbsc::bootWait(): the e-stop sampling Slice_DCMT and Slice_RLHT share (assert on one active sample, 25 ms release debounce, count). It returns an edge; what a stop does stays in each Slice.bsc::CommandWatchdog: arm, stamp, check, clear and the trip latch.bsc::StatusLed: the driver from refactor(firmware): drive the status LED without FastLED Slice_DCMT#55, with identifiers renamed only.bsc::parseLong()/bsc::parseFloat(): strict whole-token parsing.The core owns the state interrupt handlers read (
asserted(),count(),tripped(),tripCount()) and sets it with interrupts off before returningPressedor a trip. Each Slice keeps its own actuation and field resets in whatever order it uses now.Behaviour changes against the Slices' copies:
bootWait()restamps the watchdog when the wait ends, so a boot timeout under 1 s no longer trips on the first loop pass (the requirement noted on Slice firmware platform: bread-slice-core and the firmware spec .github#4).check()compares the timeout inside the masked window that sets the latch, so an ISR stamp can't land between the comparison and the latch.Tests: host tests for all four modules (
ctest, 4/4). Each of 18 mutations, one per checked behaviour, turned its target test red.examples/slice_skeletonbuilds fornanoatmega328new(3608 B flash) andnano_every(4435 B) with no warnings from the library, and fails onmegaatmega2560with the LED header's#error.Not checked: no Slice uses it yet, and nothing here has run on a board. The LED loop's asm is unchanged from the benched one; I have not compared the compiled output, and this build has not been flashed or scoped.