fix pressure test failing
pressure should not be raising if test fails
This commit is contained in:
@@ -104,8 +104,6 @@ function loop_rains_simulator() {
|
||||
$("#iforte_rains_bar_max").width(rains_value + "%");
|
||||
}
|
||||
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
loop_rains_simulator();
|
||||
}, rains_loop_timing);
|
||||
@@ -133,14 +131,14 @@ function pressureTest() {
|
||||
}
|
||||
|
||||
function pressure_test_loop(time, temp, pressure) {
|
||||
var is_test_failing = sessionStorage.getItem("iforte_demo_pressure_test");
|
||||
|
||||
if (is_pressure_test_ongoing) {
|
||||
if (time == 0) {
|
||||
is_pressure_test_ongoing = false;
|
||||
$("#pt-l1").html("");
|
||||
$("#pt-l3").html("");
|
||||
|
||||
var is_test_failing = sessionStorage.getItem("iforte_demo_pressure_test");
|
||||
|
||||
if (is_test_failing == 1) {
|
||||
$('#pt-l2').html('FAIL')
|
||||
$('#pt-l2').addClass('ptf')
|
||||
@@ -163,7 +161,12 @@ function pressure_test_loop(time, temp, pressure) {
|
||||
"Remaining Time " +
|
||||
new Date(time * 1000).toISOString().substring(14, 19)
|
||||
);
|
||||
$("#pt-l3").html(temp + " °C / delta " + pressure.toFixed(2) + " hPa");
|
||||
|
||||
if (is_test_failing == 1) {
|
||||
$("#pt-l3").html(temp + " °C / delta 0.00 hPa");
|
||||
} else {
|
||||
$("#pt-l3").html(temp + " °C / delta " + pressure.toFixed(2) + " hPa");
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
temp = temp + 1;
|
||||
|
||||
Reference in New Issue
Block a user