Update rawgps cli test with indicator LED.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1770 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
dhcorley@msn.com 2011-03-11 23:00:40 +00:00
parent 732446eb3a
commit 66c9ded2d8
1 changed files with 13 additions and 9 deletions

View File

@ -772,12 +772,16 @@ test_rawgps(uint8_t argc, const Menu::arg *argv)
delay(1000);
while(1){
if (Serial3.available())
if (Serial3.available()){
digitalWrite(B_LED_PIN, HIGH); // Blink Yellow LED if we are sending data to GPS
Serial1.write(Serial3.read());
if (Serial1.available())
digitalWrite(B_LED_PIN, LOW);
}
if (Serial1.available()){
digitalWrite(C_LED_PIN, HIGH); // Blink Red LED if we are receiving data from GPS
Serial3.write(Serial1.read());
digitalWrite(C_LED_PIN, LOW);
}
if(Serial.available() > 0){
return (0);
}