Initial commit

First and incomplete version of the refactor, stage module works, including aborting moves.
This commit is contained in:
Filip Ayazi 2021-05-21 04:32:21 +01:00
commit 2f78522064
16 changed files with 1264 additions and 0 deletions

27
src/main.h Normal file
View file

@ -0,0 +1,27 @@
#ifndef MAIN_H
#include "config.h"
#include <Arduino.h>
#ifdef DEBUG_ON
#define D(x) Serial.println(x)
#else
#define D(x)
#endif
#define END_COMMAND \
{ \
"", NULL \
}
#define CHECK_END_COMMAND(C) C.command.length() > 0
struct Command
{
String command;
void (*run)(String);
};
uint8_t parse_arguments(String[], String, uint8_t);
extern void register_module(const Command commands[], void (*loop_fn)(void));
void get_version(String);
#define MAIN_H
#endif