评论#

注释块用于在 VEXcode 项目中做注释。

VEXcode 阻止包含注释块的代码堆栈。#
[comment]

在块内输入任何评论。

在此示例中,代码将持续检查 6 轴机械臂是否可以在 x 轴上移动 +20 毫米。如果 6 轴机械臂可以移动该距离,则会广播一条消息,指示其移动该距离。

VEXcode 阻止包含注释块的代码堆栈。#
当开始
永久循环
[Continuously check if the Arm can move +20 mm on the x axis.]
如果 <[手臂 v] 位置增加x:(20) y:(0) z:(0) [毫米 v]?> 那么
[Every time the 6-Axis Arm can move, broadcast the message.]
广播 [arm_can_move v]
结束
结束
VEXcode 阻止包含注释块的代码堆栈。#
当我收到 [arm_can_move v]
[When the message is received, move the Arm +20mm on the x axis.]
[手臂 v] 位置递增x:(20) y:(0) z:(0) [毫米 v] ▶