All LoRa TX responses are now formatted as messages to server.

This commit is contained in:
marcel
2022-05-02 17:35:40 +02:00
parent 1736691e77
commit b6eec82d6c
8 changed files with 27719 additions and 27425 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -102,27 +102,29 @@ int main() {
// Send status of output pins
case 6 :
if (Status.PowerSupply24V == ON)
Status.StatusString[4] = '1';
else
Status.StatusString[4] = '0';
if (Status.PowerSupply12V == ON)
Status.StatusString[3] = '1';
else
Status.StatusString[3] = '0';
if (Status.PowerSupply12V == ON)
if (Status.PowerSupply5V == ON)
Status.StatusString[2] = '1';
else
Status.StatusString[2] = '0';
if (Status.PowerSupply5V == ON)
if (Status.ControlRelay == ON)
Status.StatusString[1] = '1';
else
Status.StatusString[1] = '0';
if (Status.ControlRelay == ON)
Status.StatusString[0] = '1';
else
Status.StatusString[0] = '0';
ComposeAprsFrame(Status.StatusString);
break;
// Switch off 24V power supply
case 30 :
gpio_put(PowerSupply24VControl, 0);
@@ -367,20 +369,7 @@ uint16_t decode_packet ()
while( aprs_message[position] != 0 )
{
if ( aprs_message[position] == '{' ) {
aprs_acknowledge_number[cnt++] = ':';
while ( AprsSettings.ServerCall[cnt-1] != 0 )
{
aprs_acknowledge_number[cnt] = AprsSettings.ServerCall[cnt-1];
cnt++;
}
//Fill with spaces
while ( cnt<10 )
{
aprs_acknowledge_number[cnt++] = ' ';
}
aprs_acknowledge_number[cnt++] = ':';
aprs_acknowledge_number[cnt++] = 'a';
aprs_acknowledge_number[cnt++] = 'c';
aprs_acknowledge_number[cnt++] = 'k';
@@ -518,7 +507,24 @@ void ComposeAprsFrame(uint8_t payload[])
txBuffer[BufferPosition++] = AprsSettings.Path2[cnt];
cnt++;
}
txBuffer[BufferPosition++] = ':';
txBuffer[BufferPosition++] = ':';
cnt=0;
while ( AprsSettings.ServerCall[cnt] != 0 )
{
txBuffer[BufferPosition++] = AprsSettings.ServerCall[cnt];
cnt++;
}
//Fill with spaces
while ( cnt<9 )
{
txBuffer[BufferPosition++] = ' ';
cnt++;
}
txBuffer[BufferPosition++] = ':';
cnt=0;
@@ -529,7 +535,7 @@ void ComposeAprsFrame(uint8_t payload[])
}
// Set variable to indicate a send request
TransmitRequest = true;
TransmitRequest = true;
printf("%s\n", txBuffer);
}