@@ -11,15 +11,13 @@ const category_robot =
1111 kind : 'block' ,
1212 type : 'mrc_mechanism' ,
1313 fields : {
14- NAME : 'my_drive ' ,
15- TYPE : 'DriveMecanum '
14+ NAME : 'claw ' ,
15+ TYPE : 'Claw '
1616 } ,
1717 extraState : {
18- importModule : 'DriveMecanum' ,
19- params : [ { name : 'front_left_drive' , type : 'int' } ,
20- { name : 'front_right_drive' , type : 'int' } ,
21- { name : 'back_left_drive' , type : 'int' } ,
22- { name : 'back_right_drive' , type : 'int' } ,
18+ importModule : 'claw' ,
19+ params : [ { name : 'gripper_port' , type : 'int' } ,
20+ { name : 'piece_sensor_port' , type : 'int' } ,
2321 ]
2422 } ,
2523 inputs : {
@@ -36,26 +34,8 @@ const category_robot =
3634 shadow : {
3735 type : 'mrc_port' ,
3836 fields : {
39- TYPE : 'SmartMotor' ,
40- PORT_NUM : 2
41- } ,
42- } ,
43- } ,
44- ARG2 : {
45- shadow : {
46- type : 'mrc_port' ,
47- fields : {
48- TYPE : 'SmartMotor' ,
49- PORT_NUM : 3
50- } ,
51- } ,
52- } ,
53- ARG3 : {
54- shadow : {
55- type : 'mrc_port' ,
56- fields : {
57- TYPE : 'SmartMotor' ,
58- PORT_NUM : 4
37+ TYPE : 'SmartIO' ,
38+ PORT_NUM : 1
5939 } ,
6040 } ,
6141 } ,
@@ -65,13 +45,15 @@ const category_robot =
6545 kind : 'block' ,
6646 type : 'mrc_mechanism' ,
6747 fields : {
68- NAME : 'my_claw ' ,
69- TYPE : 'Claw '
48+ NAME : 'drive ' ,
49+ TYPE : 'DriveMecanum '
7050 } ,
7151 extraState : {
72- importModule : 'claw' ,
73- params : [ { name : 'port_gripper' , type : 'int' } ,
74- { name : 'port_piece_sensor' , type : 'int' } ,
52+ importModule : 'DriveMecanum' ,
53+ params : [ { name : 'front_left_drive_port' , type : 'int' } ,
54+ { name : 'front_right_drive_port' , type : 'int' } ,
55+ { name : 'back_left_drive_port' , type : 'int' } ,
56+ { name : 'back_right_drive_port' , type : 'int' } ,
7557 ]
7658 } ,
7759 inputs : {
@@ -88,8 +70,26 @@ const category_robot =
8870 shadow : {
8971 type : 'mrc_port' ,
9072 fields : {
91- TYPE : 'SmartIO' ,
92- PORT_NUM : 1
73+ TYPE : 'SmartMotor' ,
74+ PORT_NUM : 2
75+ } ,
76+ } ,
77+ } ,
78+ ARG2 : {
79+ shadow : {
80+ type : 'mrc_port' ,
81+ fields : {
82+ TYPE : 'SmartMotor' ,
83+ PORT_NUM : 3
84+ } ,
85+ } ,
86+ } ,
87+ ARG3 : {
88+ shadow : {
89+ type : 'mrc_port' ,
90+ fields : {
91+ TYPE : 'SmartMotor' ,
92+ PORT_NUM : 4
9393 } ,
9494 } ,
9595 } ,
@@ -108,7 +108,7 @@ const category_robot =
108108 } ,
109109 extraState : {
110110 importModule : 'smart_motor' ,
111- params : [ { name : 'motorPort ' , type : 'int' } ]
111+ params : [ { name : 'motor_port ' , type : 'int' } ]
112112 } ,
113113 inputs : {
114114 ARG0 : {
@@ -131,7 +131,7 @@ const category_robot =
131131 } ,
132132 extraState : {
133133 importModule : 'color_range_sensor' ,
134- params : [ { name : 'I2CPort ' , type : 'int' } ]
134+ params : [ { name : 'i2c_port ' , type : 'int' } ]
135135 } ,
136136 inputs : {
137137 ARG0 : {
@@ -154,7 +154,7 @@ const category_robot =
154154 } ,
155155 extraState : {
156156 importModule : 'rev_touch_sensor' ,
157- params : [ { name : 'SmartIOPort ' , type : 'int' } ]
157+ params : [ { name : 'smartIO_port ' , type : 'int' } ]
158158 } ,
159159 inputs : {
160160 ARG0 : {
@@ -189,7 +189,7 @@ const category_mechanism =
189189 } ,
190190 extraState : {
191191 importModule : 'smart_motor' ,
192- params : [ { name : 'motorPort ' , type : 'int' } ] ,
192+ params : [ { name : 'motor_port ' , type : 'int' } ] ,
193193 hideParams : true
194194 } ,
195195 } ,
@@ -202,7 +202,7 @@ const category_mechanism =
202202 } ,
203203 extraState : {
204204 importModule : 'color_range_sensor' ,
205- params : [ { name : 'I2CPort ' , type : 'int' } ] ,
205+ params : [ { name : 'i2c_port ' , type : 'int' } ] ,
206206 hideParams : true
207207 } ,
208208 } ,
@@ -215,7 +215,7 @@ const category_mechanism =
215215 } ,
216216 extraState : {
217217 importModule : 'rev_touch_sensor' ,
218- params : [ { name : 'SmartIOPort ' , type : 'int' } ] ,
218+ params : [ { name : 'smartIO_port ' , type : 'int' } ] ,
219219 hideParams : true
220220 } ,
221221 } ,
0 commit comments