- node = fgGetNode("/controls/switches", true);
- tempnode = node->getChild("master-bat");
- if ( tempnode != NULL ) {
- net->master_bat = tempnode->getBoolValue();
- }
- tempnode = node->getChild("master-alt");
- if ( tempnode != NULL ) {
- net->master_alt = tempnode->getBoolValue();
- }
- tempnode = node->getChild("master-avionics");
- if ( tempnode != NULL ) {
- net->master_avionics = tempnode->getBoolValue();
- }
+ net->gear_handle = fgGetBool( "/controls/gear/gear-down" );
+
+ net->master_avionics = fgGetBool("/controls/switches/master-avionics");