improvement: use LoRa WX icon when using BME

This commit is contained in:
SQ2CPA 2024-04-04 17:58:07 +02:00
parent c8cde0a404
commit d16e407269
3 changed files with 7 additions and 3 deletions

View File

@ -87,7 +87,6 @@ namespace GPS_Utils {
} else {}
beaconPacket += ":=" + stationLatitude + Config.beacon.overlay + stationLongitude + Config.beacon.symbol;
beaconPacket += Config.beacon.comment;
return beaconPacket;
}

View File

@ -108,10 +108,11 @@ namespace Utils {
if (Config.bme.active) {
String sensorData = BME_Utils::readDataSensor();
beaconPacket = iGateBeaconPacket.substring(0,iGateBeaconPacket.indexOf(":=")+20) + "_" + sensorData + iGateBeaconPacket.substring(iGateBeaconPacket.indexOf(":=")+21);
beaconPacket = iGateBeaconPacket + sensorData + Config.beacon.comment;
secondaryBeaconPacket = iGateLoRaBeaconPacket + sensorData + Config.beacon.comment;
} else {
beaconPacket = iGateBeaconPacket;
beaconPacket = iGateBeaconPacket + Config.beacon.comment;
secondaryBeaconPacket = iGateLoRaBeaconPacket + Config.beacon.comment;
}

View File

@ -158,6 +158,10 @@ namespace WEB_Utils {
Config.lowPowerMode = request->hasParam("other.lowPowerMode", true);
Config.lowVoltageCutOff = request->getParam("other.lowVoltageCutOff", true)->value().toDouble();
if (Config.bme.active) {
Config.beacon.symbol = "_";
}
Config.writeFile();
AsyncWebServerResponse *response = request->beginResponse(302, "text/html", "");