]> git.mxchange.org Git - flightgear.git/commitdiff
make route manager input case insensitive
authormfranz <mfranz>
Fri, 6 Jun 2008 07:49:41 +0000 (07:49 +0000)
committermfranz <mfranz>
Fri, 6 Jun 2008 07:49:41 +0000 (07:49 +0000)
src/Autopilot/route_mgr.cxx
src/Main/main.cxx

index 3cac4bd303e54ffc638294f07dedf7c2aad6bbb4..79566bbdbff057098703ef632c3e6c822cd97da7 100644 (file)
@@ -408,22 +408,22 @@ bool FGRouteMgr::near_ground() {
 
 // command interface /autopilot/route-manager/input:
 //
-//   @clear             ... clear route
-//   @pop               ... remove first entry
-//   @delete3           ... delete 4th entry
-//   @insert2:ksfo@900  ... insert "ksfo@900" as 3rd entry
-//   ksfo@900           ... append "ksfo@900"
+//   @CLEAR             ... clear route
+//   @POP               ... remove first entry
+//   @DELETE3           ... delete 4th entry
+//   @INSERT2:KSFO@900  ... insert "KSFO@900" as 3rd entry
+//   KSFO@900           ... append "KSFO@900"
 //
 void FGRouteMgr::Listener::valueChanged(SGPropertyNode *prop)
 {
     const char *s = prop->getStringValue();
-    if (!strcmp(s, "@clear"))
+    if (!strcmp(s, "@CLEAR"))
         mgr->init();
-    else if (!strcmp(s, "@pop"))
+    else if (!strcmp(s, "@POP"))
         mgr->pop_waypoint(0);
-    else if (!strncmp(s, "@delete", 7))
+    else if (!strncmp(s, "@DELETE", 7))
         mgr->pop_waypoint(atoi(s + 7));
-    else if (!strncmp(s, "@insert", 7)) {
+    else if (!strncmp(s, "@INSERT", 7)) {
         char *r;
         int pos = strtol(s + 7, &r, 10);
         if (*r++ != ':')
index 4a293ffb873d657924b268ba3aa99914b5bdcc37..fd6d07818540301b357357ddad471ec2be6e48e5 100644 (file)
@@ -987,6 +987,7 @@ bool fgMainInit( int argc, char **argv ) {
     upper_case_property("/sim/presets/airport-id");
     upper_case_property("/sim/presets/runway");
     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
     // fg_root was specified (ignore all other options for now)