From d16f08250074addee4b7534c789f80f9217d225d Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 25 Sep 2002 22:09:38 +0000 Subject: [PATCH] Read and publish states of master switches (bat, alt, avionics.) Read and publish states of toggle switches and circuit breakers. --- src/Network/atc610x.cxx | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/Network/atc610x.cxx b/src/Network/atc610x.cxx index 35c2c3be0..65b70125b 100644 --- a/src/Network/atc610x.cxx +++ b/src/Network/atc610x.cxx @@ -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; } -- 2.39.5