1
0
Fork 0

Hide FPV when ADIRS aligning or not available

This commit is contained in:
sgilchrist123 2020-09-09 21:25:18 +10:00
parent 65c105ffb5
commit 497a274df5

View file

@ -1160,16 +1160,16 @@ var canvas_PFD_1 = {
} else { } else {
var aoa = me.getAOAForPFD1(); var aoa = me.getAOAForPFD1();
if (aoa == nil or (systems.ADIRS.ADIRunits[0].aligned != 1 and att_switch.getValue() == 0) or (systems.ADIRS.ADIRunits[2].aligned != 1 and att_switch.getValue() == -1)){ if (aoa == nil or (systems.ADIRS.ADIRunits[0].aligned != 1 and att_switch.getValue() == 0) or (systems.ADIRS.ADIRunits[2].aligned != 1 and att_switch.getValue() == -1)){
me["FPV"].setTranslation(0, 0); me["FPV"].hide();
me["FPV"].setColor(1, 0, 0); me.dimFixedAircraftOutline(0);
} else { } else {
var track_x_translation = me.getTrackDiffPixels(track_diff); var track_x_translation = me.getTrackDiffPixels(track_diff);
var fpa_deg = pitch.getValue() - aoa; var fpa_deg = pitch.getValue() - aoa;
me["FPV"].setTranslation(track_x_translation, me.getFPVYTranslation(track_x_translation, fpa_deg)); me["FPV"].setTranslation(track_x_translation, me.getFPVYTranslation(track_x_translation, fpa_deg));
me["FPV"].setColor(0.050980392, 0.752941176, 0.290196078); me["FPV"].show();
me.dimFixedAircraftOutline(1);
} }
me["FPV"].show();
me.dimFixedAircraftOutline(1);
} }
# ILS # ILS
@ -1918,16 +1918,15 @@ var canvas_PFD_2 = {
} else { } else {
var aoa = me.getAOAForPFD2(); var aoa = me.getAOAForPFD2();
if (aoa == nil or (systems.ADIRS.ADIRunits[1].aligned != 1 and att_switch.getValue() == 0) or (systems.ADIRS.ADIRunits[2].aligned != 1 and att_switch.getValue() == 1)) { if (aoa == nil or (systems.ADIRS.ADIRunits[1].aligned != 1 and att_switch.getValue() == 0) or (systems.ADIRS.ADIRunits[2].aligned != 1 and att_switch.getValue() == 1)) {
me["FPV"].setTranslation(0, 0); me["FPV"].hide();
me["FPV"].setColor(1, 0, 0); me.dimFixedAircraftOutline(0);
} else { } else {
var track_x_translation = me.getTrackDiffPixels(track_diff); var track_x_translation = me.getTrackDiffPixels(track_diff);
var fpa_deg = pitch.getValue() - aoa; var fpa_deg = pitch.getValue() - aoa;
me["FPV"].setTranslation(track_x_translation, me.getFPVYTranslation(track_x_translation, fpa_deg)); me["FPV"].setTranslation(track_x_translation, me.getFPVYTranslation(track_x_translation, fpa_deg));
me["FPV"].setColor(0.050980392, 0.752941176, 0.290196078); me["FPV"].show();
me.dimFixedAircraftOutline(1);
} }
me["FPV"].show();
me.dimFixedAircraftOutline(1);
} }
# ILS # ILS