mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Add EEE html page
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
async function eeeSub(port, enable) {
|
||||
var cmd = "eee ";
|
||||
if (enable)
|
||||
cmd = cmd + "on";
|
||||
else
|
||||
cmd = cmd + "off";
|
||||
console.log("eeeSub port " + port, ", value " + enable);
|
||||
try {
|
||||
const response = await fetch('/cmd', {
|
||||
method: 'POST',
|
||||
body: cmd
|
||||
});
|
||||
console.log('Completed!', response);
|
||||
} catch(err) {
|
||||
console.error(`Error: ${err}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user