]> git.mxchange.org Git - flightgear.git/commitdiff
Read and publish states of master switches (bat, alt, avionics.)
authorcurt <curt>
Wed, 25 Sep 2002 22:09:38 +0000 (22:09 +0000)
committercurt <curt>
Wed, 25 Sep 2002 22:09:38 +0000 (22:09 +0000)
Read and publish states of toggle switches and circuit breakers.

src/Network/atc610x.cxx

index 35c2c3be01da9df614e3d5f0f0fb1fba850b068f..65b70125bfd299906fc2fb1f75cff90cd1b19d0b 100644 (file)
@@ -1492,6 +1492,12 @@ bool FGATC610x::do_switches() {
     int switch_matrix[2][ATC_NUM_COLS][ATC_SWITCH_BYTES];
     update_switch_matrix( board, switch_data, switch_matrix );
 
+    // master switches
+    fgSetBool( "/controls/switches/master-bat", switch_matrix[board][4][1] );
+    fgSetBool( "/controls/switches/master-alt", switch_matrix[board][5][1] );
+    fgSetBool( "/controls/switches/master-avionics",
+               switch_matrix[board][0][3] );
+
     // magnetos and starter switch
     int magnetos = 0;
     bool starter = false;
@@ -1529,6 +1535,17 @@ bool FGATC610x::do_switches() {
         fgSetBool( "/controls/starter[0]", starter );
     }
 
+    // other toggle switches
+    fgSetBool( "/controls/fuel-pump[0]", switch_matrix[board][0][2] );
+    fgSetBool( "/controls/switches/landing-light", switch_matrix[board][1][2] );
+    fgSetBool( "/controls/switches/flashing-beacon",
+               switch_matrix[board][2][2] );
+    fgSetBool( "/controls/switches/map-lights", switch_matrix[board][3][2] );
+    fgSetBool( "/controls/switches/instrument-lights",
+               switch_matrix[board][4][2] );
+    fgSetBool( "/controls/switches/strobe-lights", switch_matrix[board][5][2] );
+    fgSetBool( "/controls/switches/pitot-heat", switch_matrix[board][6][2] );
+
     // flaps
     float flaps = 0.0;
     if ( switch_matrix[board][6][3] ) {
@@ -1576,6 +1593,24 @@ bool FGATC610x::do_switches() {
         fgSetBool( "/controls/fuel-selector[1]", (fuel & 0x02) > 0 );
     }
 
+    // circuit breakers
+    fgSetBool( "/controls/circuit-breakers/cabin-lights-pwr",
+               switch_matrix[board][0][0] );
+    fgSetBool( "/controls/circuit-breakers/instr-ignition-switch",
+               switch_matrix[board][1][0] );
+    fgSetBool( "/controls/circuit-breakers/flaps",
+               switch_matrix[board][2][0] );
+    fgSetBool( "/controls/circuit-breakers/avn-bus-1",
+               switch_matrix[board][3][0] );
+    fgSetBool( "/controls/circuit-breakers/avn-bus-2",
+               switch_matrix[board][4][0] );
+    fgSetBool( "/controls/circuit-breakers/turn-coordinator",
+               switch_matrix[board][5][0] );
+    fgSetBool( "/controls/circuit-breakers/instrument-lights",
+               switch_matrix[board][6][0] );
+    fgSetBool( "/controls/circuit-breakers/annunciators",
+               switch_matrix[board][7][0] );
+
     return true;
 }