откат изменений из-за потери оперативной памяти

This commit is contained in:
Dmitry Borisenko
2022-01-20 13:07:37 +01:00
parent 8229e0b116
commit c4a3dec67c
14 changed files with 18 additions and 301 deletions

View File

@@ -1,46 +0,0 @@
#pragma once
#include "Global.h"
#ifdef QUEUE_FROM_STR
#include <queue>
#include <iostream>
using namespace std;
struct QueueItems {
String myword;
uint8_t num;
};
class QueueFromStruct;
class QueueFromStruct {
public:
QueueFromStruct();
~QueueFromStruct();
void push(QueueItems word);
void pop();
QueueItems front();
bool empty();
private:
queue<QueueItems> queue1;
QueueItems tmpItem;
};
extern QueueFromStruct* filesQueue;
//=======проверка очереди из структур=================
// myQueueStruct = new QueueFromStruct;
// QueueItems myItem;
// myItem.myword = "word1";
// myQueueStruct->push(myItem);
// myItem.myword = "word2";
// myQueueStruct->push(myItem);
// myItem.myword = "word3";
// myQueueStruct->push(myItem);
// Serial.println(myQueueStruct->front().myword);
// Serial.println(myQueueStruct->front().myword);
// Serial.println(myQueueStruct->front().myword);
#endif

View File

@@ -1,6 +1,5 @@
#pragma once
#include "Global.h"
#include "classes/QueueFromStruct.h"
class SendJson;
@@ -9,7 +8,7 @@ class SendJson {
SendJson();
~SendJson();
void addFileToQueue(String path, uint8_t num);
void sendFile(String path, uint8_t num);
void loop();
@@ -17,13 +16,12 @@ class SendJson {
void sendMqtt(String& jsonArrayElement);
QueueItems myItem;
uint8_t _num;
private:
File file;
String _path;
uint8_t _num;
bool sendingInProgress = false;
};
extern SendJson* sendJsonFiles;
extern SendJson* sendConfigJson;
extern SendJson* sendWigdetsJson;