Bugfix: Empty Relay-Path leads to invalid packages

KISS_TNC
US1GHQ 2021-09-13 19:30:19 +03:00
parent 2c4ebf7b2d
commit cf9ad1d667
1 changed files with 4 additions and 3 deletions

View File

@ -301,9 +301,10 @@ void prepareAPRSFrame(){
outString += Tcall;
if (relay_path){
outString += ">APLS01," + relay_path + ":!";
outString += ">APLO01:!";
}else{
outString += ">APLS01:!";
outString += ">APLO01," + relay_path + ":!";
}
if(gps_state && gps.location.isValid()){
@ -606,7 +607,7 @@ void sendTelemetryFrame() {
String telemetryEquations = String(":") + Tcall + ":EQNS.0,5.1,3000,0,10,0,0,10,0,0,28,3000,0,10,0";
String telemetryData = String("T#MIC") + String(b_volt) + ","+ String(b_in_c) + ","+ String(b_out_c) + ","+ String(ac_volt) + ","+ String(ac_c) + ",00000000";
String telemetryBase = "";
telemetryBase += Tcall + ">APLS01" + ":";
telemetryBase += Tcall + ">APLO01" + ":";
sendToTNC(telemetryBase + telemetryParamsNames);
sendToTNC(telemetryBase + telemetryUnitNames);
sendToTNC(telemetryBase + telemetryEquations);