diff --git a/www/blocs&generateurs/blockly_blocs.js b/www/blocs&generateurs/blockly_blocs.js index 794b11d4..8b08652a 100644 --- a/www/blocs&generateurs/blockly_blocs.js +++ b/www/blocs&generateurs/blockly_blocs.js @@ -162,7 +162,7 @@ Blockly.Blocks["controls_switch"] = { this.appendStatementInput("DO0").setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.Msg.CONTROLS_IF_MSG_THEN); this.setPreviousStatement(true); this.setNextStatement(true); - this.setInputsInline(true); + this.setInputsInline(false); this.setMutator(new Blockly.Mutator(["controls_case_break", "controls_case_default"])); var thisBlock = this; this.setTooltip(function() { diff --git a/www/blocs&generateurs/motor.js b/www/blocs&generateurs/motor.js index cfc9170d..ab3a5a04 100644 --- a/www/blocs&generateurs/motor.js +++ b/www/blocs&generateurs/motor.js @@ -66,7 +66,7 @@ Blockly.Arduino["moteur_dc"]=function(block){ var code= "digitalWrite(l298n_in1,LOW);\ndigitalWrite(l298n_in2,HIGH);\nanalogWrite(l298n_ena,("+value_vitesse+"));\ndigitalWrite(l298n_in3,LOW);\ndigitalWrite(l298n_in4,HIGH);\nanalogWrite(l298n_enb,("+value_vitesse+"));\n" } else if (dropdown_etat=="0"){ - var code= "digitalWrite(l298n_in1,HIGH);\ndigitalWrite(l298n_in2,LOW);\nanalogWrite(l298n_ena,("+value_vitesse+"));\ndigitalWrite(l298n_in3,HIGH);\ndigitalWrite(l298n_in4,HIGH);\nanalogWrite(l298n_enb,("+value_vitesse+"));\n" + var code= "digitalWrite(l298n_in1,HIGH);\ndigitalWrite(l298n_in2,LOW);\nanalogWrite(l298n_ena,("+value_vitesse+"));\ndigitalWrite(l298n_in3,HIGH);\ndigitalWrite(l298n_in4,LOW);\nanalogWrite(l298n_enb,("+value_vitesse+"));\n" } } if (dropdown_moteur=="6") { diff --git a/www/blocs&generateurs/sensors.js b/www/blocs&generateurs/sensors.js index e0c29c99..13f7a04f 100644 --- a/www/blocs&generateurs/sensors.js +++ b/www/blocs&generateurs/sensors.js @@ -67,9 +67,9 @@ Blockly.Arduino['button_touch_sensor2'] = function(block) { Blockly.Arduino.setups_['setup_btntouch_'+dropdown_pin] = 'pinMode('+dropdown_pin+',INPUT);'; if(logic=='TRUE') - var code = '(!digitalRead('+dropdown_pin+'))'; + var code = 'digitalRead('+dropdown_pin+')'; else - var code = 'digitalRead('+dropdown_pin+')'; + var code = '(!digitalRead('+dropdown_pin+'))'; return [code, Blockly.Arduino.ORDER_ATOMIC]; }; diff --git a/www/lang/Arduino_es.js b/www/lang/Arduino_es.js index 96ac912a..ed7f6f76 100644 --- a/www/lang/Arduino_es.js +++ b/www/lang/Arduino_es.js @@ -200,7 +200,7 @@ Blockly.Msg.LKL_MODE = 'se detecta en el pin'; // FIELDDROPDOWN Blockly.Msg.note = [["DO \u2083", "261"], ["RE \u2083", "293"], ["MI \u2083", "329"], ["FA \u2083", "349"], ["SOL \u2083", "392"], ["LA \u2083", "440"], ["SI \u2083", "493"], ["DO \u2084", "523 "], [" RE \u2084 "," 587 "], [" MI \u2084 "," 659 "], [" FA \u2084 "," 698 "], [" SOL \u2084 "," 784 "] , ["LA \u2084", "880"]]; Blockly.Msg.tempo = [["\u266B", "125"], ["\u266A", "250"], ["\u2669", "500"], ["𝅗𝅥", "1000"], ["𝅝", "2000"]]; -Blockly.Msg.on_off = [["on", "LOW"], ["off", "HIGH"]]; +Blockly.Msg.on_off = [["ON", "HIGH"], ["OFF", "LOW"]]; Blockly.Msg.menublink = [[" lentamente "," 1000 "], [" rápido "," 100 "]]; Blockly.Msg.AV_AR = [[Blockly.Msg.AV, "FORWARD"], [Blockly.Msg.AR, "BACKWARD"]]; // do not translate Blockly.Msg.times = [["segundos", "s"], ["milisegundos", "m"], ["microsegundos", "u"]];