Hi,
We are trying to override the MeasureBattery() function on mDotEvent.h file, but we are not able to add any custom code, as the function always returns 255 to our server:
virtual uint8_t MeasureBattery(void) {
uint8_t batteryLevel = myXdotbat.getBatteryLevel();
return batteryLevel;
}
In the other hand, if we modify the function like this, we are able to receive 128 on our server.
virtual uint8_t MeasureBattery(void) {
return 128;
}
Our custom function is working when it’s included in main() function.
Link margin value is always working as expected.
Could you please provide guidance on how to modify the function properly?
Kind regards,