mirror of
https://github.com/s00500/ESPUI.git
synced 2024-11-22 09:10:54 +00:00
Update Roadmap
This commit is contained in:
parent
e317d25977
commit
9e5756ceef
17
README.md
17
README.md
@ -29,24 +29,25 @@ THIS IS THE 2.0.0 DEVELOPMENT BRANCH, NOT GUARANTIED TO WORK
|
|||||||
- API changes by @eringerli ✅
|
- API changes by @eringerli ✅
|
||||||
- less updateControl functions ✅
|
- less updateControl functions ✅
|
||||||
- proper wrappers for all create/update actions ✅
|
- proper wrappers for all create/update actions ✅
|
||||||
- OptionList by @eringerli
|
|
||||||
- Min Max on slider by @eringerli ✅
|
- Min Max on slider by @eringerli ✅
|
||||||
- Public Access to ESPAsyncServer
|
- OptionList by @eringerli ✅
|
||||||
- Accelerometer Widget
|
- Public Access to ESPAsyncServer ✅
|
||||||
- Graph Widget
|
- Graph Widget ✅
|
||||||
-
|
|
||||||
- Cleanup Example, DNS and autojoin
|
* Cleanup Example, DNS and autojoin
|
||||||
- Cleanup and extend Documentation
|
* Cleanup and extend Documentation
|
||||||
- Number field ✅
|
- Number field ✅
|
||||||
- Text field ✅
|
- Text field ✅
|
||||||
- Data directory ✅
|
- Data directory ✅
|
||||||
- Graph Usage
|
- Graph Usage
|
||||||
- Accelerometer
|
|
||||||
- Slider
|
- Slider
|
||||||
- OptionList
|
- OptionList
|
||||||
- Tab usage
|
- Tab usage
|
||||||
- Verbosity setting
|
- Verbosity setting
|
||||||
|
|
||||||
|
To check:
|
||||||
|
data upload new info to doc?
|
||||||
|
|
||||||
## OLD Roadmap :
|
## OLD Roadmap :
|
||||||
|
|
||||||
- Datagraph output -> _WIP_
|
- Datagraph output -> _WIP_
|
||||||
|
61
data/js/controls.js
vendored
61
data/js/controls.js
vendored
@ -70,6 +70,8 @@ const C_NONE = 255;
|
|||||||
|
|
||||||
var graphData = new Array();
|
var graphData = new Array();
|
||||||
|
|
||||||
|
var hasAccel = false;
|
||||||
|
|
||||||
function colorClass(colorId) {
|
function colorClass(colorId) {
|
||||||
colorId = Number(colorId);
|
colorId = Number(colorId);
|
||||||
switch (colorId) {
|
switch (colorId) {
|
||||||
@ -104,6 +106,57 @@ function colorClass(colorId) {
|
|||||||
var websock;
|
var websock;
|
||||||
var websockConnected = false;
|
var websockConnected = false;
|
||||||
|
|
||||||
|
function requestOrientationPermission() {
|
||||||
|
/*
|
||||||
|
// Currently this fails, since it needs secure context on IOS safari
|
||||||
|
if (typeof DeviceMotionEvent.requestPermission === "function") {
|
||||||
|
DeviceOrientationEvent.requestPermission()
|
||||||
|
.then(response => {
|
||||||
|
if (response == "granted") {
|
||||||
|
window.addEventListener("deviceorientation", handleOrientation);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(console.error);
|
||||||
|
} else {
|
||||||
|
// Non IOS 13
|
||||||
|
window.addEventListener("deviceorientation", handleOrientation);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
function handleOrientation(event) {
|
||||||
|
var x = event.beta; // In degree in the range [-180,180]
|
||||||
|
var y = event.gamma; // In degree in the range [-90,90]
|
||||||
|
|
||||||
|
var output = document.querySelector(".output");
|
||||||
|
output.innerHTML = "beta : " + x + "\n";
|
||||||
|
output.innerHTML += "gamma: " + y + "\n";
|
||||||
|
|
||||||
|
// Because we don't want to have the device upside down
|
||||||
|
// We constrain the x value to the range [-90,90]
|
||||||
|
if (x > 90) {
|
||||||
|
x = 90;
|
||||||
|
}
|
||||||
|
if (x < -90) {
|
||||||
|
x = -90;
|
||||||
|
}
|
||||||
|
|
||||||
|
// To make computation easier we shift the range of
|
||||||
|
// x and y to [0,180]
|
||||||
|
x += 90;
|
||||||
|
y += 90;
|
||||||
|
|
||||||
|
// 10 is half the size of the ball
|
||||||
|
// It center the positioning point to the center of the ball
|
||||||
|
var ball = document.querySelector(".ball");
|
||||||
|
var garden = document.querySelector(".garden");
|
||||||
|
var maxX = garden.clientWidth - ball.clientWidth;
|
||||||
|
var maxY = garden.clientHeight - ball.clientHeight;
|
||||||
|
ball.style.top = (maxY * y) / 180 - 10 + "px";
|
||||||
|
ball.style.left = (maxX * x) / 180 - 10 + "px";
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
function restart() {
|
function restart() {
|
||||||
$(document)
|
$(document)
|
||||||
.add("*")
|
.add("*")
|
||||||
@ -157,7 +210,7 @@ function start() {
|
|||||||
var center = "";
|
var center = "";
|
||||||
switch (data.type) {
|
switch (data.type) {
|
||||||
case UI_INITIAL_GUI:
|
case UI_INITIAL_GUI:
|
||||||
data.controls.forEach((element) => {
|
data.controls.forEach(element => {
|
||||||
var fauxEvent = {
|
var fauxEvent = {
|
||||||
data: JSON.stringify(element)
|
data: JSON.stringify(element)
|
||||||
};
|
};
|
||||||
@ -628,12 +681,14 @@ function start() {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case UI_ACCEL:
|
case UI_ACCEL:
|
||||||
|
if (hasAccel) break;
|
||||||
var parent;
|
var parent;
|
||||||
if (data.parentControl) {
|
if (data.parentControl) {
|
||||||
parent = $("#tab" + data.parentControl);
|
parent = $("#tab" + data.parentControl);
|
||||||
} else {
|
} else {
|
||||||
parent = $("#row");
|
parent = $("#row");
|
||||||
}
|
}
|
||||||
|
hasAccel = true;
|
||||||
parent.append(
|
parent.append(
|
||||||
"<div id='id" +
|
"<div id='id" +
|
||||||
data.id +
|
data.id +
|
||||||
@ -643,7 +698,7 @@ function start() {
|
|||||||
"<h5>" +
|
"<h5>" +
|
||||||
data.label +
|
data.label +
|
||||||
"</h5><hr/>" +
|
"</h5><hr/>" +
|
||||||
"WILL BE A ACCEL<div class='accelerometer' id='accel" +
|
"ACCEL // Not implemented fully!<div class='accelerometer' id='accel" +
|
||||||
data.id +
|
data.id +
|
||||||
"' ><div class='ball" +
|
"' ><div class='ball" +
|
||||||
data.id +
|
data.id +
|
||||||
@ -652,6 +707,8 @@ function start() {
|
|||||||
"'></pre>" +
|
"'></pre>" +
|
||||||
"</div>"
|
"</div>"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
requestOrientationPermission();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UPDATE_LABEL:
|
case UPDATE_LABEL:
|
||||||
|
Loading…
Reference in New Issue
Block a user