1
0
Fork 0

Various property name changes relating to moving the kr-87 adf to

/instrumentation
This commit is contained in:
curt 2004-11-19 23:56:12 +00:00
parent 1c2c76709e
commit 161fb0c770
3 changed files with 124 additions and 101 deletions

View file

@ -120,115 +120,125 @@ void FGKR_87::init () {
void FGKR_87::bind () {
// internal values
fgTie("/radios/kr-87/internal/valid", this, &FGKR_87::get_valid);
fgTie("/radios/kr-87/internal/inrange", this, &FGKR_87::get_inrange);
fgTie("/radios/kr-87/internal/dist", this, &FGKR_87::get_dist);
fgTie("/radios/kr-87/internal/heading", this, &FGKR_87::get_heading);
fgTie("/instrumentation/kr-87/internal/valid", this, &FGKR_87::get_valid);
fgTie("/instrumentation/kr-87/internal/inrange", this,
&FGKR_87::get_inrange);
fgTie("/instrumentation/kr-87/internal/dist", this,
&FGKR_87::get_dist);
fgTie("/instrumentation/kr-87/internal/heading", this,
&FGKR_87::get_heading);
// modes
fgTie("/radios/kr-87/modes/ant", this,
fgTie("/instrumentation/kr-87/modes/ant", this,
&FGKR_87::get_ant_mode);
fgTie("/radios/kr-87/modes/stby", this,
fgTie("/instrumentation/kr-87/modes/stby", this,
&FGKR_87::get_stby_mode);
fgTie("/radios/kr-87/modes/timer", this,
fgTie("/instrumentation/kr-87/modes/timer", this,
&FGKR_87::get_timer_mode);
fgTie("/radios/kr-87/modes/count", this,
fgTie("/instrumentation/kr-87/modes/count", this,
&FGKR_87::get_count_mode);
// input and buttons
fgTie("/radios/kr-87/inputs/rotation-deg", this,
fgTie("/instrumentation/kr-87/inputs/rotation-deg", this,
&FGKR_87::get_rotation, &FGKR_87::set_rotation);
fgSetArchivable("/radios/kr-87/inputs/rotation-deg");
fgTie("/radios/kr-87/inputs/power-btn", this,
fgSetArchivable("/instrumentation/kr-87/inputs/rotation-deg");
fgTie("/instrumentation/kr-87/inputs/power-btn", this,
&FGKR_87::get_power_btn,
&FGKR_87::set_power_btn);
fgSetArchivable("/radios/kr-87/inputs/power-btn");
fgTie("/radios/kr-87/inputs/audio-btn", this,
fgSetArchivable("/instrumentation/kr-87/inputs/power-btn");
fgTie("/instrumentation/kr-87/inputs/audio-btn", this,
&FGKR_87::get_audio_btn,
&FGKR_87::set_audio_btn);
fgSetArchivable("/radios/kr-87/inputs/audio-btn");
fgTie("/radios/kr-87/inputs/volume", this,
fgSetArchivable("/instrumentation/kr-87/inputs/audio-btn");
fgTie("/instrumentation/kr-87/inputs/volume", this,
&FGKR_87::get_vol_btn,
&FGKR_87::set_vol_btn);
fgSetArchivable("/radios/kr-87/inputs/volume");
fgTie("/radios/kr-87/inputs/adf-btn", this,
fgSetArchivable("/instrumentation/kr-87/inputs/volume");
fgTie("/instrumentation/kr-87/inputs/adf-btn", this,
&FGKR_87::get_adf_btn,
&FGKR_87::set_adf_btn);
fgTie("/radios/kr-87/inputs/bfo-btn", this,
fgTie("/instrumentation/kr-87/inputs/bfo-btn", this,
&FGKR_87::get_bfo_btn,
&FGKR_87::set_bfo_btn);
fgTie("/radios/kr-87/inputs/frq-btn", this,
fgTie("/instrumentation/kr-87/inputs/frq-btn", this,
&FGKR_87::get_frq_btn,
&FGKR_87::set_frq_btn);
fgTie("/radios/kr-87/inputs/flt-et-btn", this,
fgTie("/instrumentation/kr-87/inputs/flt-et-btn", this,
&FGKR_87::get_flt_et_btn,
&FGKR_87::set_flt_et_btn);
fgTie("/radios/kr-87/inputs/set-rst-btn", this,
fgTie("/instrumentation/kr-87/inputs/set-rst-btn", this,
&FGKR_87::get_set_rst_btn,
&FGKR_87::set_set_rst_btn);
// outputs
fgTie("/radios/kr-87/outputs/selected-khz", this,
fgTie("/instrumentation/kr-87/outputs/selected-khz", this,
&FGKR_87::get_freq, &FGKR_87::set_freq);
fgSetArchivable("/radios/kr-87/outputs/selected-khz");
fgTie("/radios/kr-87/outputs/standby-khz", this,
fgSetArchivable("/instrumentation/kr-87/outputs/selected-khz");
fgTie("/instrumentation/kr-87/outputs/standby-khz", this,
&FGKR_87::get_stby_freq, &FGKR_87::set_stby_freq);
fgSetArchivable("/radios/kr-87/outputs/standby-khz");
fgTie("/radios/kr-87/outputs/needle-deg", this,
fgSetArchivable("/instrumentation/kr-87/outputs/standby-khz");
fgTie("/instrumentation/kr-87/outputs/needle-deg", this,
&FGKR_87::get_needle_deg);
fgTie("/radios/kr-87/outputs/flight-timer", this, &FGKR_87::get_flight_timer);
fgTie("/radios/kr-87/outputs/elapsed-timer", this,
fgTie("/instrumentation/kr-87/outputs/flight-timer", this,
&FGKR_87::get_flight_timer);
fgTie("/instrumentation/kr-87/outputs/elapsed-timer", this,
&FGKR_87::get_elapsed_timer,
&FGKR_87::set_elapsed_timer);
// annunciators
fgTie("/radios/kr-87/annunciators/ant", this, &FGKR_87::get_ant_ann );
fgTie("/radios/kr-87/annunciators/adf", this, &FGKR_87::get_adf_ann );
fgTie("/radios/kr-87/annunciators/bfo", this, &FGKR_87::get_bfo_ann );
fgTie("/radios/kr-87/annunciators/frq", this, &FGKR_87::get_frq_ann );
fgTie("/radios/kr-87/annunciators/flt", this, &FGKR_87::get_flt_ann );
fgTie("/radios/kr-87/annunciators/et", this, &FGKR_87::get_et_ann );
fgTie("/instrumentation/kr-87/annunciators/ant", this,
&FGKR_87::get_ant_ann );
fgTie("/instrumentation/kr-87/annunciators/adf", this,
&FGKR_87::get_adf_ann );
fgTie("/instrumentation/kr-87/annunciators/bfo", this,
&FGKR_87::get_bfo_ann );
fgTie("/instrumentation/kr-87/annunciators/frq", this,
&FGKR_87::get_frq_ann );
fgTie("/instrumentation/kr-87/annunciators/flt", this,
&FGKR_87::get_flt_ann );
fgTie("/instrumentation/kr-87/annunciators/et", this,
&FGKR_87::get_et_ann );
}
void FGKR_87::unbind () {
// internal values
fgUntie("/radios/kr-87/internal/valid");
fgUntie("/radios/kr-87/internal/inrange");
fgUntie("/radios/kr-87/internal/dist");
fgUntie("/radios/kr-87/internal/heading");
fgUntie("/instrumentation/kr-87/internal/valid");
fgUntie("/instrumentation/kr-87/internal/inrange");
fgUntie("/instrumentation/kr-87/internal/dist");
fgUntie("/instrumentation/kr-87/internal/heading");
// modes
fgUntie("/radios/kr-87/modes/ant");
fgUntie("/radios/kr-87/modes/stby");
fgUntie("/radios/kr-87/modes/timer");
fgUntie("/radios/kr-87/modes/count");
fgUntie("/instrumentation/kr-87/modes/ant");
fgUntie("/instrumentation/kr-87/modes/stby");
fgUntie("/instrumentation/kr-87/modes/timer");
fgUntie("/instrumentation/kr-87/modes/count");
// input and buttons
fgUntie("/radios/kr-87/inputs/rotation-deg");
fgUntie("/radios/kr-87/inputs/power-btn");
fgUntie("/radios/kr-87/inputs/volume");
fgUntie("/radios/kr-87/inputs/adf-btn");
fgUntie("/radios/kr-87/inputs/bfo-btn");
fgUntie("/radios/kr-87/inputs/frq-btn");
fgUntie("/radios/kr-87/inputs/flt-et-btn");
fgUntie("/radios/kr-87/inputs/set-rst-btn");
fgUntie("/radios/kr-87/inputs/ident-btn");
fgUntie("/instrumentation/kr-87/inputs/rotation-deg");
fgUntie("/instrumentation/kr-87/inputs/power-btn");
fgUntie("/instrumentation/kr-87/inputs/volume");
fgUntie("/instrumentation/kr-87/inputs/adf-btn");
fgUntie("/instrumentation/kr-87/inputs/bfo-btn");
fgUntie("/instrumentation/kr-87/inputs/frq-btn");
fgUntie("/instrumentation/kr-87/inputs/flt-et-btn");
fgUntie("/instrumentation/kr-87/inputs/set-rst-btn");
fgUntie("/instrumentation/kr-87/inputs/ident-btn");
// outputs
fgUntie("/radios/kr-87/outputs/selected-khz");
fgUntie("/radios/kr-87/outputs/standby-khz");
fgUntie("/radios/kr-87/outputs/needle-deg");
fgUntie("/radios/kr-87/outputs/flight-timer");
fgUntie("/radios/kr-87/outputs/elapsed-timer");
fgUntie("/instrumentation/kr-87/outputs/selected-khz");
fgUntie("/instrumentation/kr-87/outputs/standby-khz");
fgUntie("/instrumentation/kr-87/outputs/needle-deg");
fgUntie("/instrumentation/kr-87/outputs/flight-timer");
fgUntie("/instrumentation/kr-87/outputs/elapsed-timer");
// annunciators
fgUntie("/radios/kr-87/annunciators/ant");
fgUntie("/radios/kr-87/annunciators/adf");
fgUntie("/radios/kr-87/annunciators/bfo");
fgUntie("/radios/kr-87/annunciators/frq");
fgUntie("/radios/kr-87/annunciators/flt");
fgUntie("/radios/kr-87/annunciators/et");
fgUntie("/instrumentation/kr-87/annunciators/ant");
fgUntie("/instrumentation/kr-87/annunciators/adf");
fgUntie("/instrumentation/kr-87/annunciators/bfo");
fgUntie("/instrumentation/kr-87/annunciators/frq");
fgUntie("/instrumentation/kr-87/annunciators/flt");
fgUntie("/instrumentation/kr-87/annunciators/et");
}
@ -432,7 +442,8 @@ void FGKR_87::update( double dt_sec ) {
char formatted_timer[128];
// cout << big << ":" << little << endl;
snprintf(formatted_timer, 6, "%02d:%02d", big, little);
fgSetString( "/radios/kr-87/outputs/timer-string", formatted_timer );
fgSetString( "/instrumentation/kr-87/outputs/timer-string",
formatted_timer );
while ( goal_needle_deg < 0.0 ) { goal_needle_deg += 360.0; }
while ( goal_needle_deg >= 360.0 ) { goal_needle_deg -= 360.0; }

View file

@ -347,7 +347,9 @@ bool FGATC610x::open() {
// Connect up to property values
/////////////////////////////////////////////////////////////////////
mag_compass = fgGetNode( "/instrumentation/magnetic-compass/indicated-heading-deg", true );
mag_compass
= fgGetNode( "/instrumentation/magnetic-compass/indicated-heading-deg",
true );
dme_min = fgGetNode( "/instrumentation/dme/indicated-time-min", true );
dme_kt = fgGetNode( "/instrumentation/dme/indicated-ground-speed-kt",
@ -385,49 +387,57 @@ bool FGATC610x::open() {
= fgGetNode( "/radios/nav[1]/frequencies/standby-mhz", true );
nav2_obs = fgGetNode( "/radios/nav[1]/radials/selected-deg", true );
adf_power_btn = fgGetNode( "/radios/kr-87/inputs/power-btn", true );
adf_vol = fgGetNode( "/radios/kr-87/inputs/volume", true );
adf_adf_btn = fgGetNode( "/radios/kr-87/inputs/adf-btn", true );
adf_bfo_btn = fgGetNode( "/radios/kr-87/inputs/bfo-btn", true );
adf_freq = fgGetNode( "/radios/kr-87/outputs/selected-khz", true );
adf_stby_freq = fgGetNode( "/radios/kr-87/outputs/standby-khz", true );
adf_stby_mode = fgGetNode( "/radios/kr-87/modes/stby", true );
adf_timer_mode = fgGetNode( "/radios/kr-87/modes/timer", true );
adf_count_mode = fgGetNode( "/radios/kr-87/modes/count", true );
adf_flight_timer = fgGetNode( "/radios/kr-87/outputs/flight-timer", true );
adf_elapsed_timer = fgGetNode( "/radios/kr-87/outputs/elapsed-timer",
adf_power_btn
= fgGetNode( "/instrumentation/kr-87/inputs/power-btn", true );
adf_vol = fgGetNode( "/instrumentation/kr-87/inputs/volume", true );
adf_adf_btn = fgGetNode( "/instrumentation/kr-87/inputs/adf-btn", true );
adf_bfo_btn = fgGetNode( "/instrumentation/kr-87/inputs/bfo-btn", true );
adf_freq = fgGetNode( "/instrumentation/kr-87/outputs/selected-khz", true );
adf_stby_freq
= fgGetNode( "/instrumentation/kr-87/outputs/standby-khz", true );
adf_stby_mode = fgGetNode( "/instrumentation/kr-87/modes/stby", true );
adf_timer_mode = fgGetNode( "/instrumentation/kr-87/modes/timer", true );
adf_count_mode = fgGetNode( "/instrumentation/kr-87/modes/count", true );
adf_flight_timer
= fgGetNode( "/instrumentation/kr-87/outputs/flight-timer", true );
adf_elapsed_timer
= fgGetNode( "/instrumentation/kr-87/outputs/elapsed-timer",
true );
adf_ant_ann = fgGetNode( "/radios/kr-87/annunciators/ant", true );
adf_adf_ann = fgGetNode( "/radios/kr-87/annunciators/adf", true );
adf_bfo_ann = fgGetNode( "/radios/kr-87/annunciators/bfo", true );
adf_frq_ann = fgGetNode( "/radios/kr-87/annunciators/frq", true );
adf_flt_ann = fgGetNode( "/radios/kr-87/annunciators/flt", true );
adf_et_ann = fgGetNode( "/radios/kr-87/annunciators/et", true );
adf_ant_ann = fgGetNode( "/instrumentation/kr-87/annunciators/ant", true );
adf_adf_ann = fgGetNode( "/instrumentation/kr-87/annunciators/adf", true );
adf_bfo_ann = fgGetNode( "/instrumentation/kr-87/annunciators/bfo", true );
adf_frq_ann = fgGetNode( "/instrumentation/kr-87/annunciators/frq", true );
adf_flt_ann = fgGetNode( "/instrumentation/kr-87/annunciators/flt", true );
adf_et_ann = fgGetNode( "/instrumentation/kr-87/annunciators/et", true );
inner = fgGetNode( "/radios/marker-beacon/inner", true );
middle = fgGetNode( "/radios/marker-beacon/middle", true );
outer = fgGetNode( "/radios/marker-beacon/outer", true );
xpdr_ident_btn = fgGetNode( "/radios/kt-70/inputs/ident-btn", true );
xpdr_digit1 = fgGetNode( "/radios/kt-70/inputs/digit1", true );
xpdr_digit2 = fgGetNode( "/radios/kt-70/inputs/digit2", true );
xpdr_digit3 = fgGetNode( "/radios/kt-70/inputs/digit3", true );
xpdr_digit4 = fgGetNode( "/radios/kt-70/inputs/digit4", true );
xpdr_func_knob = fgGetNode( "/radios/kt-70/inputs/func-knob", true );
xpdr_id_code = fgGetNode( "/radios/kt-70/outputs/id-code", true );
xpdr_flight_level = fgGetNode( "/radios/kt-70/outputs/flight-level", true );
xpdr_fl_ann = fgGetNode( "/radios/kt-70/annunciators/fl", true );
xpdr_alt_ann = fgGetNode( "/radios/kt-70/annunciators/alt", true );
xpdr_gnd_ann = fgGetNode( "/radios/kt-70/annunciators/gnd", true );
xpdr_on_ann = fgGetNode( "/radios/kt-70/annunciators/on", true );
xpdr_sby_ann = fgGetNode( "/radios/kt-70/annunciators/sby", true );
xpdr_reply_ann = fgGetNode( "/radios/kt-70/annunciators/reply", true );
xpdr_ident_btn
= fgGetNode( "/instrumentation/kt-70/inputs/ident-btn", true );
xpdr_digit1 = fgGetNode( "/instrumentation/kt-70/inputs/digit1", true );
xpdr_digit2 = fgGetNode( "/instrumentation/kt-70/inputs/digit2", true );
xpdr_digit3 = fgGetNode( "/instrumentation/kt-70/inputs/digit3", true );
xpdr_digit4 = fgGetNode( "/instrumentation/kt-70/inputs/digit4", true );
xpdr_func_knob
= fgGetNode( "/instrumentation/kt-70/inputs/func-knob", true );
xpdr_id_code = fgGetNode( "/instrumentation/kt-70/outputs/id-code", true );
xpdr_flight_level
= fgGetNode( "/instrumentation/kt-70/outputs/flight-level", true );
xpdr_fl_ann = fgGetNode( "/instrumentation/kt-70/annunciators/fl", true );
xpdr_alt_ann = fgGetNode( "/instrumentation/kt-70/annunciators/alt", true );
xpdr_gnd_ann = fgGetNode( "/instrumentation/kt-70/annunciators/gnd", true );
xpdr_on_ann = fgGetNode( "/instrumentation/kt-70/annunciators/on", true );
xpdr_sby_ann = fgGetNode( "/instrumentation/kt-70/annunciators/sby", true );
xpdr_reply_ann
= fgGetNode( "/instrumentation/kt-70/annunciators/reply", true );
ati_bird
= fgGetNode( "/instrumentation/attitude-indicator/horizon-offset-deg",
true );
alt_press = fgGetNode( "/instrumentation/altimeter/setting-inhg", true );
adf_hdg = fgGetNode( "/radios/kr-87/inputs/rotation-deg", true );
adf_hdg = fgGetNode( "/instrumentation/kr-87/inputs/rotation-deg", true );
hdg_bug = fgGetNode( "/autopilot/settings/heading-bug-deg", true );
elevator_center = fgGetNode( "/input/atc610x/elevator/center", true );
@ -467,13 +477,15 @@ bool FGATC610x::open() {
ignore_flight_controls
= fgGetNode( "/input/atc610x/ignore-flight-controls", true );
comm1_serviceable = fgGetNode( "/instrumentation/comm[0]/serviceable", true );
comm2_serviceable = fgGetNode( "/instrumentation/comm[1]/serviceable", true );
comm1_serviceable
= fgGetNode( "/instrumentation/comm[0]/serviceable", true );
comm2_serviceable
= fgGetNode( "/instrumentation/comm[1]/serviceable", true );
nav1_serviceable = fgGetNode( "/instrumentation/nav[0]/serviceable", true );
nav2_serviceable = fgGetNode( "/instrumentation/nav[1]/serviceable", true );
adf_serviceable = fgGetNode( "/instrumentation/adf/serviceable", true );
xpdr_serviceable = fgGetNode( "/radios/kt-70/inputs/serviceable",
true );
xpdr_serviceable
= fgGetNode( "/instrumentation/kt-70/inputs/serviceable", true );
dme_serviceable = fgGetNode( "/instrumentation/dme/serviceable", true );
dme_selector

View file

@ -64,7 +64,7 @@ bool FGAtlas::gen_message() {
// cout << "generating atlas message" << endl;
static SGPropertyNode *adf_freq
= fgGetNode("/radios/kr-87/outputs/selected-khz", true);
= fgGetNode("/instrumentation/kr-87/outputs/selected-khz", true);
char rmc[256], gga[256], patla[256];
char rmc_sum[10], gga_sum[10], patla_sum[10];