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.
This commit is contained in:
mikecarper committed 2026-10-22 18:56:32 -07:00
1 parent 94a3b7e568
commit ab6412e73c
108 files changed
+1303 -83

No files matched your search

+1 -1
View File
@@ -33,6 +33,6 @@ uint16_t ThinkNodeM8Board::getBattMilliVolts() {
// Convert the raw value to compensated mv, taking the resistor-
// divider into account (providing the actual LIPO voltage)
digitalWrite(ADC_EN, LOW);
return (uint16_t)((float)adcvalue * REAL_VBAT_MV_PER_LSB);
return calibrateBatteryMillivolts((uint16_t)((float)adcvalue * REAL_VBAT_MV_PER_LSB));
}
#endif