@@ -53,7 +53,7 @@ ConfigManager::ConfigManager()
5353 : IotWebConf2(thingName, &dnsServer, &server, initialApPassword, configVersion), server(80 ), gsConfigHtmlFormatProvider(*this ), boards({
5454 // OLED_add, OLED_SDA, OLED_SCL, OLED_RST, PROG_BUTTON, BOARD_LED, L_SX127X?, L_NSS, L_DI00, L_DI01, L_BUSSY, L_RST, L_MISO, L_MOSI, L_SCK, L_TCXO_V, RX_EN, TX_EN, ADC_CTL, BAT_AIN, VBAT_SCALE, BOARD
5555#if CONFIG_IDF_TARGET_ESP32S3
56- { 0x3c , 17 , 18 , 21 , 0 , 35 , RADIO_SX1262, 8 , UNUSED, 14 , 13 , 12 , 11 , 10 , 9 , 1 .6f , UNUSED, UNUSED, 37 , 1 , 0 . 00405f , " 150–960Mhz - HELTEC LORA32 V3 SX1262" }, // SX1262
56+ { 0x3c , 17 , 18 , 21 , 0 , 35 , RADIO_SX1262, 8 , UNUSED, 14 , 13 , 12 , 11 , 10 , 9 , 1 .6f , UNUSED, UNUSED, 37 , 1 , 5 . 1205f , " 150–960Mhz - HELTEC LORA32 V3 SX1262" }, // SX1262
5757 { 0x3c , 17 , 18 , UNUSED, 0 , 35 , RADIO_SX1278, 8 , 6 , 14 , UNUSED, 12 , 11 , 10 , 9 , 0 .0f , UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, " Custom ESP32-S3 433MHz SX1278" }, // SX1278 @g4lile0
5858 { 0x3c , 17 , 18 , UNUSED, 0 , 3 , RADIO_SX1262, 10 , UNUSED, 1 , 4 , 5 , 13 , 11 , 12 , 1 .6f , UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, " 433 Mhz TTGO T-Beam Sup SX1262 V1.0" }, // SX1268 @ Stephen
5959 { 0x3c , 17 , 18 , UNUSED, 0 , 37 , RADIO_SX1280, 7 , UNUSED, 9 , UNUSED, 8 , 3 , 6 , 5 , 0 .0f , 21 , 10 , UNUSED, UNUSED, UNUSED, " 2.4Ghz LILYGO SX1280" }, // SX1280 @ K4KDR
@@ -263,7 +263,11 @@ void ConfigManager::handleDashboard()
263263 s += " <tr><td>Radio </td><td>" + String (Radio::getInstance ().isReady () ? " <span class='G'>READY</span>" : " <span class='R'>NOT READY</span>" ) + " </td></tr>" ;
264264 s += " <tr><td>Noise floor </td><td>" + String (status.modeminfo .currentRssi ) + " </td></tr>" ;
265265 if (status.vbat > 0 ) {
266- s += " <tr><td>Battery </td><td>" + String (status.vbat ) + " V " + String (getBatteryPercentage ()) + " %</td></tr>" ;
266+ if (getBatteryPercentage () > 100 .0f ) { // Charging
267+ s += " <tr><td>Power </td><td>USB " + String (status.vbat ) + " V</span></td></tr>" ;
268+ } else {
269+ s += " <tr><td>Power </td><td>Bat " + String (getBatteryPercentage (), 0 ) + " %" + String (status.vbat ) + " V</span></td></tr>" ;
270+ }
267271 } else {
268272 // Empty if battery monitoring not enabled
269273 s += " <tr><td></td><td></td></tr>" ;
@@ -505,7 +509,11 @@ void ConfigManager::handleRefreshWorldmap()
505509 radio.currentRssi ();
506510 data_string += String (status.modeminfo .currentRssi ) + " ," ;
507511 if (status.vbat > 0 ) {
508- data_string += String (status.vbat ) + " V " + String (getBatteryPercentage ()) + " %," ;
512+ if (getBatteryPercentage () > 100 .0f ) { // Charging
513+ data_string += " USB " + String (status.vbat ) + " V," ;
514+ } else {
515+ data_string += " Bat " + String (getBatteryPercentage (), 0 ) + " % " + String (status.vbat ) + " V," ;
516+ }
509517 } else {
510518 // if battery monitoring not enabled
511519 data_string += " ," ;
0 commit comments