diff --git a/RX_FSK/RX_FSK.ino b/RX_FSK/RX_FSK.ino index 82c6a17..101735a 100644 --- a/RX_FSK/RX_FSK.ino +++ b/RX_FSK/RX_FSK.ino @@ -1929,6 +1929,7 @@ void setup() axp.clearIRQ(); } int ndevices = scanI2Cdevice(); + if (sonde.fingerprint == 31) { pinMode(35, INPUT); } if (sonde.fingerprint != 17 || ndevices > 0) break; // only retry for fingerprint 17 (startup problems of new t-beam with oled) delay(500); } diff --git a/RX_FSK/data/screens1.txt b/RX_FSK/data/screens1.txt index 47b9321..fa85afa 100644 --- a/RX_FSK/data/screens1.txt +++ b/RX_FSK/data/screens1.txt @@ -203,7 +203,7 @@ timeaction=#,#,# 7,0=gV 7,2=xd= 7,4=gD -7,12=gI° +7,12=gI° ############ @BatteryOLED @@ -211,16 +211,17 @@ timer=-1,-1,-1 key1action=+,0,F,W key2action=>,#,#,# timeaction=#,#,# -fonts=0,1 -0,0=xBat.Status: -0,12=bS -1,0=xBatt: -1,6=bVV -2,0=bCmA (charge) -3,0=bDmA (disch.) -4,0=xUSB: -4,5=bUV -5,5=bImA -6,0=xTemp: -6,5=bT C +fonts=1,1 +0,0=xBattery Status +0,16=bS +2,0=xVoltage: +fonts=7,7 +6,10=bVV +#2,0=bCmA (charge) +#3,0=bDmA (disch.) +#4,0=xUSB: +#4,5=bUV +#5,5=bImA +#6,0=xTemp: +#6,5=bT C diff --git a/libraries/SondeLib/Display.cpp b/libraries/SondeLib/Display.cpp index 727c2b0..31098f0 100644 --- a/libraries/SondeLib/Display.cpp +++ b/libraries/SondeLib/Display.cpp @@ -1560,7 +1560,23 @@ void Display::drawGPS(DispEntry *de) { void Display::drawBatt(DispEntry *de) { float val; char buf[30]; - if(!axp192_found) return; + if(!axp192_found && sonde.fingerprint != 31) return; + if (!axp192_found && sonde.fingerprint == 31) + { + xSemaphoreTake(axpSemaphore, portMAX_DELAY); + switch (de->extra[0]) + { + case 'V': + val = (float)(analogRead(35)) / 4095 * 2 * 3.3 * 1.1; + snprintf(buf, 30, "%.2f%s", val, de->extra + 1); + break; + default: + *buf = 0; + } + xSemaphoreGive(axpSemaphore); + rdis->setFont(de->fmt); + drawString(de, buf); + } else { xSemaphoreTake( axpSemaphore, portMAX_DELAY ); switch(de->extra[0]) { @@ -1602,6 +1618,7 @@ void Display::drawBatt(DispEntry *de) { xSemaphoreGive( axpSemaphore ); rdis->setFont(de->fmt); drawString(de, buf); + } } void Display::drawText(DispEntry *de) {