Applied changes for rawgps cli test mode.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1763 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
dhcorley@msn.com 2011-03-09 14:48:49 +00:00
parent 8435b3bd25
commit ecca178dfe
1 changed files with 18 additions and 0 deletions

View File

@ -20,6 +20,7 @@ static int8_t test_pressure(uint8_t argc, const Menu::arg *argv);
static int8_t test_mag(uint8_t argc, const Menu::arg *argv);
static int8_t test_xbee(uint8_t argc, const Menu::arg *argv);
static int8_t test_eedump(uint8_t argc, const Menu::arg *argv);
static int8_t test_rawgps(uint8_t argc, const Menu::arg *argv);
// This is the help function
// PSTR is an AVR macro to read strings from flash memory
@ -63,6 +64,7 @@ const struct Menu::command test_menu_commands[] PROGMEM = {
{"compass", test_mag},
{"xbee", test_xbee},
{"eedump", test_eedump},
{"rawgps", test_rawgps},
};
// A Macro to create the Menu
@ -763,6 +765,22 @@ test_wp_print(struct Location *cmd, byte index)
cmd->lng);
}
static int8_t
test_rawgps(uint8_t argc, const Menu::arg *argv)
{
print_hit_enter();
delay(1000);
while(1){
if (Serial3.available())
Serial1.write(Serial3.read());
if (Serial1.available())
Serial3.write(Serial1.read());
if(Serial.available() > 0){
return (0);
}
}
}
static int8_t
test_xbee(uint8_t argc, const Menu::arg *argv)