iSwitch position changes.
This commit is contained in:
parent
ff9258528c
commit
a01bbf5a28
1 changed files with 7 additions and 7 deletions
|
@ -912,7 +912,7 @@ bool FGATC610x::do_radio_switches() {
|
||||||
|
|
||||||
if ( navcom1_has_power() && comm1_serviceable->getBoolValue() ) {
|
if ( navcom1_has_power() && comm1_serviceable->getBoolValue() ) {
|
||||||
// Com1 Swap
|
// Com1 Swap
|
||||||
int com1_swap = !((radio_switch_data[7] >> 1) & 0x01);
|
int com1_swap = ((radio_switch_data[7] >> 1) & 0x01);
|
||||||
static int last_com1_swap;
|
static int last_com1_swap;
|
||||||
if ( com1_swap && (last_com1_swap != com1_swap) ) {
|
if ( com1_swap && (last_com1_swap != com1_swap) ) {
|
||||||
float tmp = com1_freq->getFloatValue();
|
float tmp = com1_freq->getFloatValue();
|
||||||
|
@ -929,7 +929,7 @@ bool FGATC610x::do_radio_switches() {
|
||||||
|
|
||||||
if ( navcom2_has_power() && comm2_serviceable->getBoolValue() ) {
|
if ( navcom2_has_power() && comm2_serviceable->getBoolValue() ) {
|
||||||
// Com2 Swap
|
// Com2 Swap
|
||||||
int com2_swap = !((radio_switch_data[15] >> 1) & 0x01);
|
int com2_swap = ((radio_switch_data[15] >> 1) & 0x01);
|
||||||
static int last_com2_swap;
|
static int last_com2_swap;
|
||||||
if ( com2_swap && (last_com2_swap != com2_swap) ) {
|
if ( com2_swap && (last_com2_swap != com2_swap) ) {
|
||||||
float tmp = com2_freq->getFloatValue();
|
float tmp = com2_freq->getFloatValue();
|
||||||
|
@ -955,7 +955,7 @@ bool FGATC610x::do_radio_switches() {
|
||||||
|
|
||||||
if ( navcom2_has_power() && nav2_serviceable->getBoolValue() ) {
|
if ( navcom2_has_power() && nav2_serviceable->getBoolValue() ) {
|
||||||
// Nav2 Swap
|
// Nav2 Swap
|
||||||
int nav2_swap = !(radio_switch_data[19] & 0x01);
|
int nav2_swap = (radio_switch_data[19] & 0x01);
|
||||||
static int last_nav2_swap;
|
static int last_nav2_swap;
|
||||||
if ( nav2_swap && (last_nav2_swap != nav2_swap) ) {
|
if ( nav2_swap && (last_nav2_swap != nav2_swap) ) {
|
||||||
float tmp = nav2_freq->getFloatValue();
|
float tmp = nav2_freq->getFloatValue();
|
||||||
|
@ -1252,9 +1252,9 @@ bool FGATC610x::do_radio_switches() {
|
||||||
|
|
||||||
// ADF buttons
|
// ADF buttons
|
||||||
fgSetInt( "/radios/kr-87/inputs/adf-btn",
|
fgSetInt( "/radios/kr-87/inputs/adf-btn",
|
||||||
!(radio_switch_data[23] & 0x01) );
|
(radio_switch_data[23] & 0x01) );
|
||||||
fgSetInt( "/radios/kr-87/inputs/bfo-btn",
|
fgSetInt( "/radios/kr-87/inputs/bfo-btn",
|
||||||
!(radio_switch_data[23] >> 1 & 0x01) );
|
(radio_switch_data[23] >> 1 & 0x01) );
|
||||||
#ifdef CURT_HARDWARE
|
#ifdef CURT_HARDWARE
|
||||||
fgSetInt( "/radios/kr-87/inputs/frq-btn",
|
fgSetInt( "/radios/kr-87/inputs/frq-btn",
|
||||||
!(radio_switch_data[23] >> 2 & 0x01) );
|
!(radio_switch_data[23] >> 2 & 0x01) );
|
||||||
|
@ -1263,9 +1263,9 @@ bool FGATC610x::do_radio_switches() {
|
||||||
(radio_switch_data[23] >> 2 & 0x01) );
|
(radio_switch_data[23] >> 2 & 0x01) );
|
||||||
#endif
|
#endif
|
||||||
fgSetInt( "/radios/kr-87/inputs/flt-et-btn",
|
fgSetInt( "/radios/kr-87/inputs/flt-et-btn",
|
||||||
!(radio_switch_data[23] >> 3 & 0x01) );
|
(radio_switch_data[23] >> 3 & 0x01) );
|
||||||
fgSetInt( "/radios/kr-87/inputs/set-rst-btn",
|
fgSetInt( "/radios/kr-87/inputs/set-rst-btn",
|
||||||
!(radio_switch_data[23] >> 4 & 0x01) );
|
(radio_switch_data[23] >> 4 & 0x01) );
|
||||||
fgSetInt( "/radios/kr-87/inputs/power-btn",
|
fgSetInt( "/radios/kr-87/inputs/power-btn",
|
||||||
radio_switch_data[23] >> 5 & 0x01 );
|
radio_switch_data[23] >> 5 & 0x01 );
|
||||||
/* cout << "adf = " << !(radio_switch_data[23] & 0x01)
|
/* cout << "adf = " << !(radio_switch_data[23] & 0x01)
|
||||||
|
|
Loading…
Add table
Reference in a new issue