update const String
This commit is contained in:
parent
505bb3d5a4
commit
bbc1996918
|
|
@ -181,7 +181,6 @@ namespace BME_Utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
String readDataSensor() {
|
String readDataSensor() {
|
||||||
String wx, tempStr, humStr, presStr;
|
|
||||||
switch (wxModuleType) {
|
switch (wxModuleType) {
|
||||||
case 1: // BME280
|
case 1: // BME280
|
||||||
bme280.takeForcedMeasurement();
|
bme280.takeForcedMeasurement();
|
||||||
|
|
@ -214,20 +213,23 @@ namespace BME_Utils {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String wx;
|
||||||
if (isnan(newTemp) || isnan(newHum) || isnan(newPress)) {
|
if (isnan(newTemp) || isnan(newHum) || isnan(newPress)) {
|
||||||
Serial.println("BME/BMP/Si7021 Module data failed");
|
Serial.println("BME/BMP/Si7021 Module data failed");
|
||||||
wx = ".../...g...t...r...p...P...h..b.....";
|
wx = ".../...g...t...r...p...P...h..b.....";
|
||||||
fifthLine = "";
|
fifthLine = "";
|
||||||
return wx;
|
return wx;
|
||||||
} else {
|
} else {
|
||||||
tempStr = generateTempString(((newTemp + Config.bme.temperatureCorrection) * 1.8) + 32);
|
String tempStr = generateTempString(((newTemp + Config.bme.temperatureCorrection) * 1.8) + 32);
|
||||||
|
|
||||||
|
String humStr;
|
||||||
if (wxModuleType == 1 || wxModuleType == 3 || wxModuleType == 4) {
|
if (wxModuleType == 1 || wxModuleType == 3 || wxModuleType == 4) {
|
||||||
humStr = generateHumString(newHum);
|
humStr = generateHumString(newHum);
|
||||||
} else if (wxModuleType == 2) {
|
} else if (wxModuleType == 2) {
|
||||||
humStr = "..";
|
humStr = "..";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String presStr;
|
||||||
if (wxModuleAddress == 4) {
|
if (wxModuleAddress == 4) {
|
||||||
presStr = ".....";
|
presStr = ".....";
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ namespace DIGI_Utils {
|
||||||
packetToRepeat += APRS_IS_Utils::checkForStartingBytes(packet.substring(packet.indexOf(":}")));
|
packetToRepeat += APRS_IS_Utils::checkForStartingBytes(packet.substring(packet.indexOf(":}")));
|
||||||
} else {
|
} else {
|
||||||
packetToRepeat += APRS_IS_Utils::checkForStartingBytes(packet.substring(packet.indexOf(":")));
|
packetToRepeat += APRS_IS_Utils::checkForStartingBytes(packet.substring(packet.indexOf(":")));
|
||||||
}
|
}
|
||||||
return packetToRepeat;
|
return packetToRepeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -46,7 +46,7 @@ namespace DIGI_Utils {
|
||||||
temp = packet.substring(packet.indexOf(">") + 1, packet.indexOf(":"));
|
temp = packet.substring(packet.indexOf(">") + 1, packet.indexOf(":"));
|
||||||
}
|
}
|
||||||
if (temp.indexOf(",") > 2) { // checks for path
|
if (temp.indexOf(",") > 2) { // checks for path
|
||||||
const String& path = temp.substring(temp.indexOf(",") + 1);
|
const String& path = temp.substring(temp.indexOf(",") + 1); // after tocall
|
||||||
if (path.indexOf(Config.beacon.path) != -1) {
|
if (path.indexOf(Config.beacon.path) != -1) {
|
||||||
return buildPacket(path, packet, thirdParty);
|
return buildPacket(path, packet, thirdParty);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue