battery voltage display
This commit is contained in:
parent
07dbe08833
commit
12be543010
@ -48,7 +48,7 @@ uint16_t read_voltage(void) {
|
||||
#ifdef BATT_FACTOR
|
||||
voltage *= BATT_FACTOR;
|
||||
#endif
|
||||
ESP_LOGI(TAG, "Raw: %d / Voltage: %dmV", adc_reading, voltage);
|
||||
ESP_LOGD(TAG, "Raw: %d / Voltage: %dmV", adc_reading, voltage);
|
||||
return voltage;
|
||||
}
|
||||
#endif // HAS_BATTERY_PROBE
|
@ -185,10 +185,6 @@ void sendPayload() {
|
||||
SendCycleTimerIRQ = 0;
|
||||
portEXIT_CRITICAL(&timerMux);
|
||||
|
||||
#ifdef HAS_BATTERY_PROBE
|
||||
batt_volt = read_voltage();
|
||||
#endif
|
||||
|
||||
// append counter data to payload
|
||||
payload.reset();
|
||||
payload.addCount(macs_wifi, cfg.blescan ? macs_ble : 0);
|
||||
@ -436,6 +432,10 @@ void loop() {
|
||||
readButton();
|
||||
#endif
|
||||
|
||||
#ifdef HAS_BATTERY_PROBE
|
||||
batt_volt = read_voltage();
|
||||
#endif
|
||||
|
||||
#ifdef HAS_DISPLAY
|
||||
updateDisplay();
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user