Commit 3bccd637 authored by VIEVILLE Thierry's avatar VIEVILLE Thierry
Browse files

sync from makefile

parent ae2acc9c
Pipeline #313613 passed with stage
in 2 seconds
......@@ -185,7 +185,7 @@ npm run sync : syncs the files with the git repository.
<br class="clear">
<footer>
<div style='float: right;font-style: italic;'>2021-09-22 version.</div>
<div style='float: right;font-style: italic;'>2021-10-11 version.</div>
</footer>
<script>prettyPrint();</script>
......
......@@ -9,7 +9,7 @@ t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyl
l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
"");a.length&&e.push(["pln",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
......
......@@ -3,21 +3,52 @@
<title>Galileo board control panel</title>
<link rel='stylesheet' href='https://line.gitlabpages.inria.fr/aide-group/esp32gpiocontrol/webcontrols.css'/>
<script type='text/javascript' src='https://line.gitlabpages.inria.fr/aide-group/esp32gpiocontrol/webcontrols.js'></script>
<script type='text/javascript' src='https://line.gitlabpages.inria.fr/aide-group/esp32gpiocontrol/Measure.js'></script>
</head>
<body>
<h1>Galileo board control panel</h1>
<div class='button-bar'>
<button onclick='doButton(this)' class='button' style='background-color:lightgreen'>Start</button>
<button onclick='doButton(this)' class='button' id='start' style='background-color:lightgreen'>Start</button>
<button onclick='doButton(this)' class='button' style='background-color:yellow'>Run</button>
<button onclick='doButton(this)' class='button' style='background-color:magenta'>Get</button>
<button onclick='doButton(this)' class='button' style='background-color:red'>Stop</button>
<button onclick='doButton(this)' class='button' id='stop' style='background-color:red'>Stop</button>
<button onclick='switchMode()' class='button' id='mode' style='background-color:gray'>Run mode</button>
</div>
<script>
webcontrols.addConsole(true);
var measures = [new Measure("1 "), new Measure("2 "), new Measure("3 "), new Measure("4 ")];
function doButton(button) {
let action = button.textContent.toLowerCase();
webcontrols.curl("@/galileo", "action=" + action, "POST");
webcontrols.curl("@/galileo", "action=" + action, "POST", function(answer) {
if(webcontrols.verbose == false && action == "get") {
webcontrols.consoleClear();
try {
let value = JSON.parse(answer);
for(i = 0; i < 4; i++) {
measures[i].add(value["detected_times"][i]);
document.getElementById("console").innerHTML += "<ul><li>" + measures[i].asString(3) + "</li></ul>";
}
} catch(error) {
webcontrols.consoleLog(answer);
}
}
});
}
function switchMode(to_simple) {
to_simple = to_simple == undefined ? document.getElementById("mode").innerText != "Test mode" : to_simple;
if (to_simple) {
document.getElementById("mode").innerText = "Test mode";
document.getElementById("start").style.visibility = "hidden";
document.getElementById("stop").style.visibility = "hidden";
webcontrols.verbose = false;
} else {
document.getElementById("mode").innerText = "Run mode";
document.getElementById("start").style.visibility = "visible";
document.getElementById("stop").style.visibility = "visible";
webcontrols.verbose = true;
}
}
switchMode(true);
</script>
</body>
</html>
### This is the name of the package
NAME=esp32galileo
show :
$(BROWSER) http://192.168.1.137/
whichIP :
sudo arp-scan --interface=wlan0 --localnet | grep b4:e6:2d:a9:08:d9
### Includes aidebuild standard usage,build,test,clean,sync rules
include ./.makefile0.inc
include ./.makefile.inc
......@@ -32,7 +32,7 @@ void setup_init()
#define VERSION "0.2.8"
// Defines the server lister port
#define SERVER_LISTEN_PORT 8000
#define SERVER_LISTEN_PORT 80
////////////////////////////////////////////////////////////////////////////////
......
......@@ -84,7 +84,7 @@ void hande_galileo_get()
d[i] = MAX(0, d[i]);
}
//
answer(true, "{\"route\": \"galileo\", \"time\": %.3f, \"start_time\": %.3f, \"detected_times\": [%.3f, %.3f, %.3f, %.3f], \"detected_velocities\": [%.3f, %.3f, %.3f], \"detected_accelerations\": [%.5f, %.5f]}", fmillis(), d[0], d[1], d[2], d[3], d[4], d[2] - d[1], d[3] - d[2], d[4] - d[3],
answer(true, "{\"route\": \"galileo\", \"time\": %.3f, \"start_time\": %.3f, \"detected_times\": [%.3f, %.3f, %.3f, %.3f], \"detected_time_differences\": [%.3f, %.3f, %.3f], \"detected_time_difference_variations\": [%.5f, %.5f]}", fmillis(), d[0], d[1], d[2], d[3], d[4], d[2] - d[1], d[3] - d[2], d[4] - d[3],
2 * d[2] - d[1] - d[3], 2 * d[3] - d[2] - d[4]);
}
//
......
static char setup_galileo_page[] = "<html> <head> <title>Galileo board control panel</title> <link rel='stylesheet' href='https://line.gitlabpages.inria.fr/aide-group/esp32gpiocontrol/webcontrols.css'/> <script type='text/javascript' src='https://line.gitlabpages.inria.fr/aide-group/esp32gpiocontrol/webcontrols.js'></script> </head> <body> <h1>Galileo board control panel</h1> <div class='button-bar'> <button onclick='doButton(this)' class='button' style='background-color:lightgreen'>Start</button> <button onclick='doButton(this)' class='button' style='background-color:yellow'>Run</button> <button onclick='doButton(this)' class='button' style='background-color:magenta'>Get</button> <button onclick='doButton(this)' class='button' style='background-color:red'>Stop</button> </div> <script> webcontrols.addConsole(true); function doButton(button) { let action = button.textContent.toLowerCase(); webcontrols.curl(\"@/galileo\", \"action=\" + action, \"POST\"); } </script> </body> </html> ";
static char setup_galileo_page[] = "<html> <head> <title>Galileo board control panel</title> <link rel='stylesheet' href='https://line.gitlabpages.inria.fr/aide-group/esp32gpiocontrol/webcontrols.css'/> <script type='text/javascript' src='https://line.gitlabpages.inria.fr/aide-group/esp32gpiocontrol/webcontrols.js'></script> <script type='text/javascript' src='https://line.gitlabpages.inria.fr/aide-group/esp32gpiocontrol/Measure.js'></script> </head> <body> <h1>Galileo board control panel</h1> <div class='button-bar'> <button onclick='doButton(this)' class='button' id='start' style='background-color:lightgreen'>Start</button> <button onclick='doButton(this)' class='button' style='background-color:yellow'>Run</button> <button onclick='doButton(this)' class='button' style='background-color:magenta'>Get</button> <button onclick='doButton(this)' class='button' id='stop' style='background-color:red'>Stop</button> <button onclick='switchMode()' class='button' id='mode' style='background-color:gray'>Run mode</button> </div> <script> webcontrols.addConsole(true); var measures = [new Measure(\"1 \"), new Measure(\"2 \"), new Measure(\"3 \"), new Measure(\"4 \")]; function doButton(button) { let action = button.textContent.toLowerCase(); webcontrols.curl(\"@/galileo\", \"action=\" + action, \"POST\", function(answer) { if(webcontrols.verbose == false && action == \"get\") { webcontrols.consoleClear(); try { let value = JSON.parse(answer); for(i = 0; i < 4; i++) { measures[i].add(value[\"detected_times\"][i]); document.getElementById(\"console\").innerHTML += \"<ul><li>\" + measures[i].asString(3) + \"</li></ul>\"; } } catch(error) { webcontrols.consoleLog(answer); } } }); } function switchMode(to_simple) { to_simple = to_simple == undefined ? document.getElementById(\"mode\").innerText != \"Test mode\" : to_simple; if (to_simple) { document.getElementById(\"mode\").innerText = \"Test mode\"; document.getElementById(\"start\").style.visibility = \"hidden\"; document.getElementById(\"stop\").style.visibility = \"hidden\"; webcontrols.verbose = false; } else { document.getElementById(\"mode\").innerText = \"Run mode\"; document.getElementById(\"start\").style.visibility = \"visible\"; document.getElementById(\"stop\").style.visibility = \"visible\"; webcontrols.verbose = true; } } switchMode(true); </script> </body> </html> ";
......@@ -3,21 +3,52 @@
<title>Galileo board control panel</title>
<link rel='stylesheet' href='https://line.gitlabpages.inria.fr/aide-group/esp32gpiocontrol/webcontrols.css'/>
<script type='text/javascript' src='https://line.gitlabpages.inria.fr/aide-group/esp32gpiocontrol/webcontrols.js'></script>
<script type='text/javascript' src='https://line.gitlabpages.inria.fr/aide-group/esp32gpiocontrol/Measure.js'></script>
</head>
<body>
<h1>Galileo board control panel</h1>
<div class='button-bar'>
<button onclick='doButton(this)' class='button' style='background-color:lightgreen'>Start</button>
<button onclick='doButton(this)' class='button' id='start' style='background-color:lightgreen'>Start</button>
<button onclick='doButton(this)' class='button' style='background-color:yellow'>Run</button>
<button onclick='doButton(this)' class='button' style='background-color:magenta'>Get</button>
<button onclick='doButton(this)' class='button' style='background-color:red'>Stop</button>
<button onclick='doButton(this)' class='button' id='stop' style='background-color:red'>Stop</button>
<button onclick='switchMode()' class='button' id='mode' style='background-color:gray'>Run mode</button>
</div>
<script>
webcontrols.addConsole(true);
var measures = [new Measure("1 "), new Measure("2 "), new Measure("3 "), new Measure("4 ")];
function doButton(button) {
let action = button.textContent.toLowerCase();
webcontrols.curl("@/galileo", "action=" + action, "POST");
webcontrols.curl("@/galileo", "action=" + action, "POST", function(answer) {
if(webcontrols.verbose == false && action == "get") {
webcontrols.consoleClear();
try {
let value = JSON.parse(answer);
for(i = 0; i < 4; i++) {
measures[i].add(value["detected_times"][i]);
document.getElementById("console").innerHTML += "<ul><li>" + measures[i].asString(3) + "</li></ul>";
}
} catch(error) {
webcontrols.consoleLog(answer);
}
}
});
}
function switchMode(to_simple) {
to_simple = to_simple == undefined ? document.getElementById("mode").innerText != "Test mode" : to_simple;
if (to_simple) {
document.getElementById("mode").innerText = "Test mode";
document.getElementById("start").style.visibility = "hidden";
document.getElementById("stop").style.visibility = "hidden";
webcontrols.verbose = false;
} else {
document.getElementById("mode").innerText = "Run mode";
document.getElementById("start").style.visibility = "visible";
document.getElementById("stop").style.visibility = "visible";
webcontrols.verbose = true;
}
}
switchMode(true);
</script>
</body>
</html>
......@@ -2,11 +2,11 @@
## Web page
- `http://$IP:8000/` opens the user web page
- `http://$IP:80/` opens the user web page
## End user usage
- `curl -X POST -d "action=(start|stop|get)" http://$IP:8000/galileo` => `{ "action": \"$action\", "times": [$time_1, $time_2, $time_3, $time_4]}`
- `curl -X POST -d "action=(start|stop|get)" http://$IP:80/galileo` => `{ "action": \"$action\", "times": [$time_1, $time_2, $time_3, $time_4]}`
- `start` : Starts the galileo driver
- `run` : Runs the galileo demo
- `stop` : Stops the galileo driver
......
Supports Markdown
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