A32X: Many Canvas PFD Improvements and add AI to Canvas PFD
This commit is contained in:
parent
ccdd4de3d3
commit
2298f0db35
2 changed files with 1007 additions and 30 deletions
|
@ -38,6 +38,8 @@ var pitch = getprop("/orientation/pitch-deg");
|
|||
var roll = getprop("/orientation/roll-deg");
|
||||
var wow1 = getprop("/gear/gear[1]/wow");
|
||||
var wow2 = getprop("/gear/gear[2]/wow");
|
||||
var pitch = 0;
|
||||
var roll = 0;
|
||||
|
||||
var canvas_PFD_base = {
|
||||
init: func(canvas_group, file) {
|
||||
|
@ -71,6 +73,9 @@ var canvas_PFD_base = {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
me.AI_horizon_trans = me["AI_horizon"].createTransform();
|
||||
me.AI_horizon_rot = me["AI_horizon"].createTransform();
|
||||
|
||||
me.page = canvas_group;
|
||||
|
||||
|
@ -99,7 +104,7 @@ var canvas_PFD_1 = {
|
|||
getKeys: func() {
|
||||
return ["FMA_man","FMA_manmode","FMA_flxtemp","FMA_thrust","FMA_lvrclb","FMA_pitch","FMA_pitcharm","FMA_pitcharm2","FMA_roll","FMA_rollarm","FMA_combined","FMA_catmode","FMA_cattype","FMA_nodh","FMA_dh","FMA_dhn","FMA_ap","FMA_fd","FMA_athr",
|
||||
"FMA_man_box","FMA_flx_box","FMA_thrust_box","FMA_pitch_box","FMA_pitcharm_box","FMA_roll_box","FMA_rollarm_box","FMA_combined_box","FMA_catmode_box","FMA_cattype_box","FMA_cat_box","FMA_dh_box","FMA_ap_box","FMA_fd_box","FMA_athr_box","FMA_Middle1",
|
||||
"FMA_Middle2","ASI_scale","ASI_target","AI_center","AI_bank","AI_slipskid","FD_roll","FD_pitch","ALT_digits","ALT_tens","VS_pointer","QNH_setting","LOC_pointer","LOC_scale","GS_scale","GS_pointer","HDG_target"];
|
||||
"FMA_Middle2","ASI_scale","ASI_target","AI_center","AI_bank","AI_slipskid","AI_horizon","FD_roll","FD_pitch","ALT_digits","ALT_tens","VS_pointer","QNH_setting","LOC_pointer","LOC_scale","GS_scale","GS_pointer","HDG_target"];
|
||||
},
|
||||
update: func() {
|
||||
state1 = getprop("/systems/thrust/state1");
|
||||
|
@ -282,13 +287,13 @@ var canvas_PFD_1 = {
|
|||
me["FMA_athr"].setColor(0.1372,0.5372,0.5843);
|
||||
}
|
||||
|
||||
if (getprop("/modes/pfd/fma/ap-mode-box") == 1) {
|
||||
if (getprop("/modes/pfd/fma/ap-mode-box") == 1 and getprop("/modes/pfd/fma/ap-mode") != " ") {
|
||||
me["FMA_ap_box"].show();
|
||||
} else {
|
||||
me["FMA_ap_box"].hide();
|
||||
}
|
||||
|
||||
if (getprop("/modes/pfd/fma/fd-mode-box") == 1) {
|
||||
if (getprop("/modes/pfd/fma/fd-mode-box") == 1 and getprop("/modes/pfd/fma/fd-mode") != " ") {
|
||||
me["FMA_fd_box"].show();
|
||||
} else {
|
||||
me["FMA_fd_box"].hide();
|
||||
|
@ -327,6 +332,12 @@ var canvas_PFD_1 = {
|
|||
me["ASI_target"].setTranslation(0, ASItrgt * -6.6);
|
||||
|
||||
# Attitude Indicator
|
||||
pitch = getprop("/orientation/pitch-deg") or 0;
|
||||
roll = getprop("/orientation/roll-deg") or 0;
|
||||
|
||||
me.AI_horizon_trans.setTranslation(0, pitch * 11.825);
|
||||
me.AI_horizon_rot.setRotation(-roll * D2R, me["AI_center"].getCenter());
|
||||
|
||||
me["AI_slipskid"].setTranslation(getprop("/instrumentation/slip-skid-ball/indicated-slip-skid") * -15, 0);
|
||||
me["AI_bank"].setRotation(-roll * D2R);
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
Before Width: | Height: | Size: 300 KiB After Width: | Height: | Size: 360 KiB |
Reference in a new issue