]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/atc610x.hxx
Allow the external FDM to calculate slip/skid ball deflection and override
[flightgear.git] / src / Network / atc610x.hxx
index 205da95b86c6314964e8771e2c68232d004762c3..d447cfe08e6f7800e576bb4b6aa80196051a363b 100644 (file)
@@ -47,6 +47,8 @@
 
 class FGATC610x : public FGProtocol {
 
+    bool use_rudder;
+
     int board;
 
     int lock_fd;
@@ -71,34 +73,45 @@ class FGATC610x : public FGProtocol {
 
     float compass_position;
 
-    SGPropertyNode *dme_bus_power;
+    // Electrical system state
+    SGPropertyNode *adf_bus_power, *dme_bus_power, *xpdr_bus_power;
     SGPropertyNode *navcom1_bus_power, *navcom2_bus_power;
 
+    // Property tree variables
     SGPropertyNode *mag_compass;
     SGPropertyNode *dme_min, *dme_kt, *dme_nm;
+    SGPropertyNode *dme_in_range;
     SGPropertyNode *navcom1_power_btn, *navcom2_power_btn;
     SGPropertyNode *com1_freq, *com1_stby_freq;
     SGPropertyNode *com2_freq, *com2_stby_freq;
-    SGPropertyNode *nav1_freq, *nav1_stby_freq;
-    SGPropertyNode *nav2_freq, *nav2_stby_freq;
+    SGPropertyNode *nav1_freq, *nav1_stby_freq, *nav1_obs;
+    SGPropertyNode *nav2_freq, *nav2_stby_freq, *nav2_obs;
     SGPropertyNode *adf_adf_btn, *adf_bfo_btn;
-    SGPropertyNode *adf_power, *adf_vol;
+    SGPropertyNode *adf_power_btn, *adf_vol;
     SGPropertyNode *adf_freq, *adf_stby_freq;
     SGPropertyNode *adf_stby_mode, *adf_timer_mode;
     SGPropertyNode *adf_count_mode, *adf_flight_timer, *adf_elapsed_timer;
     SGPropertyNode *adf_ant_ann, *adf_adf_ann, *adf_bfo_ann, *adf_frq_ann;
-    SGPropertyNode *adf_flt_ann, *adf_et_ann;
+    SGPropertyNode *adf_flt_ann, *adf_et_ann, *adf_hdg, *hdg_bug;
     SGPropertyNode *inner, *middle, *outer;
     SGPropertyNode *xpdr_ident_btn;
     SGPropertyNode *xpdr_digit1, *xpdr_digit2, *xpdr_digit3, *xpdr_digit4;
     SGPropertyNode *xpdr_func_knob, *xpdr_id_code, *xpdr_flight_level;
     SGPropertyNode *xpdr_fl_ann, *xpdr_alt_ann, *xpdr_gnd_ann, *xpdr_on_ann;
     SGPropertyNode *xpdr_sby_ann, *xpdr_reply_ann;
+    SGPropertyNode *ati_bird, *alt_press;
+
+    // Faults
+    SGPropertyNode *comm1_serviceable, *comm2_serviceable;
+    SGPropertyNode *nav1_serviceable, *nav2_serviceable;
+    SGPropertyNode *adf_serviceable, *xpdr_serviceable, *dme_serviceable;
 
-    // configuration values
+    // Configuration values
     SGPropertyNode *elevator_center, *elevator_min, *elevator_max;
     SGPropertyNode *ailerons_center, *ailerons_min, *ailerons_max;
     SGPropertyNode *rudder_center, *rudder_min, *rudder_max;
+    SGPropertyNode *brake_left_min, *brake_left_max;
+    SGPropertyNode *brake_right_min, *brake_right_max;
     SGPropertyNode *throttle_min, *throttle_max;
     SGPropertyNode *mixture_min, *mixture_max;
     SGPropertyNode *trim_center, *trim_min, *trim_max;
@@ -115,6 +128,10 @@ class FGATC610x : public FGProtocol {
     bool do_switches();
 
     // convenience
+    inline bool adf_has_power() const {
+        return (adf_bus_power->getDoubleValue() > 1.0)
+            && adf_power_btn->getBoolValue();
+    }
     inline bool dme_has_power() const {
         return (dme_bus_power->getDoubleValue() > 1.0)
             && dme_switch;
@@ -127,11 +144,14 @@ class FGATC610x : public FGProtocol {
         return (navcom2_bus_power->getDoubleValue() > 1.0)
             && navcom2_power_btn->getBoolValue();
     }
+    inline bool xpdr_has_power() const {
+        return (xpdr_bus_power->getDoubleValue() > 1.0)
+            && (xpdr_func_knob->getIntValue() > 0);
+    }
 
 public:
 
-    FGATC610x() { }
-
+    FGATC610x() : use_rudder(true) { }
     ~FGATC610x() { }
 
     bool open();
@@ -140,6 +160,8 @@ public:
     bool process();
 
     bool close();
+
+    inline void set_use_rudder( bool value ) { use_rudder = value; }
 };