Files
MeshCore/src/helpers/BatteryCalibrationStore.h
T
mikecarper ab6412e73c Add persistent battery ADC calibration across boards
Add meter-reference calibration with saved ADC corrections, checked persistence and rollback. Preserve existing board coefficients and nRF52 voltage policy, and merge the Mini Repeater feature gates.

Validation: 69 focused tests, hosted documentation checks, and four firmware builds passed. Mini Repeater retains calibration and its existing filesystem with 376 flash bytes free; earlier Mini Sensor size failures remain documented.
2026-10-22 18:56:32 -07:00

19 lines
780 B
C++

#pragma once
#include <MeshCore.h>
#include <helpers/IdentityStore.h>
namespace mesh { namespace power {
// Companion and Terminal Chat keep calibration outside their published
// preference layouts. Infrastructure roles retain their existing ADC field.
bool beginBatteryCalibrationStore(MainBoard& board, FILESYSTEM* fs);
bool setStoredAdcMultiplier(MainBoard& board, float multiplier,
char* reply, size_t capacity);
bool handleStoredAdcMultiplierCommand(MainBoard& board, const char* command,
char* reply, size_t capacity);
bool handleStoredBatteryCalibrationCommand(MainBoard& board, const char* command,
char* reply, size_t capacity);
}} // namespace mesh::power