cosmetic: battery related stuff

This commit is contained in:
Mikkeli Matlock
2026-02-16 14:39:21 +09:00
parent a25e4b2cb3
commit 7165f56464
7 changed files with 40 additions and 7 deletions

View File

@@ -43,7 +43,7 @@ static const int s_beep_count[ALERT_TYPE_COUNT] = {
0, /* SERVICE_DOWN: triple beep */ /* DISABLED FOR TESTING */
2, /* HIGH_TEMP: double beep */
0, /* WS_DISCONNECT: single beep */ /* DISABLED FOR TESTING */
1, /* CONNECT_OK: single short beep */
0, /* CONNECT_OK: single short beep */ /* DISABLED FOR TESTING */
};
static void generate_tone_buffer(void)

View File

@@ -219,10 +219,12 @@ static void sensor_task(void *arg)
s_shtc3->Shtc3_ReadTempHumi(&temp, &humidity);
s_shtc3->Shtc3_Sleep();
float batt_v = Adc_GetBatteryVoltage();
uint8_t batt = Adc_GetBatteryLevel();
bool charging = Adc_IsCharging();
if (Lvgl_lock(100)) {
dashboard_ui_update_local(temp, humidity, batt);
dashboard_ui_update_local(temp, humidity, batt, charging, batt_v);
Lvgl_unlock();
}
}