Fix APU Hertz parameter
This commit is contained in:
parent
82a8622fc5
commit
91891e5955
1 changed files with 13 additions and 7 deletions
|
@ -106,7 +106,7 @@ var canvas_lowerECAMPageApu =
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
props.UpdateManager.FromHashValue("apuEgt", 0.05, func(val) {
|
props.UpdateManager.FromHashValue("apuEgt", 0.05, func(val) {
|
||||||
obj.apuEgt = sprintf("%s", math.round(val, 5));
|
obj.apuEgt = sprintf("%s", math.clamp(math.round(val, 5), 0, 9995));
|
||||||
}),
|
}),
|
||||||
props.UpdateManager.FromHashValue("apuEgtRot", 0.1, func(val) {
|
props.UpdateManager.FromHashValue("apuEgtRot", 0.1, func(val) {
|
||||||
obj["APUEGT-needle"].setRotation((val + 90) * D2R);
|
obj["APUEGT-needle"].setRotation((val + 90) * D2R);
|
||||||
|
@ -126,11 +126,7 @@ var canvas_lowerECAMPageApu =
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
props.UpdateManager.FromHashValue("apuHertz", 0.5, func(val) {
|
props.UpdateManager.FromHashValue("apuHertz", 0.5, func(val) {
|
||||||
if (val < 0.5) {
|
obj["APUGenHz"].setText(sprintf("%s", math.round(val)));
|
||||||
obj["APUGenHz"].setText("XX");
|
|
||||||
} else {
|
|
||||||
obj["APUGenHz"].setText(sprintf("%s", math.round(val)));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (val >= 390 and val <= 410) {
|
if (val >= 390 and val <= 410) {
|
||||||
obj["APUGenHz"].setColor(0.0509,0.7529,0.2941);
|
obj["APUGenHz"].setColor(0.0509,0.7529,0.2941);
|
||||||
|
@ -162,7 +158,17 @@ var canvas_lowerECAMPageApu =
|
||||||
}),
|
}),
|
||||||
props.UpdateManager.FromHashValue("apuRpm", 0.5, func(val) {
|
props.UpdateManager.FromHashValue("apuRpm", 0.5, func(val) {
|
||||||
if (val >= 0.5) {
|
if (val >= 0.5) {
|
||||||
obj["APUN"].setColor(0.0509,0.7529,0.2941);
|
if (val >= 107) {
|
||||||
|
obj["APUN"].setColor(1,0,0);
|
||||||
|
obj["APUN-needle"].setColor(1,0,0);
|
||||||
|
} elsif (val >= 102) {
|
||||||
|
obj["APUN"].setColor(0.7333,0.3803,0);
|
||||||
|
obj["APUN-needle"].setColor(0.7333,0.3803,0);
|
||||||
|
} else {
|
||||||
|
obj["APUN"].setColor(0.0509,0.7529,0.2941);
|
||||||
|
obj["APUN-needle"].setColor(0.0509,0.7529,0.2941);
|
||||||
|
}
|
||||||
|
|
||||||
obj["APUEGT"].setColor(0.0509,0.7529,0.2941);
|
obj["APUEGT"].setColor(0.0509,0.7529,0.2941);
|
||||||
obj["APUN-needle"].show();
|
obj["APUN-needle"].show();
|
||||||
obj["APUEGT-needle"].show();
|
obj["APUEGT-needle"].show();
|
||||||
|
|
Loading…
Reference in a new issue