Skip to content

Commit

Permalink
dash altn Time prediction if time is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
BravoMike99 committed Oct 27, 2023
1 parent 30f26a4 commit 403fce0
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -582,19 +582,21 @@ class CDUInitPage {
};

if (mcdu.altDestination) {
if (mcdu._routeAltFuelEntered) {
if (isFinite(mcdu.getRouteAltFuelWeight())) {
altnWeightCell.update(NXUnits.kgToUser(mcdu.getRouteAltFuelWeight()).toFixed(1), Column.cyan);
altnTimeCell.update(FMCMainDisplay.minutesTohhmm(mcdu.getRouteAltFuelTime()), Column.green, Column.small);
}
} else {
const altFuelEntered = mcdu._routeAltFuelEntered;
if (!altFuelEntered) {
mcdu.tryUpdateRouteAlternate();
if (isFinite(mcdu.getRouteAltFuelWeight())) {
altnWeightCell.update(NXUnits.kgToUser(mcdu.getRouteAltFuelWeight()).toFixed(1), Column.cyan, Column.small);
}
if (isFinite(mcdu.getRouteAltFuelWeight())) {
altnWeightCell.update(NXUnits.kgToUser(mcdu.getRouteAltFuelWeight()).toFixed(1), Column.cyan, altFuelEntered? Column.big : Column.small);
const time = mcdu.getRouteAltFuelTime();
if (time) {
altnTimeCell.update(FMCMainDisplay.minutesTohhmm(mcdu.getRouteAltFuelTime()), Column.green, Column.small);
altnCellDivider.updateAttributes(Column.green, Column.small);
} else {
altnTimeCell.update('----',Column.white);
altnCellDivider.updateAttributes(Column.white, altFuelEntered? Column.big : Column.small);
}
}
altnCellDivider.updateAttributes(Column.green, Column.small);
} else {
altnWeightCell.update("0.0", Column.green, Column.small);
}
Expand Down

0 comments on commit 403fce0

Please sign in to comment.