1
0
Fork 0

Read the com1/2 on/off switch.

This commit is contained in:
curt 2002-09-01 03:02:11 +00:00
parent f98eaad097
commit 692445fe3e

View file

@ -488,9 +488,11 @@ bool FGATC610x::do_analog_in() {
fgSetFloat( "/controls/throttle[0]", tmp );
fgSetFloat( "/controls/throttle[1]", tmp );
#if 0
// rudder
tmp = (float)(ATC_RUDDER_CENTER - analog_in_data[10]) / 145.0f;
fgSetFloat( "/controls/rudder", tmp );
#endif
// nav1 volume
tmp = (float)analog_in_data[25] / 1024.0f;
@ -571,6 +573,10 @@ bool FGATC610x::do_radio_switches() {
fgSetInt( "/radios/dme/switch-position", 3 );
}
// Com1 Power
fgSetBool( "/radios/comm[0]/inputs/power-btn",
radio_switch_data[7] & 0x01 );
// Com1 Swap
int com1_swap = !((radio_switch_data[7] >> 1) & 0x01);
static int last_com1_swap;
@ -582,6 +588,10 @@ bool FGATC610x::do_radio_switches() {
}
last_com1_swap = com1_swap;
// Com2 Power
fgSetBool( "/radios/comm[1]/inputs/power-btn",
radio_switch_data[15] & 0x01 );
// Com2 Swap
int com2_swap = !((radio_switch_data[15] >> 1) & 0x01);
static int last_com2_swap;