Read and publish states of master switches (bat, alt, avionics.)
Read and publish states of toggle switches and circuit breakers.
This commit is contained in:
parent
d53b005a41
commit
d16f082500
1 changed files with 35 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue