|
|
@ -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'; |
|
|
@ -519,6 +508,23 @@ void ComposeAprsFrame(uint8_t payload[]) |
|
|
|
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; |
|
|
|