微波雷达块移动位置和块调整

This commit is contained in:
Irene-Maxine
2024-11-19 12:52:07 +08:00
parent 3160024ae7
commit 84e3fee2c1
6 changed files with 96 additions and 84 deletions

View File

@@ -375,24 +375,16 @@ export const radar_set_DETECTION_THRESHOLD = {
.setCheck("var");
this.appendDummyInput("")
.appendField(Blockly.Msg.LISTS_SET_INDEX_SET + Blockly.Msg.MIXlY_INTERACTION)
this.appendValueInput('VAR')
.appendField(Blockly.Msg.MIXLY_DETECTION_THRESHOLD);
this.appendValueInput('VAR2')
.appendField(Blockly.Msg.MIXLY_DELAY_TIME);
this.appendDummyInput()
.appendField(new Blockly.FieldDropdown([
[Blockly.Msg.MIXLY_DETECTION_THRESHOLD,'threshold'],
[Blockly.Msg.MIXLY_DELAY_TIME+' ms','delay_ms']
]),"key")
this.appendValueInput('VAR');
.appendField('ms');
this.setPreviousStatement(true);
this.setNextStatement(true);
this.setInputsInline(true);
var thisBlock = this;
this.setTooltip(function () {
var mode = thisBlock.getFieldValue('key');
var TOOLTIPS = {
"threshold": Blockly.Msg.MIXLY_THRESHOLD_TOOLTIP,
"delay_ms": Blockly.Msg.MIXLY_DELAY_TIME_RANGE
};
return TOOLTIPS[mode]
});
this.setTooltip(Blockly.Msg.MIXLY_THRESHOLD_TOOLTIP+' ; '+Blockly.Msg.MIXLY_DELAY_TIME_RANGE)
}
};

View File

@@ -3808,6 +3808,24 @@
</shadow>
</value>
</block>
<block type="radar_set_DETECTION_THRESHOLD">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">xsensor</field>
</shadow>
</value>
<value name="VAR">
<shadow type="math_number">
<field name="NUM">5000</field>
</shadow>
</value>
<value name="VAR2">
<shadow type="math_number">
<field name="NUM">500</field>
</shadow>
</value>
</block>
<block type="interaction_whether_to_interaction"></block>
<block type="communicate_spi_init">
<value name="VAR">
<shadow type="variables_get">
@@ -4125,20 +4143,6 @@
</shadow>
</value>
</block>
<block type="radar_set_DETECTION_THRESHOLD">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">xsensor</field>
</shadow>
</value>
<value name="VAR">
<shadow type="math_number">
<field name="NUM">5000</field>
</shadow>
</value>
</block>
<block type="interaction_whether_to_interaction">
</block>
</category>
<category id="catExternActuator" colour='#74A55B' m-hide="micropython:esp32:rm_e1">

View File

@@ -3667,6 +3667,24 @@
</shadow>
</value>
</block>
<block type="radar_set_DETECTION_THRESHOLD">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">xsensor</field>
</shadow>
</value>
<value name="VAR">
<shadow type="math_number">
<field name="NUM">5000</field>
</shadow>
</value>
<value name="VAR2">
<shadow type="math_number">
<field name="NUM">500</field>
</shadow>
</value>
</block>
<block type="interaction_whether_to_interaction"></block>
<block type="communicate_spi_init" m-hide='micropython:esp32c3:mixgocar_c3'>
<value name="VAR">
<shadow type="variables_get">
@@ -3987,20 +4005,6 @@
</shadow>
</value>
</block>
<block type="radar_set_DETECTION_THRESHOLD">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">xsensor</field>
</shadow>
</value>
<value name="VAR">
<shadow type="math_number">
<field name="NUM">5000</field>
</shadow>
</value>
</block>
<block type="interaction_whether_to_interaction">
</block>
</category>
<category id="catExternActuator" colour='#74A55B'>
<block type="servo_move" m-show='micropython:esp32c3:mixgocar_c3'>

View File

@@ -3605,6 +3605,24 @@
</shadow>
</value>
</block>
<block type="radar_set_DETECTION_THRESHOLD">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">xsensor</field>
</shadow>
</value>
<value name="VAR">
<shadow type="math_number">
<field name="NUM">5000</field>
</shadow>
</value>
<value name="VAR2">
<shadow type="math_number">
<field name="NUM">500</field>
</shadow>
</value>
</block>
<block type="interaction_whether_to_interaction"></block>
<block type="communicate_spi_init" m-hide='micropython:esp32c3:mixgocar_c3'>
<value name="VAR">
<shadow type="variables_get">
@@ -3925,20 +3943,6 @@
</shadow>
</value>
</block>
<block type="radar_set_DETECTION_THRESHOLD">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">xsensor</field>
</shadow>
</value>
<value name="VAR">
<shadow type="math_number">
<field name="NUM">5000</field>
</shadow>
</value>
</block>
<block type="interaction_whether_to_interaction">
</block>
</category>
<category id="catExternActuator" colour='#74A55B'>
<block type="servo_move" m-show='micropython:esp32c3:mixgocar_c3'>

View File

@@ -3401,6 +3401,24 @@
</shadow>
</value>
</block>
<block type="radar_set_DETECTION_THRESHOLD">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">xsensor</field>
</shadow>
</value>
<value name="VAR">
<shadow type="math_number">
<field name="NUM">5000</field>
</shadow>
</value>
<value name="VAR2">
<shadow type="math_number">
<field name="NUM">500</field>
</shadow>
</value>
</block>
<block type="interaction_whether_to_interaction"></block>
<block type="communicate_spi_init">
<value name="VAR">
<shadow type="variables_get">
@@ -3718,20 +3736,6 @@
</shadow>
</value>
</block>
<block type="radar_set_DETECTION_THRESHOLD">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">xsensor</field>
</shadow>
</value>
<value name="VAR">
<shadow type="math_number">
<field name="NUM">5000</field>
</shadow>
</value>
</block>
<block type="interaction_whether_to_interaction">
</block>
</category>
<category id="catExternActuator" colour='#74A55B'>
<block type="esp32_music_pitch_init">

View File

@@ -4040,6 +4040,24 @@
</shadow>
</value>
</block>
<block type="radar_set_DETECTION_THRESHOLD">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">xsensor</field>
</shadow>
</value>
<value name="VAR">
<shadow type="math_number">
<field name="NUM">5000</field>
</shadow>
</value>
<value name="VAR2">
<shadow type="math_number">
<field name="NUM">500</field>
</shadow>
</value>
</block>
<block type="interaction_whether_to_interaction"></block>
<block type="communicate_spi_init">
<value name="VAR">
<shadow type="variables_get">
@@ -4357,20 +4375,6 @@
</shadow>
</value>
</block>
<block type="radar_set_DETECTION_THRESHOLD">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">xsensor</field>
</shadow>
</value>
<value name="VAR">
<shadow type="math_number">
<field name="NUM">5000</field>
</shadow>
</value>
</block>
<block type="interaction_whether_to_interaction">
</block>
</category>
<category id="catExternActuator" colour='#74A55B'>
<block type="esp32_music_pitch_init">