Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Sansa Connect: Display battery info in debug menu

Show battery temperature, current, discharge power and available energy
in battery debug menu.

Change-Id: I799af4e5ca7ec168d726e689264e0f092ebc2bf7

+15
+15
apps/debug_menu.c
··· 112 112 #include "pmu-target.h" 113 113 #endif 114 114 115 + #ifdef SANSA_CONNECT 116 + #include "avr-sansaconnect.h" 117 + #endif 118 + 115 119 #ifdef HAVE_USBSTACK 116 120 #include "usb_core.h" 117 121 #endif ··· 1091 1095 y = pmu_read(0x2d + (i << 1)) * 100 + 900; 1092 1096 lcd_putsf(0, 10 + i, "LDO%d: %x / %d mV", i + 1, x, y); 1093 1097 } 1098 + #elif defined(SANSA_CONNECT) 1099 + lcd_putsf(0, 3, "Charger: %s", 1100 + charger_inserted() ? "present" : "absent"); 1101 + x = (avr_hid_hdq_read_short(HDQ_REG_TEMP) / 4) - 273; 1102 + lcd_putsf(0, 4, "Battery temperature: %d C", x); 1103 + x = (avr_hid_hdq_read_short(HDQ_REG_AI) * 357) / 200; 1104 + lcd_putsf(0, 5, "Battery current: %d.%01d mA", x / 10, x % 10); 1105 + x = (avr_hid_hdq_read_short(HDQ_REG_AP) * 292) / 20; 1106 + lcd_putsf(0, 6, "Discharge power: %d.%01d mW", x / 10, x % 10); 1107 + x = (avr_hid_hdq_read_short(HDQ_REG_SAE) * 292) / 2; 1108 + lcd_putsf(0, 7, "Available energy: %d.%01d mWh", x / 10, x % 10); 1094 1109 #else 1095 1110 lcd_putsf(0, 3, "Charger: %s", 1096 1111 charger_inserted() ? "present" : "absent");