1
0
Fork 0

make route manager input case insensitive

This commit is contained in:
mfranz 2008-06-06 07:49:41 +00:00
parent d4d14ba5ba
commit b27f73f4f4
2 changed files with 10 additions and 9 deletions

View file

@ -408,22 +408,22 @@ bool FGRouteMgr::near_ground() {
// command interface /autopilot/route-manager/input: // command interface /autopilot/route-manager/input:
// //
// @clear ... clear route // @CLEAR ... clear route
// @pop ... remove first entry // @POP ... remove first entry
// @delete3 ... delete 4th entry // @DELETE3 ... delete 4th entry
// @insert2:ksfo@900 ... insert "ksfo@900" as 3rd entry // @INSERT2:KSFO@900 ... insert "KSFO@900" as 3rd entry
// ksfo@900 ... append "ksfo@900" // KSFO@900 ... append "KSFO@900"
// //
void FGRouteMgr::Listener::valueChanged(SGPropertyNode *prop) void FGRouteMgr::Listener::valueChanged(SGPropertyNode *prop)
{ {
const char *s = prop->getStringValue(); const char *s = prop->getStringValue();
if (!strcmp(s, "@clear")) if (!strcmp(s, "@CLEAR"))
mgr->init(); mgr->init();
else if (!strcmp(s, "@pop")) else if (!strcmp(s, "@POP"))
mgr->pop_waypoint(0); mgr->pop_waypoint(0);
else if (!strncmp(s, "@delete", 7)) else if (!strncmp(s, "@DELETE", 7))
mgr->pop_waypoint(atoi(s + 7)); mgr->pop_waypoint(atoi(s + 7));
else if (!strncmp(s, "@insert", 7)) { else if (!strncmp(s, "@INSERT", 7)) {
char *r; char *r;
int pos = strtol(s + 7, &r, 10); int pos = strtol(s + 7, &r, 10);
if (*r++ != ':') if (*r++ != ':')

View file

@ -987,6 +987,7 @@ bool fgMainInit( int argc, char **argv ) {
upper_case_property("/sim/presets/airport-id"); upper_case_property("/sim/presets/airport-id");
upper_case_property("/sim/presets/runway"); upper_case_property("/sim/presets/runway");
upper_case_property("/sim/tower/airport-id"); upper_case_property("/sim/tower/airport-id");
upper_case_property("/autopilot/route-manager/input");
// Scan the config file(s) and command line options to see if // Scan the config file(s) and command line options to see if
// fg_root was specified (ignore all other options for now) // fg_root was specified (ignore all other options for now)