add watchdog

This commit is contained in:
Mario Pesch
2022-01-26 09:52:50 +01:00
parent 3e3956b185
commit 0c8ae90124
5 changed files with 74 additions and 22 deletions
+1
View File
@@ -21,6 +21,7 @@ import "./procedures";
import "./time";
import "./variables";
import "./lists";
import "./watchdog";
import "./webserver";
import "../helpers/types";
+28
View File
@@ -0,0 +1,28 @@
import Blockly from "blockly/core";
import { getColour } from "../helpers/colour";
Blockly.Blocks["watchdog_enable"] = {
init: function () {
this.appendDummyInput()
.appendField("Watchdog aktivieren")
.appendField(new Blockly.FieldTextInput("10000"), "TIME")
.appendField("ms");
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.setColour(getColour().io);
this.setTooltip("");
this.setHelpUrl("");
},
};
Blockly.Blocks["watchdog_reset"] = {
init: function () {
this.appendDummyInput().appendField("Watchdog zurücksetzen");
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.setColour(getColour().io);
this.setTooltip("");
this.setHelpUrl("");
},
};