saving config added

This commit is contained in:
Ayzen
2026-10-13 17:49:53 +03:00
parent 4548c1f2a0
commit f7d9d1ce0e
7 changed files with 167 additions and 50 deletions
+8 -1
View File
@@ -35,6 +35,7 @@ Profile `.ini` format:
- Empty lines are ignored.
- Lines starting with `#` or `;` are ignored.
- Unknown keys are ignored.
- The whole file must be smaller than 4096 bytes; a larger profile fails to load instead of being truncated.
Additional profile-controlled devices:
@@ -44,12 +45,18 @@ Additional profile-controlled devices:
- TEC drive modulation is stored through `tec_modulation_enable`, `tec_modulation_laser`,
`tec_modulation_frequency_hz`, and `tec_modulation_amplitude_code`.
- `DS1809` is stored as an absolute target above the minimum tap using `ds1809_apply` and `ds1809_position_from_min`.
- Laser 2 current and STM32 DAC sweeps are stored through the `laser2_current_sweep_*` and `stm32_dac_sweep_*` keys:
`_enable`, `_min_code`, `_max_code`, `_step_code`, `_step_period_us`, and `_pause_ms`.
Notes:
- `ad9833_frequency_word` uses the same raw 28-bit tuning word that the old serial command accepted.
- `tec_modulation_laser` is `1` or `2`; accepted TEC modulation frequency is `50..2000 Hz`,
and peak amplitude is `0..4096` external TEC DAC codes.
and peak amplitude is `0..27900` external TEC DAC codes (further limited by the headroom around the PID output).
- A sweep steps from `_min_code` up to `_max_code` (inclusive) by `_step_code` every `_step_period_us`
(at least `10`, rounded down to a multiple of 10 us), then holds `_min_code` for `_pause_ms` before repeating.
- Sweep codes are raw DAC codes: the laser current DAC uses the same units as `laser2_current`, the STM32 DAC `0..4095`.
- The laser 2 current sweep only runs in `auto_run=true` profiles, because it needs the laser to be driven.
- `ds1809_position_from_min` is clamped to the valid `0..63` range by the firmware.
- When `ds1809_apply=true`, the firmware first drives the potentiometer fully down and then steps it up to the requested absolute position.