Repository navigation
raft new: an App type question (general, battery) that sets defaults and settings - #12
Merged
Merged
Conversation
…and settings - app_type, asked after the hardware: general (the questions' own defaults - nothing changes for existing apps) or battery (sleeps, wakes to measure and report). A type sets the defaults of the later questions (type_defaults; a --set or saved answer still wins) and, with the connectivity answer and the chip, some generated settings. - battery: connectivity wifi, no web server, no I2C by default. With WiFi, NetMan starts WiFi on demand, connects straight to the remembered AP (wifiSTAFastReconnect, 30 uses), no AP or mDNS, wifiBand 2g on the esp32c5; RaftCore's wifi-fast-connect sdkconfig fragment in systypes/Common/features.cmake. With BLE, a 1 s advertising interval. The generated README gets a section on the on-demand WiFi and the per-device settings (w, wifiip, MQTT). - No I2C: set(RAFT_DEVICE_MANAGER OFF) in features.cmake, for every type. - The NetMan, BLEMan and WebServer SysTypes blocks are made in Rust (type_settings) rather than as JSON-in-a-string generators; the text for general is unchanged. - devdocs/raft-new-app-types-proposal.md: the plan (phase 1 done, phases 2-4 planned). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Merged
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.
raft newasks App type after the hardware:general(the questions' own defaults; nothing changes for existing users) orbattery(sleeps, wakes to measure and report). The type sets the defaults of the later questions and, together with the connectivity answer and the chip, some generated settings. Every later question still works as usual: a--setanswer or a saved answer wins over the type's default.Phase 1 of
devdocs/raft-new-app-types-proposal.md(in this PR), which also planspublishingandgatewaytypes.batterywifi, no web server, no I2C.SysTypes.jsonNetMan):"startMode": "onDemand"(the app starts WiFi with{"cmd":"wifiStart"}),wifiSTAFastReconnectwith 30 uses before a rescan, no access point or mDNS, and on the esp32c5"wifiBand": "2g".systypes/Common/features.cmakeselects RaftCore'swifi-fast-connectsdkconfig fragment (needs RaftCore from PR #37, merged 2026-10-27).advIntervalMs1000.w,wifiip, MQTT broker) so installation values stay out of SysTypes.deep-sleep-fast-wakeand WARN log levels are not set: they are suggested in a comment until their effect is measured (plan §7).For every type
set(RAFT_DEVICE_MANAGER OFF)(about 100 KB of flash).type_settings()) instead of JSON-in-a-string generators. Their text forgeneralis unchanged.general) and the fragments selected.Tested
generalis byte-identical to the previous build for all four connectivity cases (wifi_ble,wifi,ble,noneon a FeatherS3 preset), apart from.raftnew.jsongaining"app_type": "general".raft new -d --set app_type=battery --set target_chip=esp32c5) builds with ESP-IDF 6.1: 1.29 MB, 27% of the slot free; the build log shows the fragment applied and the generatedsdkconfighasCONFIG_LWIP_DHCP_RESTORE_LAST_IP=yandCONFIG_LWIP_DHCP_DOES_NOT_CHECK_OFFERED_IP=y.--locked), four new: type defaults and overrides, battery + WiFi (esp32c5 vs esp32s3), battery + BLE, general blocks unchanged.deep-sleep-fast-wakeand WARN logging are worth making defaults). No C5 board was attached.README: the question row, an "App types" section, and
raft update-project --set app_type=...behaviour (it changes the generated settings, not already-saved answers).🤖 Generated with Claude Code