Hey Everybody,
I have a form as shown in the attachment. I want to remain on this form as long as I am trying to manually navigate and I would like to continuously update the GPS coordinates (every 1-2 seconds) UNTIL the BACK button is pressed.
I have a getInput() function in the main loop of my code. But when I get to this form, I am no longer in that loop. So created another loop within the manualNavigation() function to getInput() and look at the 3rd byte which is the INDEX. In my case the BACK button INDEX byte is 0x0E. Even while polling while(rx_byte[2] != 0x0E), I cannot seem to exit the while loop even if I press the BACK button.
Is there any type of interrupt that I can use with a button press?
void manualNavigate(void)
{
thrusterMasterPower(1); // turn on thruster master power
delay(100); // wait for thruster to respond
while(rx_byte[2] != 0x0E)
{
getCurrentGPS();
updateCurrentGPSLatCoords(0x02, 0x00);
updateCurrentGPSLonCoords(0x02, 0x07);
delay(25);
getInput();
delay(25);
}
}
TIA,
--Neal
I have a form as shown in the attachment. I want to remain on this form as long as I am trying to manually navigate and I would like to continuously update the GPS coordinates (every 1-2 seconds) UNTIL the BACK button is pressed.
I have a getInput() function in the main loop of my code. But when I get to this form, I am no longer in that loop. So created another loop within the manualNavigation() function to getInput() and look at the 3rd byte which is the INDEX. In my case the BACK button INDEX byte is 0x0E. Even while polling while(rx_byte[2] != 0x0E), I cannot seem to exit the while loop even if I press the BACK button.
Is there any type of interrupt that I can use with a button press?
void manualNavigate(void)
{
thrusterMasterPower(1); // turn on thruster master power
delay(100); // wait for thruster to respond
while(rx_byte[2] != 0x0E)
{
getCurrentGPS();
updateCurrentGPSLatCoords(0x02, 0x00);
updateCurrentGPSLonCoords(0x02, 0x07);
delay(25);
getInput();
delay(25);
}
}
TIA,
--Neal
Comment