Commit bea206ec authored by Chris Prince's avatar Chris Prince

minor fix to provide service response to website; fix for button clicks;

parent 822e9cd5
......@@ -223,4 +223,9 @@ void loop() {
// add if..else here to countdown before turning off laser?
Serial.print("random State=");
Serial.println(randomState); //debugging
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: application/json");
client.println(""); // do not forget this one
client.println("{ Success: true }")
}
{
"/move*": {
"target": "http://IP:80",
"target": "http://192.168.0.131:80",
"secure": false,
"logLevel": "debug"
},
"/random*": {
"target": "http://IP:80",
"target": "http://192.168.0.131:80",
"secure": false,
"logLevel": "debug"
},
"/start": {
"target": "http://IP:80",
"/start*": {
"target": "http://192.168.0.131:80",
"secure": false,
"logLevel": "debug"
},
"/stop": {
"target": "http://IP:80",
"/stop*": {
"target": "http://192.168.0.131:80",
"secure": false,
"logLevel": "debug"
}
......
......@@ -8,7 +8,7 @@
<div class="centered">
<div class="btn-block">
<button (click)="triggerLaser()" class="btn" [ngClass]="{ 'btn-outline-danger': laserState === 'on', 'btn-outline-info': laserState === 'off'}">Turn {{ laserState }} Laser</button>
<button class="btn btn-warning" [disabled]="randomRuns">Start Random Patterns</button>
<button class="btn btn-warning" [disabled]="randomRuns" (click)="randomizeLaser()">Start Random Patterns</button>
</div>
<div class="btn-block">
<div class="inline">
......
......@@ -39,7 +39,7 @@ export class AppComponent {
public moveLaser() {
const xy = this.form.value;
this.esp.move(xy.xPosition, xy.yPosition);
this.esp.move(xy.xPosition, xy.yPosition).subscribe();
}
public randomizeLaser() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment