Skip to content

Commit

Permalink
Report battery percentage over BLE battery service
Browse files Browse the repository at this point in the history
  • Loading branch information
markqvist committed Jan 18, 2025
1 parent 9473b9d commit 6bbcaa0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Power.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ void measure_battery() {
}
}

#if MCU_VARIANT == MCU_NRF52
if (bt_state != BT_STATE_OFF) { blebas.write(battery_percent); }
#endif

// if (bt_state == BT_STATE_CONNECTED) {
// SerialBT.printf("Bus voltage %.3fv. Unfiltered %.3fv.", battery_voltage, bat_v_samples[BAT_SAMPLES-1]);
// if (bat_voltage_dropping) { SerialBT.printf(" Voltage is dropping. Percentage %.1f%%.", battery_percent); }
Expand Down

0 comments on commit 6bbcaa0

Please sign in to comment.