battery voltage display

This commit is contained in:
Klaus K Wilting 2018-07-21 23:40:42 +02:00
parent 07dbe08833
commit 12be543010
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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