fix overflow
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<body style="height: 100%;">
|
<body style="height: 100%;">
|
||||||
<h1 class="header">5G Drone API</h1>
|
<h1 class="header">5G Drone API</h1>
|
||||||
<div class="video">
|
<!-- <div class="video"> -->
|
||||||
<div class="mainvideo">
|
<div class="mainvideo">
|
||||||
<p>Camera view:</p>
|
<p>Camera view:</p>
|
||||||
<img id="result-video" style="border: 1px solid blue; width: 800px;"></img>
|
<img id="result-video" style="border: 1px solid blue; width: 800px;"></img>
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
<p id="position">Current position</p>
|
<p id="position">Current position</p>
|
||||||
<p id="failsafe">Failsafe status</p>
|
<p id="failsafe">Failsafe status</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- </div> -->
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
const data = JSON.parse(event.data);
|
const data = JSON.parse(event.data);
|
||||||
if (data.type == "STATUS") {
|
if (data.type == "STATUS") {
|
||||||
document.getElementById("batterypercentage").innerHTML = "Battery percentage: " + data.data.battery_percentage;
|
document.getElementById("batterypercentage").innerHTML = "Battery percentage: " + data.data.battery_percentage;
|
||||||
document.getElementById("cpuload").innerHTML = "CPU load: " + data.data.cpu_usage.toString().substring(0, 6).substring(2,4) + "%";
|
document.getElementById("cpuload").innerHTML = "CPU load: " + data.data.cpu_usage.toString().substring(0, 6).substring(2, 4) + "%";
|
||||||
document.getElementById("armed").innerHTML = "Armed: " + data.data.armed;
|
document.getElementById("armed").innerHTML = "Armed: " + data.data.armed;
|
||||||
document.getElementById("control_mode").innerHTML = "Control mode: " + data.data.control_mode;
|
document.getElementById("control_mode").innerHTML = "Control mode: " + data.data.control_mode;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user