Conversation
- Add /autotune page with real-time event detection UI - Independent NVS storage per driving mode (Track/Canyon/City/Highway/Custom) - Active mode persists across power cycles - Session persistence during calibration (1-hour expiry) - Remove dead code: PROFILE_SCALES, generateAllProfiles(), MIN_SPEED_MS - Sync defaults between settings.rs and dashboard JS - Add From trait impls to reduce type conversion boilerplate - Fix docs/index.html outdated autotune description
Dashboard and autotune were sending settings without specifying the target mode, causing settings to be saved to the currently active mode instead of the user's selected mode. - applySettings() now sends mode change first, waits 150ms, then settings - sendSettings() accepts optional mode parameter for mode-aware saves - selectPreset() and saveCfg() pass current preset mode to sendSettings()
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.
Autotune Feature - Per-Mode Calibration
This enables users to tune the parameters for event detection (ACCEL, BRAKE, CORNER, etc) to their specific vehicle. Simply go to /autotune and start calibration by driving around. Settings get saved to NVS and are ready to use on /
Changes
Autotune UI (/autotune)
Workflow:
Event Detection (matches mode.rs dynamics):
Threshold Calculation:
Session Persistence: Navigate away and back within 1 hour - calibration progress restored (events, selected mode, recording state).
Analysis
Value proposition: Vehicle/driver-specific threshold tuning. A sports car pulling 1.0g lateral needs different thresholds than a minivan at 0.5g.
Target users: Track/autocross enthusiasts analyzing lap data. For casual users, default presets work fine.
Future potential: Event detection infrastructure supports more granular labels:
Peak values, duration, and delta-V are already captured per event.
Test Sequence
espflash erase-flash && cargo espflash flash --release --monitor