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.
30 lines
747 B
C++
30 lines
747 B
C++
#pragma once
|
|
|
|
#include <Arduino.h>
|
|
#include <helpers/RefCountedDigitalPin.h>
|
|
#include <helpers/ESP32Board.h>
|
|
#include <PCA9557.h>
|
|
|
|
extern PCA9557 expander;
|
|
|
|
class ThinknodeM5Board : public ESP32Board {
|
|
|
|
public:
|
|
|
|
void begin();
|
|
bool supportsBatteryCalibration() const override { return true; }
|
|
|
|
uint16_t getBattMilliVolts() override;
|
|
const char* getManufacturerName() const override ;
|
|
|
|
void applyLedPolicy() override {
|
|
if (!mesh::leds::enabled()) expander.digitalWrite(EXP_PIN_LED, LOW);
|
|
}
|
|
|
|
void onBeforeTransmit() override {
|
|
if (mesh::leds::enabled()) expander.digitalWrite(EXP_PIN_LED, HIGH); // turn TX LED on
|
|
}
|
|
void onAfterTransmit() override {
|
|
expander.digitalWrite(EXP_PIN_LED, LOW); // turn TX LED off
|
|
}
|
|
}; |