convert canvas to img
This commit is contained in:
@@ -45,7 +45,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="lastpicture">
|
<div class="lastpicture">
|
||||||
<p>Last picture:</p>
|
<p>Last picture:</p>
|
||||||
<img id="picture" style="width: 400px;">
|
<div id="lastimg">
|
||||||
|
<img id="picture" style="width: 400px;">
|
||||||
|
</div>
|
||||||
<h2>Drone status</h2>
|
<h2>Drone status</h2>
|
||||||
<p id="batterypercentage">Battery percentage</p>
|
<p id="batterypercentage">Battery percentage</p>
|
||||||
<p id="cpuload">CPU load</p>
|
<p id="cpuload">CPU load</p>
|
||||||
@@ -213,8 +215,8 @@
|
|||||||
console.log("take picture");
|
console.log("take picture");
|
||||||
var image = new Image();
|
var image = new Image();
|
||||||
image.src = document.getElementById("result-video").toDataURL;
|
image.src = document.getElementById("result-video").toDataURL;
|
||||||
document.getElementById("picture").innerHTML = "";
|
document.getElementById("lastimg").innerHTML = "";
|
||||||
document.getElementById("picture").appendChild(image);
|
document.getElementById("lastimg").appendChild(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
function arm_disarm() {
|
function arm_disarm() {
|
||||||
|
|||||||
Reference in New Issue
Block a user