Skip to content

Commit 5864803

Browse files
committed
Update methods for mechanism and robot
1 parent f02696f commit 5864803

File tree

2 files changed

+76
-3
lines changed

2 files changed

+76
-3
lines changed

src/toolbox/mechanism_class_methods.ts

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,21 @@ import * as toolboxItems from './items';
2929
* toolbox.
3030
*/
3131
export const mechanism_class_blocks: toolboxItems.Block[] = [
32+
{
33+
kind: 'block',
34+
type: 'mrc_class_method_def',
35+
fields: {
36+
'NAME': 'start',
37+
},
38+
extraState: {
39+
canChangeSignature: false,
40+
canBeCalledWithinClass: false,
41+
canBeCalledOutsideClass: false,
42+
canDelete: true,
43+
returnType: 'None',
44+
params: [],
45+
},
46+
},
3247
{
3348
kind: 'block',
3449
type: 'mrc_class_method_def',
@@ -39,7 +54,22 @@ export const mechanism_class_blocks: toolboxItems.Block[] = [
3954
canChangeSignature: false,
4055
canBeCalledWithinClass: false,
4156
canBeCalledOutsideClass: false,
42-
canDelete: false,
57+
canDelete: true,
58+
returnType: 'None',
59+
params: [],
60+
},
61+
},
62+
{
63+
kind: 'block',
64+
type: 'mrc_class_method_def',
65+
fields: {
66+
'NAME': 'stop',
67+
},
68+
extraState: {
69+
canChangeSignature: false,
70+
canBeCalledWithinClass: false,
71+
canBeCalledOutsideClass: false,
72+
canDelete: true,
4373
returnType: 'None',
4474
params: [],
4575
},

src/toolbox/robot_class_methods.ts

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,48 @@ import * as toolboxItems from './items';
2929
* toolbox.
3030
*/
3131
export const robot_class_blocks: toolboxItems.Block[] = [
32-
// TODO(lizlooney): Add one mrc_class_method_def blocks for each method in ther Robot class.
33-
];
32+
{
33+
kind: 'block',
34+
type: 'mrc_class_method_def',
35+
fields: {
36+
'NAME': 'start',
37+
},
38+
extraState: {
39+
canChangeSignature: false,
40+
canBeCalledWithinClass: false,
41+
canBeCalledOutsideClass: false,
42+
canDelete: true,
43+
returnType: 'None',
44+
params: [],
45+
},
46+
},
47+
{
48+
kind: 'block',
49+
type: 'mrc_class_method_def',
50+
fields: {
51+
'NAME': 'update',
52+
},
53+
extraState: {
54+
canChangeSignature: false,
55+
canBeCalledWithinClass: false,
56+
canBeCalledOutsideClass: false,
57+
canDelete: true,
58+
returnType: 'None',
59+
params: [],
60+
},
61+
},
62+
{
63+
kind: 'block',
64+
type: 'mrc_class_method_def',
65+
fields: {
66+
'NAME': 'stop',
67+
},
68+
extraState: {
69+
canChangeSignature: false,
70+
canBeCalledWithinClass: false,
71+
canBeCalledOutsideClass: false,
72+
canDelete: true,
73+
returnType: 'None',
74+
params: [],
75+
},
76+
},];

0 commit comments

Comments
 (0)