feat: add enable_spi board setting#83
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
…ers/ Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
Contributor
Author
|
Michael Lee (@michaellee1019) I'm doing this for FIRST so they don't need to teach the kids to SSH in and set this manually. LMK what you think. |
Ian Whalen (IanWhalen)
force-pushed
the
feature/enable-spi
branch
3 times, most recently
from
April 21, 2026 03:22
557eaac to
dfc6802
Compare
Adds enable_spi to BoardSettings config. When true, writes dtparam=spi=on
to /boot/config.txt and reboots if changed — mirroring enable_i2c behavior.
Implemented for both rpi (Pi0-Pi4) and pi5 boards.
Also fixes pre-existing test bugs: UpdateConfigFile tests used wrong value
("on" instead of "=on"), and TestDetectConfigParam called RemoveConfigParam
instead of DetectConfigParam.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
Ian Whalen (IanWhalen)
force-pushed
the
feature/enable-spi
branch
from
April 21, 2026 03:23
dfc6802 to
4752f85
Compare
Steve Briskin (stevebriskin)
self-requested a review
April 24, 2026 20:01
Steve Briskin (stevebriskin)
approved these changes
Apr 24, 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
enable_spifield toBoardSettingsconfig (alongside existingenable_i2c)configureSPI()to bothrpi/board.go(Pi0–Pi4) andpi5/board.go— mirrorsconfigureI2C()exactly, writingdtparam=spi=onto/boot/config.txtand rebooting if changedUpdateConfigFiletest calls used wrong value ("on"instead of"=on"), andTestDetectConfigParamwas callingRemoveConfigParaminstead ofDetectConfigParamTest plan
go test ./utils/... -run TestSPI— all 10 SPI subtests passgo test ./utils/...— full utils suite passes"board_settings": {"enable_spi": true}in config on a Pi and verifydtparam=spi=onis written to/boot/config.txt🤖 Generated with Claude Code