mirror of
https://github.com/0x1d/esp8266-laser.git
synced 2025-12-14 18:15:22 +01:00
- cleanup, interpret /motor/1/123
This commit is contained in:
@@ -24,9 +24,9 @@
|
||||
console.log(uri);
|
||||
var xh = new XMLHttpRequest();
|
||||
xh.onreadystatechange = function(){
|
||||
if (xh.readyState == 4){
|
||||
if(xh.status == 200) {
|
||||
if (this.responseText != null) {
|
||||
//if (xh.readyState == 4){
|
||||
//if(xh.status == 200) {
|
||||
// if (this.responseText != null) {
|
||||
var res = JSON.parse(xh.responseText);
|
||||
var ledDiv;
|
||||
if(initial)
|
||||
@@ -73,7 +73,7 @@
|
||||
{
|
||||
ledElement.checked = false;
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
if(initial)
|
||||
{
|
||||
@@ -84,8 +84,8 @@
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//}
|
||||
//}
|
||||
}
|
||||
};
|
||||
xh.overrideMimeType("text/json");
|
||||
@@ -136,7 +136,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
console.log("res: " + res);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user