spec/lib/celery_script/ast_fixture3.json
{
"kind": "sequence",
"comment": "Properly formatted, syntactically valid sequence.",
"args": {
"version": 3
},
"body": [
{
"kind": "move_absolute",
"args": {
"location": {
"kind": "coordinate",
"args": {
"x": 1,
"y": 2,
"z": 3
}
},
"offset": {
"kind": "coordinate",
"args": {
"x": 0,
"y": 0,
"z": 0
}
},
"speed": 4
}
},
{
"kind": "move_absolute",
"args": {
"location": {
"kind": "tool",
"args": {
"tool_id": 8888
}
},
"offset": {
"kind": "coordinate",
"args": {
"x": 0,
"y": 0,
"z": 0
}
},
"speed": 4
}
},
{
"kind": "move_relative",
"args": {
"x": 1,
"y": 2,
"z": 3,
"speed": 4
}
},
{
"kind": "write_pin",
"args": {
"pin_number": 1,
"pin_value": 128,
"pin_mode": 1
}
},
{
"kind": "read_pin",
"args": {
"pin_number": 1,
"label": "my_pin",
"pin_mode": 1
}
},
{
"kind": "wait",
"args": {
"milliseconds": 500
}
},
{
"kind": "send_message",
"args": {
"message": "Bot at coord {{ x }} {{ y }} {{ z }}.",
"message_type": "info"
},
"body": [
{
"kind": "channel",
"args": {
"channel_name": "toast"
}
}
]
},
{
"kind": "_if",
"args": {
"lhs": "x",
"rhs": 300,
"op": "is",
"_then": {
"kind": "execute",
"args": {
"sequence_id": 9999
}
},
"_else": {
"kind": "nothing",
"args": {}
}
}
},
{
"kind": "execute",
"args": {
"sequence_id": 9999
}
}
]
}