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 + "%");
|
$("#iforte_rains_bar_max").width(rains_value + "%");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loop_rains_simulator();
|
loop_rains_simulator();
|
||||||
}, rains_loop_timing);
|
}, rains_loop_timing);
|
||||||
@@ -133,14 +131,14 @@ function pressureTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pressure_test_loop(time, temp, pressure) {
|
function pressure_test_loop(time, temp, pressure) {
|
||||||
|
var is_test_failing = sessionStorage.getItem("iforte_demo_pressure_test");
|
||||||
|
|
||||||
if (is_pressure_test_ongoing) {
|
if (is_pressure_test_ongoing) {
|
||||||
if (time == 0) {
|
if (time == 0) {
|
||||||
is_pressure_test_ongoing = false;
|
is_pressure_test_ongoing = false;
|
||||||
$("#pt-l1").html("");
|
$("#pt-l1").html("");
|
||||||
$("#pt-l3").html("");
|
$("#pt-l3").html("");
|
||||||
|
|
||||||
var is_test_failing = sessionStorage.getItem("iforte_demo_pressure_test");
|
|
||||||
|
|
||||||
if (is_test_failing == 1) {
|
if (is_test_failing == 1) {
|
||||||
$('#pt-l2').html('FAIL')
|
$('#pt-l2').html('FAIL')
|
||||||
$('#pt-l2').addClass('ptf')
|
$('#pt-l2').addClass('ptf')
|
||||||
@@ -163,7 +161,12 @@ function pressure_test_loop(time, temp, pressure) {
|
|||||||
"Remaining Time " +
|
"Remaining Time " +
|
||||||
new Date(time * 1000).toISOString().substring(14, 19)
|
new Date(time * 1000).toISOString().substring(14, 19)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
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");
|
$("#pt-l3").html(temp + " °C / delta " + pressure.toFixed(2) + " hPa");
|
||||||
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
temp = temp + 1;
|
temp = temp + 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user