1
0
Fork 0

Fixed a remaining typo from the death and destruction earlier today.

Added an option to avoid using non-existant rudder pedals if they truely
non-exist.
This commit is contained in:
curt 2003-04-02 03:45:08 +00:00
parent 0620fed54a
commit b5f7761861
2 changed files with 22 additions and 14 deletions

View file

@ -733,18 +733,22 @@ bool FGATC610x::do_analog_in() {
fgSetFloat( "/controls/engines/engine[1]/throttle", tmp ); fgSetFloat( "/controls/engines/engine[1]/throttle", tmp );
// cout << "throttle = " << tmp << endl; // cout << "throttle = " << tmp << endl;
if ( use_rudder ) {
// rudder // rudder
tmp = scale( rudder_center->getIntValue(), rudder_min->getIntValue(), tmp = scale( rudder_center->getIntValue(), rudder_min->getIntValue(),
rudder_max->getIntValue(), analog_in_data[10] ); rudder_max->getIntValue(), analog_in_data[10] );
fgSetFloat( "/controls/flight/rudder", -tmp ); fgSetFloat( "/controls/flight/rudder", -tmp );
// toe brakes // toe brakes
tmp = scale( brake_left_min->getIntValue(), brake_left_max->getIntValue(), tmp = scale( brake_left_min->getIntValue(),
brake_left_max->getIntValue(),
analog_in_data[20] ); analog_in_data[20] );
fgSetFloat( "/controls/gear/wheel[0]/brake", tmp ); fgSetFloat( "/controls/gear/wheel[0]/brake", tmp );
tmp = scale( brake_right_min->getIntValue(), brake_right_max->getIntValue(), tmp = scale( brake_right_min->getIntValue(),
brake_right_max->getIntValue(),
analog_in_data[21] ); analog_in_data[21] );
fgSetFloat( "/controls/gear/wheel[1]/brake", tmp ); fgSetFloat( "/controls/gear/wheel[1]/brake", tmp );
}
// nav1 volume // nav1 volume
tmp = (float)analog_in_data[25] / 1024.0f; tmp = (float)analog_in_data[25] / 1024.0f;
@ -1767,7 +1771,7 @@ bool FGATC610x::do_switches() {
mag2 = mag1; mag2 = mag1;
mag1 = magnetos; mag1 = magnetos;
if ( mag1 == mag2 && mag2 == mag3 ) { if ( mag1 == mag2 && mag2 == mag3 ) {
fgSetInt( "/controls/engines/engine[0]/magneto", magnetos ); fgSetInt( "/controls/engines/engine[0]/magnetos", magnetos );
} }
static bool start1, start2, start3; static bool start1, start2, start3;
start3 = start2; start3 = start2;

View file

@ -47,6 +47,8 @@
class FGATC610x : public FGProtocol { class FGATC610x : public FGProtocol {
bool use_rudder;
int board; int board;
int lock_fd; int lock_fd;
@ -149,7 +151,7 @@ class FGATC610x : public FGProtocol {
public: public:
FGATC610x() { } FGATC610x() : use_rudder(true) { }
~FGATC610x() { } ~FGATC610x() { }
bool open(); bool open();
@ -158,6 +160,8 @@ public:
bool process(); bool process();
bool close(); bool close();
inline void set_use_rudder( bool value ) { use_rudder = value; }
}; };