|
|
cea3eaff97
|
cleanup: Remove all Mamba/STM32/BlackPill references — ESP32-S3 only
- Renamed mamba_protocol.py → balance_protocol.py; updated all importers
- can_bridge_node.py rewritten to use balance_protocol.py API (ESP32-S3 BALANCE)
- test_can_bridge.py rewritten to test actual balance_protocol.py constants/functions
- All STM32/Mamba references in Python, YAML, Markdown, shell scripts replaced:
* Hardware: MAMBA F722S → ESP32-S3 BALANCE/IO
* Device paths: /dev/stm32-bridge → /dev/esp32-io
* Node names: stm32_serial_bridge → esp32_io_serial_bridge
* hardware_id: stm32f722 → esp32s3-balance/esp32s3-io
- C/C++ src/include/lib/test files: added DEPRECATED header comment
- Covers: saltybot_bridge, saltybot_can_bridge, saltybot_can_e2e_test,
saltybot_bringup, saltybot_diagnostics, saltybot_mode_switch, and all
chassis, docs, scripts, and project files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-04-04 08:56:09 -04:00 |
|
|
|
cc0ffd1999
|
feat: Battery voltage ADC driver with DMA sampling (Issue #533)
STM32F7 ADC driver for battery voltage/current monitoring using
DMA-based continuous sampling, IIR low-pass filter, voltage divider
calibration, and USART telemetry to Jetson. Integrates with power
management for low-battery sleep (Issue #467).
Implementation:
- include/battery_adc.h: New driver header with calibration struct and
public API (init, tick, get_voltage_mv, get_current_ma, calibrate,
publish, check_pm, is_low, is_critical)
- src/battery_adc.c: ADC3 continuous-scan DMA (DMA2_Stream0/Ch2), 4x
hardware oversampling of both Vbat (PC1/IN11) and Ibat (PC3/IN13),
IIR LPF (alpha=1/8, cutoff ~4 Hz at 100 Hz tick rate), calibration
with ±500 mV offset clamp, 3S/4S auto-detection, 1 Hz USART publish
- include/jlink.h + src/jlink.c: Add JLINK_TLM_BATTERY (0x82) telemetry
type and jlink_tlm_battery_t (10-byte packed struct), implement
jlink_send_battery_telemetry() using CRC16-XModem framing
- include/power_mgmt.h + src/power_mgmt.c: Add
power_mgmt_notify_battery() — triggers STOP-mode sleep when Vbat
sustains critical level (Issue #467)
- test/test_battery_adc.c: 27 unit tests (27/27 passing): voltage
conversion, calibration offset/scale, IIR LPF convergence, SoC
estimation (3S/4S), low/critical flags, PM notification timing,
calibration reset, publish rate-limiting
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-03-07 10:01:02 -05:00 |
|