kopia lustrzana https://github.com/dl9rdz/rdz_ttgo_sonde
Merge branch 'eben80-displayvolts' into devel
commit
52e04f1d33
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Ładowanie…
Reference in New Issue