2021-06-12 23:50:38 +00:00
|
|
|
#ifndef INSTRUCTION_H
|
|
|
|
#define INSTRUCTION_H
|
2021-06-15 11:57:28 +00:00
|
|
|
#include <string>
|
2021-06-12 23:50:38 +00:00
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
INSTR_RESET = -1,
|
|
|
|
INSTR_STOP,
|
|
|
|
INSTR_MOVE,
|
2021-06-13 20:43:43 +00:00
|
|
|
INSTR_CHARGE,
|
2021-06-15 02:14:04 +00:00
|
|
|
INSTR_WAIT,
|
|
|
|
INSTR_COLOUR
|
2021-06-12 23:50:38 +00:00
|
|
|
} instr_t;
|
|
|
|
|
|
|
|
typedef struct instruction
|
|
|
|
{
|
|
|
|
int id;
|
|
|
|
int instr;
|
|
|
|
int heading;
|
|
|
|
int distance;
|
|
|
|
float speed;
|
|
|
|
int charge;
|
2021-06-13 20:43:43 +00:00
|
|
|
int time;
|
2021-06-15 11:57:28 +00:00
|
|
|
String colour;
|
2021-06-12 23:50:38 +00:00
|
|
|
} RoverInstruction;
|
|
|
|
|
|
|
|
#endif
|