Add instruction.h

Struct for holding instructions in FIFO Queue, enum for instruction types
This commit is contained in:
Aadi Desai 2021-06-13 00:50:38 +01:00
parent 1e87e9b0f4
commit 5e6254029a
2 changed files with 22 additions and 0 deletions

View 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

View file

@ -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