minor cleanup
This commit is contained in:
16
mobile.html
16
mobile.html
@@ -60,7 +60,7 @@ line-height:140%;
|
||||
invalidateDisplay();
|
||||
console.log("connection lost");
|
||||
document.getElementById("status").style.backgroundColor = '#AA0000';
|
||||
document.getElementById("status").innerHTML = "Connection Lost, reloading";
|
||||
document.getElementById("status").innerHTML = "connection Lost, reloading";
|
||||
connected_flag=0;
|
||||
setTimeout(location.reload(), reloadDelay);
|
||||
}
|
||||
@@ -69,7 +69,7 @@ line-height:140%;
|
||||
invalidateDisplay();
|
||||
console.log("Failed");
|
||||
document.getElementById("status").style.backgroundColor = '#AA0000';
|
||||
document.getElementById("status").innerHTML = "Connection Failed- Retrying";
|
||||
document.getElementById("status").innerHTML = "connection Failed- Retrying";
|
||||
setTimeout(MQTTconnect, reconnectTimeout);
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ line-height:140%;
|
||||
|
||||
connected_flag=1;
|
||||
document.getElementById("status").style.backgroundColor = '#00AA00';
|
||||
document.getElementById("status").innerHTML = "Connected";
|
||||
document.getElementById("status").innerHTML = "connected";
|
||||
console.log("Connected to MQTT broker");
|
||||
sub_topics()
|
||||
|
||||
@@ -374,7 +374,7 @@ line-height:140%;
|
||||
|
||||
if (avgWindValid == 1 && windValid == 1) {
|
||||
document.getElementById("status").style.backgroundColor = '#00AA00';
|
||||
document.getElementById("status").innerHTML = "OK";
|
||||
document.getElementById("status").innerHTML = "status: ok";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -392,8 +392,8 @@ line-height:140%;
|
||||
</div>
|
||||
|
||||
<div class="flex-container">
|
||||
<div>Sfc Wind<div id="avgWindSpeed">1</div></div>
|
||||
<div>Inst Wind<div id="windSpeed">1</div></div>
|
||||
<div>Sfc Wind<div id="avgWindSpeed">XXX/XX</div></div>
|
||||
<div>Inst Wind<div id="windSpeed">XXX/XX</div></div>
|
||||
</div>
|
||||
|
||||
<div class="flex-container"><canvas id="compass" width="300" height="300"></canvas></div>
|
||||
@@ -403,12 +403,12 @@ line-height:140%;
|
||||
<div>OAT<div id="OAT">1</div></div>
|
||||
</div>
|
||||
|
||||
<center>Do not rely on this information for flight safety</center>
|
||||
|
||||
<div class="flex-container">
|
||||
<div id="status"></div>
|
||||
</div>
|
||||
|
||||
<center>Do not rely on this information for flight safety</center>
|
||||
|
||||
<script>
|
||||
var connected_flag=0
|
||||
var mqtt;
|
||||
|
||||
Reference in New Issue
Block a user