mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-28 16:52:33 +01:00
switch and display cleaning
This commit is contained in:
@@ -122,13 +122,10 @@ namespace BME_Utils {
|
||||
switch (strTemp.length()) {
|
||||
case 1:
|
||||
return "00" + strTemp;
|
||||
break;
|
||||
case 2:
|
||||
return "0" + strTemp;
|
||||
break;
|
||||
case 3:
|
||||
return strTemp;
|
||||
break;
|
||||
default:
|
||||
return "-999";
|
||||
}
|
||||
@@ -140,17 +137,14 @@ namespace BME_Utils {
|
||||
switch (strHum.length()) {
|
||||
case 1:
|
||||
return "0" + strHum;
|
||||
break;
|
||||
case 2:
|
||||
return strHum;
|
||||
break;
|
||||
case 3:
|
||||
if ((int)bmeHum == 100) {
|
||||
return "00";
|
||||
} else {
|
||||
return "-99";
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return "-99";
|
||||
}
|
||||
@@ -162,19 +156,14 @@ namespace BME_Utils {
|
||||
switch (strPress.length()) {
|
||||
case 1:
|
||||
return "000" + strPress + decPress;
|
||||
break;
|
||||
case 2:
|
||||
return "00" + strPress + decPress;
|
||||
break;
|
||||
case 3:
|
||||
return "0" + strPress + decPress;
|
||||
break;
|
||||
case 4:
|
||||
return strPress + decPress;
|
||||
break;
|
||||
case 5:
|
||||
return strPress;
|
||||
break;
|
||||
default:
|
||||
return "-99999";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user