feat(boards): 更新micropython下machine.Timer图形块

This commit is contained in:
王立帮
2026-01-20 18:01:04 +08:00
parent 899c811dc1
commit 0968a1c678
13 changed files with 257 additions and 76 deletions

View File

@@ -222,14 +222,28 @@
</block>
</statement>
</block>
<block type="system_timer_init">
<value name="SUB">
<block type="set_system_timer">
<value name="VAR">
<shadow type="variables_get">
<field name="VAR">tim</field>
</shadow>
</value>
<value name="PIN">
<shadow type="timer_id_pin">
</shadow>
</value>
<value name="period">
<shadow type="math_number">
<field name="NUM">1000</field>
</shadow>
</value>
<value name="callback">
<shadow type="factory_block_return">
<field name="VALUE">tim_callback</field>
</shadow>
</value>
</block>
<block type="system_timer">
<block type="system_timer_init">
<value name="VAR">
<shadow type="variables_get">
<field name="VAR">tim</field>
@@ -263,6 +277,13 @@
</block>
</statement>
</block>
<block type="system_timer_deinit">
<value name="VAR">
<shadow type="variables_get">
<field name="VAR">tim</field>
</shadow>
</value>
</block>
<block type="controls_millis"></block>
<block type="system_ticks_diff">
<value name="END">