structure for future use. Right now they are tied together.
// ADF buttons
+#define CURT_HARDWARE
fgSetInt( "/radios/kr-87/inputs/adf-btn",
(radio_switch_data[23] & 0x01) );
fgSetInt( "/radios/kr-87/inputs/bfo-btn",
(radio_switch_data[23] >> 1 & 0x01) );
-#ifdef CURT_HARDWARE
- fgSetInt( "/radios/kr-87/inputs/frq-btn",
- !(radio_switch_data[23] >> 2 & 0x01) );
-#else
+
fgSetInt( "/radios/kr-87/inputs/frq-btn",
(radio_switch_data[23] >> 2 & 0x01) );
-#endif
+
+#ifdef CURT_HARDWARE
+ fgSetInt( "/radios/kr-87/inputs/flt-et-btn",
+ !(radio_switch_data[23] >> 3 & 0x01) );
+#else
fgSetInt( "/radios/kr-87/inputs/flt-et-btn",
(radio_switch_data[23] >> 3 & 0x01) );
+#endif
+
+#ifdef CURT_HARDWARE
+ fgSetInt( "/radios/kr-87/inputs/set-rst-btn",
+ !(radio_switch_data[23] >> 4 & 0x01) );
+#else
fgSetInt( "/radios/kr-87/inputs/set-rst-btn",
(radio_switch_data[23] >> 4 & 0x01) );
+#endif
+
fgSetInt( "/radios/kr-87/inputs/power-btn",
radio_switch_data[23] >> 5 & 0x01 );
/* cout << "adf = " << !(radio_switch_data[23] & 0x01)
update_switch_matrix( board, switch_data, switch_matrix );
// master switches
+#define CURT_HARDWARE
+#ifdef CURT_HARDWARE
+ fgSetBool( "/controls/engines/engine[0]/master-bat",
+ switch_matrix[board][5][1] );
+ fgSetBool( "/controls/engines/engine[1]/master-bat",
+ switch_matrix[board][5][1] );
+
+ fgSetBool( "/controls/engines/engine[0]/master-alt",
+ switch_matrix[board][4][1] );
+ fgSetBool( "/controls/engines/engine[1]/master-alt",
+ switch_matrix[board][4][1] );
+#else
fgSetBool( "/controls/engines/engine[0]/master-bat",
switch_matrix[board][4][1] );
fgSetBool( "/controls/engines/engine[1]/master-bat",
switch_matrix[board][5][1] );
fgSetBool( "/controls/engines/engine[1]/master-alt",
switch_matrix[board][5][1] );
+#endif
fgSetBool( "/controls/switches/master-avionics",
switch_matrix[board][0][3] );
net->elevator = node->getDoubleValue( "elevator-pos-norm" );
net->elevator_trim_tab
= node->getDoubleValue( "elevator-trim-tab-pos-norm" );
- net->flaps = node->getDoubleValue( "flap-pos-norm" );
+ // FIXME: CLO 10/28/04 - This really should be separated out into 2 values
+ net->left_flap = node->getDoubleValue( "flap-pos-norm" );
+ net->right_flap = node->getDoubleValue( "flap-pos-norm" );
net->left_aileron = node->getDoubleValue( "left-aileron-pos-norm" );
net->right_aileron = node->getDoubleValue( "right-aileron-pos-norm" );
net->rudder = node->getDoubleValue( "rudder-pos-norm" );
htonf(net->elevator);
htonf(net->elevator_trim_tab);
- htonf(net->flaps);
+ htonf(net->left_flap);
+ htonf(net->right_flap);
htonf(net->left_aileron);
htonf(net->right_aileron);
htonf(net->rudder);
htonf(net->elevator);
htonf(net->elevator_trim_tab);
- htonf(net->flaps);
+ htonf(net->left_flap);
+ htonf(net->right_flap);
htonf(net->left_aileron);
htonf(net->right_aileron);
htonf(net->rudder);
node->setDoubleValue("elevator-pos-norm", net->elevator);
node->setDoubleValue("elevator-trim-tab-pos-norm",
net->elevator_trim_tab);
- node->setDoubleValue("flap-pos-norm", net->flaps);
+ // FIXME: CLO 10/28/04 - This really should be separated out
+ // into 2 values
+ node->setDoubleValue("flap-pos-norm", net->left_flap);
+ node->setDoubleValue("flap-pos-norm", net->right_flap);
node->setDoubleValue("left-aileron-pos-norm", net->left_aileron);
node->setDoubleValue("right-aileron-pos-norm", net->right_aileron);
node->setDoubleValue("rudder-pos-norm", net->rudder);
#include <time.h> // time_t
-const int FG_NET_FDM_VERSION = 18;
+const int FG_NET_FDM_VERSION = 19;
// Define a structure containing the top level flight dynamics model
// Control surface positions (normalized values)
float elevator;
float elevator_trim_tab;
- float flaps;
+ float left_flap;
+ float right_flap;
float left_aileron;
float right_aileron;
float rudder;
// Control surface positions (normalized values)
result.fdm.elevator = weight( fdm1.elevator, fdm2.elevator, ratio );
- result.fdm.flaps = weight( fdm1.flaps, fdm2.flaps, ratio );
+ result.fdm.left_flap = weight( fdm1.left_flap, fdm2.left_flap, ratio );
+ result.fdm.right_flap = weight( fdm1.right_flap, fdm2.right_flap, ratio );
result.fdm.left_aileron
= weight( fdm1.left_aileron, fdm2.left_aileron, ratio );
result.fdm.right_aileron