Add a Kconfig voltage-class choice (BMU_PACK_CLASS: 24V default / 48V) plus an sdkconfig.defaults.48v overlay, implementing lot 4 of the 48V design note. 48V class defaults: min 44600 mV (3.43 V/cell, same fleet policy as 24V), max 55200 mV (charger CV 54.6 V + 600 mV margin), imbalance 2000 mV (x13/7), VRM SOC window 44600-53500 mV. Blocking fixes found while implementing: - bmu_protection: plausibility guard rejected any reading above 35 V as an I2C glitch -> class macro BMU_V_PLAUSIBLE_MAX_MV. - bmu_ina237: BOVL/BUVL hardwired 30000/24000 -> programmed from runtime thresholds (NVS/Kconfig) at init; log real values. - bmu_ble control + display steppers: hardcoded 20-30/25-35 V setting bounds rejected any 48V config -> class-derived macros BMU_VMIN/VMAX_SET_FLOOR/CEIL_MV in bmu_config.h. - bmu_ui_detail: chart autoscale seeds 35000/15000 broke above 35 V -> neutral 65535/0. - bmu_ble_victron: SOC window hardcoded 24.0/28.8 -> reads the VRM Kconfig (class fallback when VRM disabled). - legacy firmware/src/config.h: BATTERY_PACK_CLASS_48V ifdef. Validated: idf.py build green for both classes (esp32s3, isolated sdkconfig; 48V generates 44600/55200/2000), no new warnings in touched files, legacy sim-host tests 13/13 pass. NVS erase needed when reflashing a board that has 24V thresholds persisted.
7 lines
314 B
Plaintext
7 lines
314 B
Plaintext
# Overlay classe 48 V (packs 13s Li-ion, hardware BMU-v2-48v).
|
|
# Build :
|
|
# idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.48v" build
|
|
# (supprimer le sdkconfig existant ou effacer la NVS si des seuils 24 V
|
|
# y sont déjà persistés — cf. CLAUDE.md "Erase NVS")
|
|
CONFIG_BMU_PACK_CLASS_48V=y
|