1
0
Fork 0

Disable code that displays FPV in red if it is outside the range of negative to positive 9.9 degrees

This commit is contained in:
sgilchrist123 2020-09-16 22:35:44 +10:00
parent 3881bdd381
commit 0e7c79d76d

View file

@ -1138,7 +1138,6 @@ var canvas_PFD_1 = {
# FPV # FPV
# If TRK FPA selected on the FCU, display FPV on PFD1 # If TRK FPA selected on the FCU, display FPV on PFD1
# Display FPV in red and freeze if FPA outside the range of -9.9 degrees or 9.9 degrees
if (ap_trk_sw.getValue() == 0 ) { if (ap_trk_sw.getValue() == 0 ) {
me["FPV"].hide(); me["FPV"].hide();
me.dimFixedAircraftOutline(0); me.dimFixedAircraftOutline(0);
@ -1155,15 +1154,16 @@ var canvas_PFD_1 = {
AICenter = me["AI_center"].getCenter(); AICenter = me["AI_center"].getCenter();
var track_x_translation = me.getTrackDiffPixels(track_diff); var track_x_translation = me.getTrackDiffPixels(track_diff);
if (fpa_deg > 9.9) { # Display FPV in red if FPA greater or less plus or minus 9.9 degrees
alpha_deg = alpha_deg + (fpa_deg - 9.9); # if (fpa_deg > 9.9) {
me["FPV"].setColor(1, 0, 0); # alpha_deg = alpha_deg + (fpa_deg - 9.9);
} else if (fpa_deg < -9.9) { # me["FPV"].setColor(1, 0, 0);
alpha_deg = alpha_deg + (fpa_deg + 9.9); # } else if (fpa_deg < -9.9) {
me["FPV"].setColor(1, 0, 0); # alpha_deg = alpha_deg + (fpa_deg + 9.9);
} else { # me["FPV"].setColor(1, 0, 0);
me["FPV"].setColor(0.066666667, 0.752941176, 0.294117647); # } else {
} # me["FPV"].setColor(0.066666667, 0.752941176, 0.294117647);
# }
me.AI_fpv_trans.setTranslation(track_x_translation, math.clamp(alpha_deg, -20, 20) * 12.5); me.AI_fpv_trans.setTranslation(track_x_translation, math.clamp(alpha_deg, -20, 20) * 12.5);
me.AI_fpv_rot.setRotation(-roll_deg * D2R, AICenter); me.AI_fpv_rot.setRotation(-roll_deg * D2R, AICenter);
@ -1914,7 +1914,6 @@ var canvas_PFD_2 = {
# FPV # FPV
# If TRK FPA selected on the FCU, display FPV on PFD2 # If TRK FPA selected on the FCU, display FPV on PFD2
# Display FPV in red and freeze if FPA outside the range of -9.9 degrees or 9.9 degrees
if (ap_trk_sw.getValue() == 0 ) { if (ap_trk_sw.getValue() == 0 ) {
me["FPV"].hide(); me["FPV"].hide();
me.dimFixedAircraftOutline(0); me.dimFixedAircraftOutline(0);
@ -1931,15 +1930,16 @@ var canvas_PFD_2 = {
AICenter = me["AI_center"].getCenter(); AICenter = me["AI_center"].getCenter();
var track_x_translation = me.getTrackDiffPixels(track_diff); var track_x_translation = me.getTrackDiffPixels(track_diff);
if (fpa_deg > 9.9) { # Display FPV in red if FPA greater or less plus or minus 9.9 degrees
alpha_deg = alpha_deg + (fpa_deg - 9.9); # if (fpa_deg > 9.9) {
me["FPV"].setColor(1, 0, 0); # alpha_deg = alpha_deg + (fpa_deg - 9.9);
} else if (fpa_deg < -9.9) { # me["FPV"].setColor(1, 0, 0);
alpha_deg = alpha_deg + (fpa_deg + 9.9); # } else if (fpa_deg < -9.9) {
me["FPV"].setColor(1, 0, 0); # alpha_deg = alpha_deg + (fpa_deg + 9.9);
} else { # me["FPV"].setColor(1, 0, 0);
me["FPV"].setColor(0.066666667, 0.752941176, 0.294117647); # } else {
} # me["FPV"].setColor(0.066666667, 0.752941176, 0.294117647);
# }
me.AI_fpv_trans.setTranslation(track_x_translation, math.clamp(alpha_deg, -20, 20) * 12.5); me.AI_fpv_trans.setTranslation(track_x_translation, math.clamp(alpha_deg, -20, 20) * 12.5);
me.AI_fpv_rot.setRotation(-roll_deg * D2R, AICenter); me.AI_fpv_rot.setRotation(-roll_deg * D2R, AICenter);