mirror of https://github.com/ArduPilot/ardupilot
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:
parent
8435b3bd25
commit
ecca178dfe
|
@ -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_mag(uint8_t argc, const Menu::arg *argv);
|
||||||
static int8_t test_xbee(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_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
|
// This is the help function
|
||||||
// PSTR is an AVR macro to read strings from flash memory
|
// 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},
|
{"compass", test_mag},
|
||||||
{"xbee", test_xbee},
|
{"xbee", test_xbee},
|
||||||
{"eedump", test_eedump},
|
{"eedump", test_eedump},
|
||||||
|
{"rawgps", test_rawgps},
|
||||||
};
|
};
|
||||||
|
|
||||||
// A Macro to create the Menu
|
// A Macro to create the Menu
|
||||||
|
@ -763,6 +765,22 @@ test_wp_print(struct Location *cmd, byte index)
|
||||||
cmd->lng);
|
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
|
static int8_t
|
||||||
test_xbee(uint8_t argc, const Menu::arg *argv)
|
test_xbee(uint8_t argc, const Menu::arg *argv)
|
||||||
|
|
Loading…
Reference in New Issue