Merge branch 'remove-senseboxmcu-lib' of https://github.com/sensebox/React-Ardublockly into remove-senseboxmcu-lib

This commit is contained in:
Mario Pesch
2021-12-21 09:32:19 +01:00
10 changed files with 114 additions and 6 deletions
+3
View File
@@ -72,6 +72,7 @@ class BlocklyWindow extends Component {
this.props.trashcan !== undefined ? this.props.trashcan : true
}
renderer={this.props.renderer}
sounds={this.props.sounds}
maxInstances={getMaxInstances()}
zoom={{
// https://developers.google.com/blockly/guides/configure/web/zoom
@@ -123,11 +124,13 @@ BlocklyWindow.propTypes = {
onChangeWorkspace: PropTypes.func.isRequired,
clearStats: PropTypes.func.isRequired,
renderer: PropTypes.string.isRequired,
sounds: PropTypes.string.isRequired,
language: PropTypes.string.isRequired,
};
const mapStateToProps = (state) => ({
renderer: state.general.renderer,
sounds: state.general.sounds,
language: state.general.language,
});
@@ -6,8 +6,8 @@ Blockly.Arduino.sensebox_wifi = function (block) {
var ssid = this.getFieldValue("SSID");
Blockly.Arduino.libraries_["library_senseBoxIO"] = "#include <senseBoxIO.h>";
Blockly.Arduino.libraries_["library_WiFi"] = "#include <WiFi101.h>";
Blockly.Arduino.variables_["ssid"] = `char ssid[] = ${ssid};`;
Blockly.Arduino.variables_["pass"] = `char pass[] = ${pw};`;
Blockly.Arduino.variables_["ssid"] = `char ssid[] = "${ssid}";`;
Blockly.Arduino.variables_["pass"] = `char pass[] = "${pw}";`;
Blockly.Arduino.variables_["wifi_Status"] = "int status = WL_IDLE_STATUS;";
if (pw === "") {
Blockly.Arduino.setupCode_["wifi_begin"] = `
@@ -53,6 +53,7 @@ Blockly.Arduino.sensebox_get_ip = function () {
Blockly.Arduino.sensebox_startap = function (block) {
var ssid = this.getFieldValue("SSID");
Blockly.Arduino.libraries_["library_senseBoxIO"] = "#include <senseBoxIO.h>";
Blockly.Arduino.libraries_["library_WiFi"] = "#include <WiFi101.h>";
Blockly.Arduino.setupCode_["wifi_startAP"] = `WiFi.beginAP(${ssid});`;
var code = "";
return code;
+3
View File
@@ -177,6 +177,9 @@ export const UI = {
"Der Tablet Modus deaktiviert die Code anzeige und aktiviert die Möglichkeit den Programmcode über die senseBox Connect App zu übertragen. Weitere Informationen dazu findest du unter: ",
settings_ota_on: "Aktiviert",
settings_ota_off: "Deaktiviert",
settings_sounds: "Töne",
settings_sounds_text:
"Aktiviere oder Deaktiviere Töne beim hinzufügen und löschen von Blöcken. Standardmäßig deaktiviert",
/**
* 404
+4 -1
View File
@@ -167,11 +167,14 @@ export const UI = {
"The display of statistics on the usage of the blocks above the workspace can be shown or hidden.",
settings_statistics_on: "On",
settings_statistics_off: "Off",
settings_ota_head: "tablet mode",
settings_ota_head: "Tablet mode",
settings_ota_text:
"Tablet mode disables the code display and enables the possibility to transfer the program code via the senseBox Connect app. You can find more information on: ",
settings_ota_on: "Activated",
settings_ota_off: "Deactivated",
settings_sounds: "Sound",
settings_sounds_text:
"Enable or disable sounds when adding and deleting blocks. Disabled by default",
/**
* 404
+2 -2
View File
@@ -601,11 +601,11 @@ class Toolbox extends React.Component {
colour={getColour().variables}
custom="CREATE_TYPED_VARIABLE"
></Category>
<Category name="Arrays" colour={getColour().arrays}>
{/* <Category name="Arrays" colour={getColour().arrays}>
<Block type="lists_create_empty" />
<Block type="array_getIndex" />
<Block type="lists_length" />
</Category>
</Category> */}
<Category
name={Blockly.Msg.toolbox_functions}
colour={getColour().procedures}