|
|
|
|
@ -869,6 +869,30 @@ for (int j = 0; j < frameCnt; j++)
|
|
|
|
|
//printf("Before 1st strcpy\n");
|
|
|
|
|
strcat(cw_str2, cw_footer2);
|
|
|
|
|
//printf("Before 1st strcpy\n");
|
|
|
|
|
|
|
|
|
|
// read payload sensor if available
|
|
|
|
|
|
|
|
|
|
if (payload == ON)
|
|
|
|
|
{
|
|
|
|
|
char c;
|
|
|
|
|
unsigned int waitTime;
|
|
|
|
|
int i;
|
|
|
|
|
// for(i = 0; i < 2; i++)
|
|
|
|
|
// {
|
|
|
|
|
serialPutchar (uart_fd, '?');
|
|
|
|
|
printf("Querying payload with ?\n");
|
|
|
|
|
waitTime = millis() + 500;
|
|
|
|
|
while (millis() < waitTime)
|
|
|
|
|
{
|
|
|
|
|
int chars = serialDataAvail (uart_fd);
|
|
|
|
|
while (chars-- > 0)
|
|
|
|
|
{
|
|
|
|
|
printf ("%c", c = serialGetchar (uart_fd));
|
|
|
|
|
fflush (stdout);
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
digitalWrite (txLed, txLedOn);
|
|
|
|
|
#ifdef DEBUG_LOGGING
|
|
|
|
|
printf("Tx LED On\n");
|
|
|
|
|
|