добавил буффер char

This commit is contained in:
Dmitry Borisenko
2022-01-19 00:18:06 +01:00
parent 3abad88fc3
commit a4fa6ad389
4 changed files with 84 additions and 0 deletions

View File

@@ -9,3 +9,4 @@
#include "classes/NotAsync.h"
#include "ESPConfiguration.h"
#include "MqttClient.h"
#include "classes/CommandBuf.h"

View File

@@ -0,0 +1,28 @@
#pragma once
#include "Global.h"
#define MAX_COMMAND_LENGTH 16
#define BUFFER 128
class CommandBuf;
class CommandBuf {
public:
CommandBuf();
~CommandBuf();
void addCommand(const char* command);
void printCommands();
String getLastCommand();
private:
struct CharBufferStruct {
char command[MAX_COMMAND_LENGTH + 1];
};
CharBufferStruct* commandList;
int commandCount = 0;
};
extern CommandBuf* myBuf;