Bugfix the navdisplay. Also, fix sound
This commit is contained in:
parent
1d8e8a669f
commit
cbc237bbb6
3 changed files with 20 additions and 7 deletions
|
@ -62,7 +62,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
adf2_frq: "/instrumentation/adf[1]/frequencies/selected-khz",
|
||||
dep_rwy: "/autopilot/route-manager/departure/runway",
|
||||
dest_rwy: "/autopilot/route-manager/destination/runway",
|
||||
wp_count: "autopilot/route-manager/route/num",
|
||||
wp_count: "/FMGC/flightplan[2]/num",
|
||||
level_off_alt: "/autopilot/route-manager/vnav/level-off-alt",
|
||||
athr: "/it-autoflight/output/athr",
|
||||
app_mode: "/instrumentation/nd/app-mode",
|
||||
|
@ -759,13 +759,18 @@ canvas.NDStyles["Airbus"] = {
|
|||
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
|
||||
is_true: func(nd) {
|
||||
#var cur_wp = getprop("/autopilot/route-manager/current-wp");
|
||||
var deg = nil;
|
||||
if (nd.get_switch("toggle_true_north")) {
|
||||
var deg = math.round(getprop("/FMGC/flightplan[2]/current-leg-course"));
|
||||
var deg = math.round(getprop("/FMGC/flightplan[2]/current-leg-course")) or 0;
|
||||
} else {
|
||||
var deg = math.round(getprop("/FMGC/flightplan[2]/current-leg-course-mag"));
|
||||
var deg = math.round(getprop("/FMGC/flightplan[2]/current-leg-course-mag")) or 0;
|
||||
}
|
||||
if (deg != nil) {
|
||||
nd.symbols.wpActiveCrs.setText(sprintf("%03.0f", deg) ~ "°");
|
||||
nd.symbols.wpActiveCrs.show();
|
||||
} else {
|
||||
nd.symbols.wpActiveCrs.hide();
|
||||
}
|
||||
nd.symbols.wpActiveCrs.setText((deg or "")~"°");
|
||||
nd.symbols.wpActiveCrs.show();
|
||||
},
|
||||
is_false: func(nd) nd.symbols.wpActiveCrs.hide(),
|
||||
}, # of wpActiveId.impl
|
||||
|
|
|
@ -10,6 +10,7 @@ var courseDistanceFrom = nil;
|
|||
var courseDistanceFromPrev = nil;
|
||||
var sizeWP = nil;
|
||||
var magTrueError = 0;
|
||||
var storeCourse = nil;
|
||||
|
||||
var DEBUG_DISCONT = 0;
|
||||
|
||||
|
@ -759,8 +760,15 @@ var flightPlanController = {
|
|||
me.distToWpt.setValue(me.currentToWpt.courseAndDistanceFrom(curAircraftPos)[1]);
|
||||
|
||||
magTrueError = magHDG.getValue() - trueHDG.getValue();
|
||||
me.courseMagToWpt.setValue(me.courseToWpt.getValue() + magTrueError);
|
||||
|
||||
storeCourse = me.courseToWpt.getValue() + magTrueError;
|
||||
if (storeCourse >= 360) {
|
||||
storeCourse -= 360;
|
||||
} elsif (storeCourse < 0) {
|
||||
storeCourse += 360;
|
||||
}
|
||||
|
||||
me.courseMagToWpt.setValue(storeCourse);
|
||||
}
|
||||
|
||||
if (me.num[india].getValue() != me.flightplans[india].getPlanSize()) {
|
||||
|
|
|
@ -411,7 +411,7 @@
|
|||
</expression>
|
||||
</input>
|
||||
<input>0</input>
|
||||
<output>/sim/sound/cockpit/buzz-1-v</output>
|
||||
<output>/sim/sound/cockpit/buzz-1-p</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
|
|
Loading…
Reference in a new issue