Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/main/webapp/cdn/blockly/generators/propc.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ Blockly.propc.finish = function (code) {

for (var name in Blockly.propc.definitions_) {
var def = Blockly.propc.definitions_[name];
if (def.match(/^#include/) || def.match(/^#define/) || def.match(/^#if/) || def.match(/^#end/) || def.match(/^#else/)) {
if (def.match(/^#include/) || def.match(/^#define/) || def.match(/^#if/) ||
def.match(/^#end/) || def.match(/^#else/) || def.match(/^#pragma/)) {
imports.push(def);
} else {
definitions.push(def);
Expand Down
10 changes: 7 additions & 3 deletions src/main/webapp/cdn/blockly/generators/propc/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -1437,13 +1437,18 @@ Blockly.propc.spin_comment = function () {
Blockly.Blocks.factory_reset = {
init: function () {
this.appendDummyInput()
.appendField("restore_s3_demo");
.appendField("restore s3 demo");
this.setColour(colorPalette.getColor('programming'));
this.setHelpUrl(Blockly.MSG_S3_FACTORY_RESET_HELPURL);
this.setTooltip(Blockly.MSG_S3_FACTORY_RESET_TOOLTIP);
}
};

Blockly.propc.factory_reset = function () {
Blockly.propc.definitions_["s3_factory_reset"] = '#pragma load_default_scribbler_binary';
return '';
};

Blockly.Blocks.scribbler_serial_send_text = {
init: function () {
this.setColour(colorPalette.getColor('protocols'));
Expand Down Expand Up @@ -1653,5 +1658,4 @@ Blockly.propc.mic_s3_get = function () {

var code = 's3_readMic()';
return [code, Blockly.propc.ORDER_NONE];
};

};
6 changes: 2 additions & 4 deletions src/main/webapp/frame/framec.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -1485,11 +1485,9 @@
-->
<block type="scribbler_serial_rx_byte"></block>
</category>
<%--
<category name="<fmt:message key="category.s3-actions.reset" />" include="s3">
<category name="<fmt:message key="category.s3-actions.reset" />" include="s3">
<block type="factory_reset"></block>
</category>
--%>
</category>
</category>

<c:choose>
Expand Down