Skip to content

Commit

Permalink
replaced piImage with .piImage in html file
Browse files Browse the repository at this point in the history
  • Loading branch information
sidntrivedi012 committed Aug 21, 2019
1 parent 43b216a commit 56cc268
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/capture/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -362,13 +362,13 @@ <h3 style="text-align:left;margin-left:15px;">Macros</h3>
document.getElementById("pi-button").addEventListener("click", function connect_to_pi() {
$W.loadingfromPi=true;
$W.piImage = new Image();
piImage.onload = function () {
$W.piImage.onload = function () {
var sourceX = 0, sourceY = 0, sourceHeight = 300, sourceWidth = 800;
$W.ctx.drawImage(piImage, sourceX, sourceY, sourceHeight, sourceWidth, 0, 0, $W.width, 1);
$W.ctx.drawImage($W.piImage, sourceX, sourceY, sourceHeight, sourceWidth, 0, 0, $W.width, 1);
};
var fetchImageInterval = setInterval(function fetchImage() {
// piImage.src = "http://pi.local/cam/cam_pic.php?time=" + new Date().getTime();
piImage.src = "../logo.png";//demo picture
$W.piImage.src = "../logo.png";//demo picture
}, 50);
});
}
Expand Down

0 comments on commit 56cc268

Please sign in to comment.