Skip to content

add float support to settings.toml and supervisor.get_setting()#10975

Open
dhalbert wants to merge 4 commits intoadafruit:mainfrom
dhalbert:settings-toml-float
Open

add float support to settings.toml and supervisor.get_setting()#10975
dhalbert wants to merge 4 commits intoadafruit:mainfrom
dhalbert:settings-toml-float

Conversation

@dhalbert
Copy link
Copy Markdown
Collaborator

@dhalbert dhalbert commented May 1, 2026

Add float support for settings.toml, so we can add several new controls for startup values, such as safe-mode delay, BLE startup delay, etc.

This code was developed with careful guiding of Claude Code using the Sonnet 4.6 model. Because this code must be allocation-free, there is some extra code for doing signed numbers beyond calling the basic float number parser.

Because ports/unix does not implement supervisor, a manual test was developed. I ran it and tested it. The original generated test used math.inf and math.nan, which are not available (#10974), and I worked around that.

Also I clarified some comments having to do with SETTINGS_ERR_*.

I fixed a couple of build problems which were unrelated to primary point of the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant