#include <simgear/compiler.h>
-#include <simgear/math/interpolater.hxx>
#include <simgear/timing/timestamp.hxx>
#include <Navaids/navlist.hxx>
{
FGMorse morse;
- SGInterpTable *term_tbl;
- SGInterpTable *low_tbl;
- SGInterpTable *high_tbl;
-
SGPropertyNode *lon_node;
SGPropertyNode *lat_node;
SGPropertyNode *alt_node;
+ SGPropertyNode *bus_power;
+ SGPropertyNode *serviceable;
bool need_update;
// input and buttons
double rotation; // compass faceplace rotation
- double on_off_vol_btn;
+ bool power_btn; // 0 = off, 1 = powered
+ bool audio_btn; // 0 = off, 1 = on
+ double vol_btn;
bool adf_btn; // 0 = normal, 1 = depressed
bool bfo_btn; // 0 = normal, 1 = depressed
bool frq_btn; // 0 = normal, 1 = depressed
bool last_flt_et_btn;
bool set_rst_btn; // 0 = normal, 1 = depressed
bool last_set_rst_btn; // 0 = normal, 1 = depressed
- bool ident_btn; // turn audio morse code on/off
// outputs
double freq;
inline double get_stn_lat() const { return stn_lat; }
inline double get_dist() const { return dist; }
inline double get_heading() const { return heading; }
+ inline bool has_power() const {
+ return power_btn && (bus_power->getDoubleValue() > 1.0);
+ }
// modes
inline int get_ant_mode() const { return ant_mode; }
// input and buttons
inline double get_rotation () const { return rotation; }
inline void set_rotation( double rot ) { rotation = rot; }
- inline double get_on_off_vol_btn() const { return on_off_vol_btn; }
- inline void set_on_off_vol_btn( double val ) {
+ inline bool get_power_btn() const { return power_btn; }
+ inline void set_power_btn( bool val ) {
+ power_btn = val;
+ }
+ inline bool get_audio_btn() const { return audio_btn; }
+ inline void set_audio_btn( bool val ) {
+ audio_btn = val;
+ }
+ inline double get_vol_btn() const { return vol_btn; }
+ inline void set_vol_btn( double val ) {
if ( val < 0.0 ) val = 0.0;
if ( val > 1.0 ) val = 1.0;
- on_off_vol_btn = val;
+ vol_btn = val;
}
inline bool get_adf_btn() const { return adf_btn; }
inline void set_adf_btn( bool val ) { adf_btn = val; }
inline void set_flt_et_btn( bool val ) { flt_et_btn = val; }
inline bool get_set_rst_btn() const { return set_rst_btn; }
inline void set_set_rst_btn( bool val ) { set_rst_btn = val; }
- inline bool get_ident_btn() const { return ident_btn; }
- inline void set_ident_btn( bool val ) { ident_btn = val; }
// outputs
inline double get_freq () const { return freq; }