Add tf graphs and update some web stuff

This commit is contained in:
Michael Pivato
2019-02-07 07:03:10 +10:30
parent 73f4297c5a
commit 71f7a0d8a4
4 changed files with 3174 additions and 4 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
<html> <html>
<header> <header>
<script src="js/bootstrap.min.js"></script> <!-- <script src="js/bootstrap.min.js"></script> -->
<script src="js/paho.javascript-1.0.3/paho-mqtt-min.js"></script> <script src="js/paho.javascript-1.0.3/paho-mqtt-min.js"></script>
<script src="js/msgpack.min.js"></script> <script src="js/msgpack.min.js"></script>
<link rel="stylesheet" href="css/bootstrap.min.css" /> <link rel="stylesheet" href="css/bootstrap.min.css" />
@@ -21,6 +21,21 @@
<button id="noButton" class="big-button" style="display: none">no :`(</button> <button id="noButton" class="big-button" style="display: none">no :`(</button>
</div> </div>
</div> </div>
<div class="row">
<div class="col-sm-6">
<div class="camera">
<video id="video">Video stream not available.</video>
<button id="startbutton">Take photo</button>
</div>
</div>
</div>
<div class="row">
<canvas id="canvas">
</canvas>
<div class="output">
<img id="photo" alt="The screen capture will appear in this box.">
</div>
</div>
</div> </div>
<script src="js/areyousatisfied.js"></script> <script src="js/areyousatisfied.js"></script>
</body> </body>

View File

@@ -3,10 +3,12 @@ class MqttMessenger{
}; };
class BallotVoter{ class BallotVoter{
constructor(onVote, messenger) { constructor(onVote, messenger, host) {
this.cfg = ""; //load the configuration file. // Not using a configuration file.
this.messenger = messenger; this.messenger = messenger;
this.host = host;
this.swarm = "swarm";
}; };
onConnect(){ onConnect(){
@@ -17,5 +19,12 @@ class BallotVoter{
onMessage(message){ onMessage(message){
print("Message Received"); print("Message Received");
// Unpack the message. // Unpack the message.
messageb = message.payloadBytes;
var messageD = msgpack.decode(message.payloadBytes)
console.log(messageD)
if(messageD["type"] == "reqvote"){
console.log("Received vote message");
submit_vote();
}
}; };
}; };