Add tf graphs and update some web stuff
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
<html>
|
||||
<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/msgpack.min.js"></script>
|
||||
<link rel="stylesheet" href="css/bootstrap.min.css" />
|
||||
@@ -21,6 +21,21 @@
|
||||
<button id="noButton" class="big-button" style="display: none">no :`(</button>
|
||||
</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>
|
||||
<script src="js/areyousatisfied.js"></script>
|
||||
</body>
|
||||
|
||||
@@ -3,10 +3,12 @@ class MqttMessenger{
|
||||
};
|
||||
|
||||
class BallotVoter{
|
||||
constructor(onVote, messenger) {
|
||||
this.cfg = ""; //load the configuration file.
|
||||
constructor(onVote, messenger, host) {
|
||||
// Not using a configuration file.
|
||||
this.messenger = messenger;
|
||||
|
||||
this.host = host;
|
||||
this.swarm = "swarm";
|
||||
|
||||
};
|
||||
|
||||
onConnect(){
|
||||
@@ -17,5 +19,12 @@ class BallotVoter{
|
||||
onMessage(message){
|
||||
print("Message Received");
|
||||
// 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();
|
||||
}
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user