#define BEGIN_SCRIPT(name) struct commands name[] = { #define END_SCRIPT {NULL, 0, 0, 0} }; #define GYRO_BIAS {CMD_STOP, 0, 0, 0}, #define NOP {CMD_NOP, 0, 0, 0}, #define SHOW_STATE {CMD_SHOW_STATE, 0, 0, 0}, #define STOP {CMD_WAIT_FOR_BUMP, 0, 0, 0}, #define WAIT_FOR_BUMP {CMD_SHOW_STATE, 0, 0, 0}, #define DRIVE(dist) {CMD_DRIVE, (dist), 0, 0}, #define GOTO_WAYPOINT(point) {CMD_GOTO_WAYPOINT, (point), 0, 0}, #define JUMP(line) {CMD_JUMP, (line), 0, 0}, #define SET_HEADING(ang) {CMD_SET_HEADING, (ang), 0, 0}, #define VELOCITY(vel) {CMD_VELOCITY, (vel), 0, 0}, #define WAIT(time) {CMD_WAIT, (time), 0, 0}, #define WAIT_UNTIL(time) {CMD_WAIT_UNTIL, (time), 0, 0}, #define KEEP_HEADING(time,tol) {CMD_KEEP_HEADING, (time), (tol), 0}, #define SET_POS(x,y) {CMD_SET_POS, (x), (y), 0}, #define TURN(ang,tol) {CMD_TURN, (ang), (tol), 0}, #define GOTO_COLOR(col,time,tol) {CMD_GOTO_COLOR, (col), (time), (tol)}, #define POINT_AT_COLOR(col,time,tol) {CMD_POINT_AT_COLOR, (col), (time), (tol)},