All LoRa TX responses are now formatted as messages to server.
This commit is contained in:
Binary file not shown.
Binary file not shown.
46352
build/src/main.dis
46352
build/src/main.dis
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
7487
build/src/main.hex
7487
build/src/main.hex
File diff suppressed because it is too large
Load Diff
Binary file not shown.
52
src/main.cpp
52
src/main.cpp
@@ -102,27 +102,29 @@ int main() {
|
|||||||
// Send status of output pins
|
// Send status of output pins
|
||||||
case 6 :
|
case 6 :
|
||||||
if (Status.PowerSupply24V == ON)
|
if (Status.PowerSupply24V == ON)
|
||||||
|
Status.StatusString[4] = '1';
|
||||||
|
else
|
||||||
|
Status.StatusString[4] = '0';
|
||||||
|
|
||||||
|
if (Status.PowerSupply12V == ON)
|
||||||
Status.StatusString[3] = '1';
|
Status.StatusString[3] = '1';
|
||||||
else
|
else
|
||||||
Status.StatusString[3] = '0';
|
Status.StatusString[3] = '0';
|
||||||
|
|
||||||
if (Status.PowerSupply12V == ON)
|
if (Status.PowerSupply5V == ON)
|
||||||
Status.StatusString[2] = '1';
|
Status.StatusString[2] = '1';
|
||||||
else
|
else
|
||||||
Status.StatusString[2] = '0';
|
Status.StatusString[2] = '0';
|
||||||
|
|
||||||
if (Status.PowerSupply5V == ON)
|
if (Status.ControlRelay == ON)
|
||||||
Status.StatusString[1] = '1';
|
Status.StatusString[1] = '1';
|
||||||
else
|
else
|
||||||
Status.StatusString[1] = '0';
|
Status.StatusString[1] = '0';
|
||||||
|
|
||||||
if (Status.ControlRelay == ON)
|
|
||||||
Status.StatusString[0] = '1';
|
|
||||||
else
|
|
||||||
Status.StatusString[0] = '0';
|
|
||||||
|
|
||||||
ComposeAprsFrame(Status.StatusString);
|
ComposeAprsFrame(Status.StatusString);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
// Switch off 24V power supply
|
// Switch off 24V power supply
|
||||||
case 30 :
|
case 30 :
|
||||||
gpio_put(PowerSupply24VControl, 0);
|
gpio_put(PowerSupply24VControl, 0);
|
||||||
@@ -367,20 +369,7 @@ uint16_t decode_packet ()
|
|||||||
while( aprs_message[position] != 0 )
|
while( aprs_message[position] != 0 )
|
||||||
{
|
{
|
||||||
if ( aprs_message[position] == '{' ) {
|
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++] = 'a';
|
||||||
aprs_acknowledge_number[cnt++] = 'c';
|
aprs_acknowledge_number[cnt++] = 'c';
|
||||||
aprs_acknowledge_number[cnt++] = 'k';
|
aprs_acknowledge_number[cnt++] = 'k';
|
||||||
@@ -518,7 +507,24 @@ void ComposeAprsFrame(uint8_t payload[])
|
|||||||
txBuffer[BufferPosition++] = AprsSettings.Path2[cnt];
|
txBuffer[BufferPosition++] = AprsSettings.Path2[cnt];
|
||||||
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++] = ':';
|
txBuffer[BufferPosition++] = ':';
|
||||||
|
|
||||||
cnt=0;
|
cnt=0;
|
||||||
@@ -529,7 +535,7 @@ void ComposeAprsFrame(uint8_t payload[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set variable to indicate a send request
|
// Set variable to indicate a send request
|
||||||
TransmitRequest = true;
|
TransmitRequest = true;
|
||||||
printf("%s\n", txBuffer);
|
printf("%s\n", txBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user