From 732a36960ee279ccca2bfb757c6a339e2273b4fc Mon Sep 17 00:00:00 2001 From: "dhcorley@msn.com" Date: Mon, 6 Jun 2011 13:35:46 +0000 Subject: [PATCH] sync rawgps test with APM 2x rawgps test git-svn-id: https://arducopter.googlecode.com/svn/trunk@2501 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- ArduCopterMega/test.pde | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/ArduCopterMega/test.pde b/ArduCopterMega/test.pde index 715997ba54..75c804c654 100644 --- a/ArduCopterMega/test.pde +++ b/ArduCopterMega/test.pde @@ -780,18 +780,23 @@ test_wp(uint8_t argc, const Menu::arg *argv) static int8_t test_rawgps(uint8_t argc, const Menu::arg *argv) { - print_hit_enter(); - delay(1000); + print_hit_enter(); + delay(1000); - while(1){ - if (Serial1.available()){ - digitalWrite(B_LED_PIN, HIGH); // Blink Yellow LED if we are sending data to GPS - Serial.write(Serial1.read()); - digitalWrite(B_LED_PIN, LOW); - } - if(Serial.available() > 0){ - return (0); - } + while(1){ + if (Serial3.available()){ + digitalWrite(B_LED_PIN, HIGH); // Blink Yellow LED if we are sending data to GPS + Serial1.write(Serial3.read()); + 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); + } } }