Renaming & cleanup of some modules / functions in source code (#2265)

* Rename module tag name

* Rename server_tflite.cpp -> MainFlowControl.cpp

* Remove redundandant MQTTMainTopic function

* Update

* Remove obsolete GetMQTTMainTopic
This commit is contained in:
Slider0007
2023-03-30 21:56:45 +02:00
committed by GitHub
parent 0e3a50d0c1
commit e995d6c498
19 changed files with 84 additions and 110 deletions

View File

@@ -1,7 +1,7 @@
#include "ClassFlowAlignment.h"
#include "ClassFlowTakeImage.h"
#include "ClassFlow.h"
#include "server_tflite.h"
#include "MainFlowControl.h"
#include "CRotateImage.h"
#include "esp_log.h"
@@ -256,8 +256,8 @@ bool ClassFlowAlignment::doFlow(string time)
if(References[0].alignment_algo != 3){
DrawRef(ImageTMP);
}
tfliteflow.DigitalDrawROI(ImageTMP);
tfliteflow.AnalogDrawROI(ImageTMP);
flowctrl.DigitalDrawROI(ImageTMP);
flowctrl.AnalogDrawROI(ImageTMP);
ImageTMP->writeToMemoryAsJPG((ImageData*)AlgROI, 90);
}
#endif

View File

@@ -25,10 +25,10 @@ extern "C" {
#endif //ENABLE_MQTT
#include "server_help.h"
#include "server_tflite.h"
#include "MainFlowControl.h"
#include "../../include/defines.h"
static const char* TAG = "CTRL";
static const char* TAG = "FLOWCTRL";
//#define DEBUG_DETAIL_ON
@@ -162,16 +162,8 @@ void ClassFlowControll::AnalogDrawROI(CImageBasis *_zw)
#ifdef ENABLE_MQTT
string ClassFlowControll::GetMQTTMainTopic()
bool ClassFlowControll::StartMQTTService()
{
for (int i = 0; i < FlowControll.size(); ++i)
if (FlowControll[i]->name().compare("ClassFlowMQTT") == 0)
return ((ClassFlowMQTT*) (FlowControll[i]))->GetMQTTMainTopic();
return "";
}
bool ClassFlowControll::StartMQTTService() {
/* Start the MQTT service */
for (int i = 0; i < FlowControll.size(); ++i) {
if (FlowControll[i]->name().compare("ClassFlowMQTT") == 0) {

View File

@@ -55,10 +55,6 @@ public:
string TranslateAktstatus(std::string _input);
#ifdef ENABLE_MQTT
string GetMQTTMainTopic();
#endif //ENABLE_MQTT
#ifdef ALGROI_LOAD_FROM_MEM_AS_JPG
void DigitalDrawROI(CImageBasis *_zw);
void AnalogDrawROI(CImageBasis *_zw);

View File

@@ -17,7 +17,8 @@ extern "C" {
#include "esp_log.h"
#include "../../include/defines.h"
static const char* TAG = "IMG";
static const char* TAG = "FLOWIMAGE";
ClassFlowImage::ClassFlowImage(const char* logTag)
{

View File

@@ -15,7 +15,7 @@
#include <time.h>
static const char* TAG = "class_flow_influxDb";
static const char* TAG = "INFLUXDB";
void ClassFlowInfluxDB::SetInitialParameter(void)
{

View File

@@ -15,7 +15,7 @@
#include <time.h>
static const char* TAG = "class_flow_influxDbv2";
static const char* TAG = "INFLUXDBV2";
void ClassFlowInfluxDBv2::SetInitialParameter(void)
{

View File

@@ -183,12 +183,6 @@ bool ClassFlowMQTT::ReadParameter(FILE* pfile, string& aktparamgraph)
}
string ClassFlowMQTT::GetMQTTMainTopic()
{
return maintopic;
}
bool ClassFlowMQTT::Start(float AutoInterval)
{
roundInterval = AutoInterval; // Minutes

View File

@@ -31,7 +31,6 @@ public:
ClassFlowMQTT(std::vector<ClassFlow*>* lfc);
ClassFlowMQTT(std::vector<ClassFlow*>* lfc, ClassFlow *_prev);
string GetMQTTMainTopic();
bool Start(float AutoInterval);
bool ReadParameter(FILE* pfile, string& aktparamgraph);

View File

@@ -15,7 +15,7 @@
// #define WIFITURNOFF
static const char* TAG = "flow_make_image";
static const char* TAG = "TAKEIMAGE";
esp_err_t ClassFlowTakeImage::camera_capture(){
string nm = namerawimage;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,34 @@
#pragma once
#ifndef MAINFLOWCONTROL_H
#define MAINFLOWCONTROL_H
#include <esp_log.h>
#include <string>
#include <esp_http_server.h>
#include "CImageBasis.h"
#include "ClassFlowControll.h"
extern ClassFlowControll flowctrl;
void register_server_main_flow_task_uri(httpd_handle_t server);
void CheckIsPlannedReboot();
bool getIsPlannedReboot();
void StartMainFlowTask();
void DeleteMainFlowTask();
bool isSetupModusActive();
int getCountFlowRounds();
#ifdef ENABLE_MQTT
esp_err_t MQTTCtrlFlowStart(std::string _topic);
#endif //ENABLE_MQTT
esp_err_t GetRawJPG(httpd_req_t *req);
esp_err_t GetJPG(std::string _filename, httpd_req_t *req);
#endif //MAINFLOWCONTROL_H