mirror of
https://github.com/supleed2/ELEC50003-P1-CW.git
synced 2024-12-22 21:45:49 +00:00
Add instruction.h
Struct for holding instructions in FIFO Queue, enum for instruction types
This commit is contained in:
parent
1e87e9b0f4
commit
5e6254029a
21
Control/include/instruction.h
Normal file
21
Control/include/instruction.h
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#ifndef INSTRUCTION_H
|
||||||
|
#define INSTRUCTION_H
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
INSTR_RESET = -1,
|
||||||
|
INSTR_STOP,
|
||||||
|
INSTR_MOVE,
|
||||||
|
INSTR_CHARGE
|
||||||
|
} instr_t;
|
||||||
|
|
||||||
|
typedef struct instruction
|
||||||
|
{
|
||||||
|
int id;
|
||||||
|
int instr;
|
||||||
|
int heading;
|
||||||
|
int distance;
|
||||||
|
float speed;
|
||||||
|
int charge;
|
||||||
|
} RoverInstruction;
|
||||||
|
|
||||||
|
#endif
|
|
@ -11,6 +11,7 @@
|
||||||
#include <ArduinoJson.h>
|
#include <ArduinoJson.h>
|
||||||
#include <SPIFFS.h>
|
#include <SPIFFS.h>
|
||||||
#include "status.h"
|
#include "status.h"
|
||||||
|
#include "instruction.h"
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|
||||||
#pragma region Enable extra debugging info for ESP32
|
#pragma region Enable extra debugging info for ESP32
|
||||||
|
|
Loading…
Reference in a new issue