#ifndef in *.h + #pragma once (#1639)

This commit is contained in:
Nicolas Liaudat
2022-12-20 06:46:13 +01:00
committed by GitHub
parent c4cd43b3d6
commit fc5fbd648e
37 changed files with 188 additions and 288 deletions

View File

@@ -1,3 +1,8 @@
#pragma once
#ifndef CONFIGFILE_H
#define CONFIGFILE_H
#include <string> #include <string>
#include <vector> #include <vector>
@@ -12,4 +17,6 @@ public:
private: private:
FILE* pFile; FILE* pFile;
}; };
#endif //CONFIGFILE_H

View File

@@ -1,5 +1,8 @@
#pragma once #pragma once
#ifndef COLOR_H
#define COLOR_H
#include <cstdint> #include <cstdint>
#include "esp_attr.h" #include "esp_attr.h"
union Hsv; union Hsv;
@@ -67,3 +70,5 @@ union Hsv {
bool operator==( Hsv in ) const { return in.value == value; } bool operator==( Hsv in ) const { return in.value == value; }
void swap( Hsv& o ) { value = o.value; } void swap( Hsv& o ) { value = o.value; }
}; };
#endif //COLOR_H

View File

@@ -1,5 +1,8 @@
#pragma once #pragma once
#ifndef SMARTLEDS_H
#define SMARTLEDS_H
/* /*
* A C++ driver for the WS2812 LEDs using the RMT peripheral on the ESP32. * A C++ driver for the WS2812 LEDs using the RMT peripheral on the ESP32.
* *
@@ -528,3 +531,5 @@ private:
int _latchFrames; int _latchFrames;
uint8_t _latchBuffer[ LATCH_FRAME_SIZE_BYTES ]; uint8_t _latchBuffer[ LATCH_FRAME_SIZE_BYTES ];
}; };
#endif //SMARTLEDS_H

View File

@@ -1,3 +1,5 @@
#pragma once
#ifndef SERVER_GPIO_H #ifndef SERVER_GPIO_H
#define SERVER_GPIO_H #define SERVER_GPIO_H

View File

@@ -1,3 +1,5 @@
#pragma once
#ifndef CLASSCONTROLLCAMERA_H #ifndef CLASSCONTROLLCAMERA_H
#define CLASSCONTROLLCAMERA_H #define CLASSCONTROLLCAMERA_H

View File

@@ -11,6 +11,8 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#pragma once
#ifndef _IMG_CONVERTERS_H_ #ifndef _IMG_CONVERTERS_H_
#define _IMG_CONVERTERS_H_ #define _IMG_CONVERTERS_H_

View File

@@ -1,245 +0,0 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Sensor abstraction layer.
*
*/
#ifndef __SENSOR_H__
#define __SENSOR_H__
#include <stdint.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
OV9650_PID = 0x96,
OV7725_PID = 0x77,
OV2640_PID = 0x26,
OV3660_PID = 0x3660,
OV5640_PID = 0x5640,
OV7670_PID = 0x76,
NT99141_PID = 0x1410,
GC2145_PID = 0x2145,
GC032A_PID = 0x232a,
GC0308_PID = 0x9b,
} camera_pid_t;
typedef enum {
CAMERA_OV7725,
CAMERA_OV2640,
CAMERA_OV3660,
CAMERA_OV5640,
CAMERA_OV7670,
CAMERA_NT99141,
CAMERA_GC2145,
CAMERA_GC032A,
CAMERA_GC0308,
CAMERA_MODEL_MAX,
CAMERA_NONE,
} camera_model_t;
typedef enum {
OV2640_SCCB_ADDR = 0x30,// 0x60 >> 1
OV5640_SCCB_ADDR = 0x3C,// 0x78 >> 1
OV3660_SCCB_ADDR = 0x3C,// 0x78 >> 1
OV7725_SCCB_ADDR = 0x21,// 0x42 >> 1
OV7670_SCCB_ADDR = 0x21,// 0x42 >> 1
NT99141_SCCB_ADDR = 0x2A,// 0x54 >> 1
GC2145_SCCB_ADDR = 0x3C,// 0x78 >> 1
GC032A_SCCB_ADDR = 0x21,// 0x42 >> 1
GC0308_SCCB_ADDR = 0x21,// 0x42 >> 1
} camera_sccb_addr_t;
typedef enum {
PIXFORMAT_RGB565, // 2BPP/RGB565
PIXFORMAT_YUV422, // 2BPP/YUV422
PIXFORMAT_GRAYSCALE, // 1BPP/GRAYSCALE
PIXFORMAT_JPEG, // JPEG/COMPRESSED
PIXFORMAT_RGB888, // 3BPP/RGB888
PIXFORMAT_RAW, // RAW
PIXFORMAT_RGB444, // 3BP2P/RGB444
PIXFORMAT_RGB555, // 3BP2P/RGB555
} pixformat_t;
typedef enum {
FRAMESIZE_96X96, // 96x96
FRAMESIZE_QQVGA, // 160x120
FRAMESIZE_QCIF, // 176x144
FRAMESIZE_HQVGA, // 240x176
FRAMESIZE_240X240, // 240x240
FRAMESIZE_QVGA, // 320x240
FRAMESIZE_CIF, // 400x296
FRAMESIZE_HVGA, // 480x320
FRAMESIZE_VGA, // 640x480
FRAMESIZE_SVGA, // 800x600
FRAMESIZE_XGA, // 1024x768
FRAMESIZE_HD, // 1280x720
FRAMESIZE_SXGA, // 1280x1024
FRAMESIZE_UXGA, // 1600x1200
// 3MP Sensors
FRAMESIZE_FHD, // 1920x1080
FRAMESIZE_P_HD, // 720x1280
FRAMESIZE_P_3MP, // 864x1536
FRAMESIZE_QXGA, // 2048x1536
// 5MP Sensors
FRAMESIZE_QHD, // 2560x1440
FRAMESIZE_WQXGA, // 2560x1600
FRAMESIZE_P_FHD, // 1080x1920
FRAMESIZE_QSXGA, // 2560x1920
FRAMESIZE_INVALID
} framesize_t;
typedef struct {
const camera_model_t model;
const char *name;
const camera_sccb_addr_t sccb_addr;
const camera_pid_t pid;
const framesize_t max_size;
const bool support_jpeg;
} camera_sensor_info_t;
typedef enum {
ASPECT_RATIO_4X3,
ASPECT_RATIO_3X2,
ASPECT_RATIO_16X10,
ASPECT_RATIO_5X3,
ASPECT_RATIO_16X9,
ASPECT_RATIO_21X9,
ASPECT_RATIO_5X4,
ASPECT_RATIO_1X1,
ASPECT_RATIO_9X16
} aspect_ratio_t;
typedef enum {
GAINCEILING_2X,
GAINCEILING_4X,
GAINCEILING_8X,
GAINCEILING_16X,
GAINCEILING_32X,
GAINCEILING_64X,
GAINCEILING_128X,
} gainceiling_t;
typedef struct {
uint16_t max_width;
uint16_t max_height;
uint16_t start_x;
uint16_t start_y;
uint16_t end_x;
uint16_t end_y;
uint16_t offset_x;
uint16_t offset_y;
uint16_t total_x;
uint16_t total_y;
} ratio_settings_t;
typedef struct {
const uint16_t width;
const uint16_t height;
const aspect_ratio_t aspect_ratio;
} resolution_info_t;
// Resolution table (in sensor.c)
extern const resolution_info_t resolution[];
// camera sensor table (in sensor.c)
extern const camera_sensor_info_t camera_sensor[];
typedef struct {
uint8_t MIDH;
uint8_t MIDL;
uint16_t PID;
uint8_t VER;
} sensor_id_t;
typedef struct {
framesize_t framesize;//0 - 10
bool scale;
bool binning;
uint8_t quality;//0 - 63
int8_t brightness;//-2 - 2
int8_t contrast;//-2 - 2
int8_t saturation;//-2 - 2
int8_t sharpness;//-2 - 2
uint8_t denoise;
uint8_t special_effect;//0 - 6
uint8_t wb_mode;//0 - 4
uint8_t awb;
uint8_t awb_gain;
uint8_t aec;
uint8_t aec2;
int8_t ae_level;//-2 - 2
uint16_t aec_value;//0 - 1200
uint8_t agc;
uint8_t agc_gain;//0 - 30
uint8_t gainceiling;//0 - 6
uint8_t bpc;
uint8_t wpc;
uint8_t raw_gma;
uint8_t lenc;
uint8_t hmirror;
uint8_t vflip;
uint8_t dcw;
uint8_t colorbar;
} camera_status_t;
typedef struct _sensor sensor_t;
typedef struct _sensor {
sensor_id_t id; // Sensor ID.
uint8_t slv_addr; // Sensor I2C slave address.
pixformat_t pixformat;
camera_status_t status;
int xclk_freq_hz;
// Sensor function pointers
int (*init_status) (sensor_t *sensor);
int (*reset) (sensor_t *sensor);
int (*set_pixformat) (sensor_t *sensor, pixformat_t pixformat);
int (*set_framesize) (sensor_t *sensor, framesize_t framesize);
int (*set_contrast) (sensor_t *sensor, int level);
int (*set_brightness) (sensor_t *sensor, int level);
int (*set_saturation) (sensor_t *sensor, int level);
int (*set_sharpness) (sensor_t *sensor, int level);
int (*set_denoise) (sensor_t *sensor, int level);
int (*set_gainceiling) (sensor_t *sensor, gainceiling_t gainceiling);
int (*set_quality) (sensor_t *sensor, int quality);
int (*set_colorbar) (sensor_t *sensor, int enable);
int (*set_whitebal) (sensor_t *sensor, int enable);
int (*set_gain_ctrl) (sensor_t *sensor, int enable);
int (*set_exposure_ctrl) (sensor_t *sensor, int enable);
int (*set_hmirror) (sensor_t *sensor, int enable);
int (*set_vflip) (sensor_t *sensor, int enable);
int (*set_aec2) (sensor_t *sensor, int enable);
int (*set_awb_gain) (sensor_t *sensor, int enable);
int (*set_agc_gain) (sensor_t *sensor, int gain);
int (*set_aec_value) (sensor_t *sensor, int gain);
int (*set_special_effect) (sensor_t *sensor, int effect);
int (*set_wb_mode) (sensor_t *sensor, int mode);
int (*set_ae_level) (sensor_t *sensor, int level);
int (*set_dcw) (sensor_t *sensor, int enable);
int (*set_bpc) (sensor_t *sensor, int enable);
int (*set_wpc) (sensor_t *sensor, int enable);
int (*set_raw_gma) (sensor_t *sensor, int enable);
int (*set_lenc) (sensor_t *sensor, int enable);
int (*get_reg) (sensor_t *sensor, int reg, int mask);
int (*set_reg) (sensor_t *sensor, int reg, int mask, int value);
int (*set_res_raw) (sensor_t *sensor, int startX, int startY, int endX, int endY, int offsetX, int offsetY, int totalX, int totalY, int outputX, int outputY, bool scale, bool binning);
int (*set_pll) (sensor_t *sensor, int bypass, int mul, int sys, int root, int pre, int seld5, int pclken, int pclk);
int (*set_xclk) (sensor_t *sensor, int timer, int xclk);
} sensor_t;
camera_sensor_info_t *esp_camera_sensor_get_info(sensor_id_t *id);
#ifdef __cplusplus
}
#endif
#endif /* __SENSOR_H__ */

View File

@@ -1,3 +1,5 @@
#pragma once
#ifndef JOMJOL_CONTROLCAMERA_H #ifndef JOMJOL_CONTROLCAMERA_H
#define JOMJOL_CONTROLCAMERA_H #define JOMJOL_CONTROLCAMERA_H

View File

@@ -1,3 +1,8 @@
#pragma once
#ifndef SERVERFILE_H
#define SERVERFILE_H
#include <esp_http_server.h> #include <esp_http_server.h>
#include <string> #include <string>
@@ -13,3 +18,4 @@ esp_err_t get_tflite_file_handler(httpd_req_t *req);
esp_err_t get_data_file_handler(httpd_req_t *req); esp_err_t get_data_file_handler(httpd_req_t *req);
esp_err_t get_numbers_file_handler(httpd_req_t *req); esp_err_t get_numbers_file_handler(httpd_req_t *req);
#endif //SERVERFILE_H

View File

@@ -1,3 +1,8 @@
#pragma once
#ifndef SERVERHELP_H
#define SERVERHELP_H
#include <string> #include <string>
//#include <sys/param.h> //#include <sys/param.h>
#include "esp_http_server.h" #include "esp_http_server.h"
@@ -7,4 +12,6 @@ const char* get_path_from_uri(char *dest, const char *base_path, const char *uri
esp_err_t send_file(httpd_req_t *req, std::string filename); esp_err_t send_file(httpd_req_t *req, std::string filename);
esp_err_t set_content_type_from_file(httpd_req_t *req, const char *filename); esp_err_t set_content_type_from_file(httpd_req_t *req, const char *filename);
#endif //SERVERHELP_H

View File

@@ -1,3 +1,8 @@
#pragma once
#ifndef SERVEROTA_H
#define SERVEROTA_H
#include <esp_log.h> #include <esp_log.h>
#include <esp_http_server.h> #include <esp_http_server.h>
@@ -10,4 +15,6 @@ void CheckOTAUpdate();
void doReboot(); void doReboot();
void hard_restart(); void hard_restart();
void CheckUpdate(); void CheckUpdate();
static bool ota_update_task(std::string fn); static bool ota_update_task(std::string fn);
#endif //SERVEROTA_H

View File

@@ -1,5 +1,8 @@
#pragma once #pragma once
#ifndef CLASSFLOW_H
#define CLASSFLOW_H
#include <fstream> #include <fstream>
#include <string> #include <string>
#include <vector> #include <vector>
@@ -48,3 +51,4 @@ public:
}; };
#endif //CLASSFLOW_H

View File

@@ -1,5 +1,8 @@
#pragma once #pragma once
#ifndef CLASSFLOWALIGNMENT_H
#define CLASSFLOWALIGNMENT_H
#include "ClassFlow.h" #include "ClassFlow.h"
#include "Helper.h" #include "Helper.h"
#include "CAlignAndCutImage.h" #include "CAlignAndCutImage.h"
@@ -44,3 +47,5 @@ public:
string name(){return "ClassFlowAlignment";}; string name(){return "ClassFlowAlignment";};
}; };
#endif //CLASSFLOWALIGNMENT_H

View File

@@ -1,5 +1,7 @@
#ifndef __CLASSCNNGENERAL__ #pragma once
#define __CLASSCNNGENERAL__
#ifndef CLASSFLOWCNNGENERAL_H
#define CLASSFLOWCNNGENERAL_H
#include"ClassFlowDefineTypes.h" #include"ClassFlowDefineTypes.h"
#include "ClassFlowAlignment.h" #include "ClassFlowAlignment.h"

View File

@@ -1,7 +1,7 @@
#pragma once
#ifndef CLASSFLOWCONTROLL_H
#ifndef __FLOWCONTROLL__ #define CLASSFLOWCONTROLL_H
#define __FLOWCONTROLL__
#include <string> #include <string>

View File

@@ -1,5 +1,7 @@
#ifndef __CLASSFLOWIMAGE_CLASS__ #pragma once
#define __CLASSFLOWIMAGE_CLASS__
#ifndef CLASSFLOWDEFINETYPES_H
#define CLASSFLOWDEFINETYPES_H
#include "ClassFlowImage.h" #include "ClassFlowImage.h"

View File

@@ -1,4 +1,8 @@
#pragma once #pragma once
#ifndef CLASSFLOWIMAGE_H
#define CLASSFLOWIMAGE_H
#include "ClassFlow.h" #include "ClassFlow.h"
using namespace std; using namespace std;
@@ -22,3 +26,5 @@ public:
void RemoveOldLogs(); void RemoveOldLogs();
}; };
#endif //CLASSFLOWIMAGE_H

View File

@@ -1,5 +1,10 @@
#ifdef ENABLE_INFLUXDB #ifdef ENABLE_INFLUXDB
#pragma once #pragma once
#ifndef CLASSFINFLUXDB_H
#define CLASSFINFLUXDB_H
#include "ClassFlow.h" #include "ClassFlow.h"
#include "ClassFlowPostProcessing.h" #include "ClassFlowPostProcessing.h"
@@ -30,4 +35,5 @@ public:
string name(){return "ClassFlowInfluxDB";}; string name(){return "ClassFlowInfluxDB";};
}; };
#endif //CLASSFINFLUXDB_H
#endif //ENABLE_INFLUXDB #endif //ENABLE_INFLUXDB

View File

@@ -1,5 +1,10 @@
#ifdef ENABLE_MQTT #ifdef ENABLE_MQTT
#pragma once #pragma once
#ifndef CLASSFFLOWMQTT_H
#define CLASSFFLOWMQTT_H
#include "ClassFlow.h" #include "ClassFlow.h"
#include "ClassFlowPostProcessing.h" #include "ClassFlowPostProcessing.h"
@@ -33,5 +38,5 @@ public:
bool doFlow(string time); bool doFlow(string time);
string name(){return "ClassFlowMQTT";}; string name(){return "ClassFlowMQTT";};
}; };
#endif //CLASSFFLOWMQTT_H
#endif //ENABLE_MQTT #endif //ENABLE_MQTT

View File

@@ -1,4 +1,8 @@
#pragma once #pragma once
#ifndef CLASSFFLOWMAKEIMAGE_H
#define CLASSFFLOWMAKEIMAGE_H
#include "ClassFlowImage.h" #include "ClassFlowImage.h"
#include "ClassControllCamera.h" #include "ClassControllCamera.h"
#include "../../include/defines.h" #include "../../include/defines.h"
@@ -48,3 +52,4 @@ public:
}; };
#endif //CLASSFFLOWMAKEIMAGE_H

View File

@@ -1,5 +1,7 @@
#ifndef __FLOWPOSTPROCESSING__ #pragma once
#define __FLOWPOSTPROCESSING__
#ifndef CLASSFFLOWPOSTPROCESSING_H
#define CLASSFFLOWPOSTPROCESSING_H
#include "ClassFlow.h" #include "ClassFlow.h"
#include "ClassFlowMakeImage.h" #include "ClassFlowMakeImage.h"
@@ -76,4 +78,4 @@ public:
}; };
#endif #endif //CLASSFFLOWPOSTPROCESSING_H

View File

@@ -1,4 +1,8 @@
#pragma once #pragma once
#ifndef CLASSFFLOWPWRITELIST_H
#define CLASSFFLOWPWRITELIST_H
#include "ClassFlow.h" #include "ClassFlow.h"
#include "ClassFlowPostProcessing.h" #include "ClassFlowPostProcessing.h"
@@ -20,3 +24,4 @@ public:
string name(){return "ClassFlowWriteList";}; string name(){return "ClassFlowWriteList";};
}; };
#endif //CLASSFFLOWPWRITELIST_H

View File

@@ -1,4 +1,8 @@
#pragma once #pragma once
#ifndef HELPER_H
#define HELPER_H
#include <string> #include <string>
#include <fstream> #include <fstream>
#include <vector> #include <vector>
@@ -88,3 +92,5 @@ string getResetReason(void);
std::string getFormatedUptime(bool compact); std::string getFormatedUptime(bool compact);
const char* get404(void); const char* get404(void);
#endif //HELPER_H

View File

@@ -1,3 +1,8 @@
#pragma once
#ifndef CALIGNANDCUTIMAGE_H
#define CALIGNANDCUTIMAGE_H
#include "CImageBasis.h" #include "CImageBasis.h"
#include "CFindTemplate.h" #include "CFindTemplate.h"
@@ -19,3 +24,4 @@ class CAlignAndCutImage : public CImageBasis
void GetRefSize(int *ref_dx, int *ref_dy); void GetRefSize(int *ref_dx, int *ref_dy);
}; };
#endif //CALIGNANDCUTIMAGE_H

View File

@@ -1,5 +1,7 @@
#ifndef __CFINDTEMPLATE_CLASS #pragma once
#define __CFINDTEMPLATE_CLASS
#ifndef CFINDTEMPLATE_H
#define CFINDTEMPLATE_H
#include "CImageBasis.h" #include "CImageBasis.h"
@@ -37,4 +39,4 @@ class CFindTemplate : public CImageBasis
bool CalculateSimularities(uint8_t* _rgb_tmpl, int _startx, int _starty, int _sizex, int _sizey, int &min, float &avg, int &max, float &SAD, float _SADold, float _SADcrit); bool CalculateSimularities(uint8_t* _rgb_tmpl, int _startx, int _starty, int _sizex, int _sizey, int &min, float &avg, int &max, float &SAD, float _SADold, float _SADcrit);
}; };
#endif #endif //CFINDTEMPLATE_H

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#ifndef __CIMAGEBASIS #ifndef CIMAGEBASIS_H
#define __CIMAGEBASIS #define CIMAGEBASIS_H
#include <stdint.h> #include <stdint.h>
#include <string> #include <string>
@@ -86,5 +86,5 @@ class CImageBasis
}; };
#endif #endif //CIMAGEBASIS_H

View File

@@ -1,3 +1,8 @@
#pragma once
#ifndef CROTATEIMAGE_H
#define CROTATEIMAGE_H
#include "CImageBasis.h" #include "CImageBasis.h"
@@ -19,3 +24,5 @@ class CRotateImage: public CImageBasis
void Translate(int _dx, int _dy); void Translate(int _dx, int _dy);
void Mirror(); void Mirror();
}; };
#endif //CROTATEIMAGE_H

View File

@@ -1,4 +1,6 @@
#ifdef ENABLE_INFLUXDB #ifdef ENABLE_INFLUXDB
#pragma once
#ifndef INTERFACE_INFLUXDB_H #ifndef INTERFACE_INFLUXDB_H
#define INTERFACE_INFLUXDB_H #define INTERFACE_INFLUXDB_H

View File

@@ -1,3 +1,8 @@
#pragma once
#ifndef CLASSLOGFILE_H
#define CLASSLOGFILE_H
#include <string> #include <string>
#include "esp_log.h" #include "esp_log.h"
@@ -44,4 +49,6 @@ public:
std::string GetCurrentFileNameData(); std::string GetCurrentFileNameData();
}; };
extern ClassLogFile LogFile; extern ClassLogFile LogFile;
#endif //CLASSLOGFILE_H

View File

@@ -1,4 +1,7 @@
#ifdef ENABLE_MQTT #ifdef ENABLE_MQTT
#pragma once
#ifndef INTERFACE_MQTT_H #ifndef INTERFACE_MQTT_H
#define INTERFACE_MQTT_H #define INTERFACE_MQTT_H

View File

@@ -1,5 +1,10 @@
#ifdef ENABLE_MQTT #ifdef ENABLE_MQTT
#pragma once
#ifndef SERVERMQTT_H
#define SERVERMQTT_H
#include "ClassFlowDefineTypes.h" #include "ClassFlowDefineTypes.h"
void SetHomeassistantDiscoveryEnabled(bool enabled); void SetHomeassistantDiscoveryEnabled(bool enabled);
@@ -16,4 +21,6 @@ void publishSystemData();
std::string getTimeUnit(void); std::string getTimeUnit(void);
void GotConnected(std::string maintopic, int SetRetainFlag); void GotConnected(std::string maintopic, int SetRetainFlag);
#endif //SERVERMQTT_H
#endif //ENABLE_MQTT #endif //ENABLE_MQTT

View File

@@ -1,11 +1,7 @@
#pragma once
/* #ifndef CTFLITECLASS_H
#define TFLITE_MINIMAL_CHECK(x) \ #define CTFLITECLASS_H
if (!(x)) { \
fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); \
exit(1); \
}
*/
#include "tensorflow/lite/micro/all_ops_resolver.h" #include "tensorflow/lite/micro/all_ops_resolver.h"
#include "tensorflow/lite/micro/micro_error_reporter.h" #include "tensorflow/lite/micro/micro_error_reporter.h"
@@ -72,3 +68,4 @@ class CTfLiteClass
int ReadInputDimenstion(int _dim); int ReadInputDimenstion(int _dim);
}; };
#endif //CTFLITECLASS_H

View File

@@ -1,3 +1,8 @@
#pragma once
#ifndef SERVERTFLITE_H
#define SERVERTFLITE_H
#include <esp_log.h> #include <esp_log.h>
#include <string> #include <string>
@@ -26,3 +31,5 @@ esp_err_t GetJPG(std::string _filename, httpd_req_t *req);
esp_err_t GetRawJPG(httpd_req_t *req); esp_err_t GetRawJPG(httpd_req_t *req);
extern ClassFlowControll tfliteflow; extern ClassFlowControll tfliteflow;
#endif //SERVERTFLITE_H

View File

@@ -1,3 +1,9 @@
#pragma once
#ifndef TIMESNTP_H
#define TIMESNTP_H
#include <string> #include <string>
#include <time.h> #include <time.h>
#include <sys/time.h> #include <sys/time.h>
@@ -23,4 +29,6 @@ void reset_servername(std::string _servername);
void setBootTime(); void setBootTime();
time_t getUpTime(); time_t getUpTime();
bool getTimeIsSet(void); bool getTimeIsSet(void);
void restartNtpClient(void); void restartNtpClient(void);
#endif //TIMESNTP_H

View File

@@ -1,3 +1,5 @@
#pragma once
#ifndef CONNECT_WLAN_H #ifndef CONNECT_WLAN_H
#define CONNECT_WLAN_H #define CONNECT_WLAN_H
@@ -15,4 +17,4 @@ bool getWIFIisConnected();
extern std::string hostname; extern std::string hostname;
extern std::string std_hostname; extern std::string std_hostname;
#endif #endif //CONNECT_WLAN_H

View File

@@ -1,3 +1,5 @@
#pragma once
#ifndef READ_WLANINI_H #ifndef READ_WLANINI_H
#define READ_WLANINI_H #define READ_WLANINI_H
@@ -8,4 +10,4 @@ void LoadWlanFromFile(std::string fn, char *&_ssid, char *&_password, char *&_ho
bool ChangeHostName(std::string fn, std::string _newhostname); bool ChangeHostName(std::string fn, std::string _newhostname);
#endif #endif //READ_WLANINI_H

View File

@@ -1,22 +1,24 @@
#include <string> //#include <string>
#include "freertos/FreeRTOS.h" //#include "freertos/FreeRTOS.h"
#include "freertos/task.h" //#include "freertos/task.h"
#include "freertos/event_groups.h" //#include "freertos/event_groups.h"
#include "driver/gpio.h" //#include "driver/gpio.h"
#include "sdkconfig.h" //#include "sdkconfig.h"
//#include "esp_psram.h" // Comming in IDF 5.0, see https://docs.espressif.com/projects/esp-idf/en/v5.0-beta1/esp32/migration-guides/release-5.x/system.html?highlight=esp_psram_get_size //#include "esp_psram.h" // Comming in IDF 5.0, see https://docs.espressif.com/projects/esp-idf/en/v5.0-beta1/esp32/migration-guides/release-5.x/system.html?highlight=esp_psram_get_size
//#include "spiram.h" //#include "spiram.h"
#include "esp32/spiram.h" #include "esp32/spiram.h"
// SD-Card //////////////////// // SD-Card ////////////////////
#include "nvs_flash.h" //#include "nvs_flash.h"
#include "esp_vfs_fat.h" #include "esp_vfs_fat.h"
#include "sdmmc_cmd.h" //#include "sdmmc_cmd.h"
#include "driver/sdmmc_host.h" #include "driver/sdmmc_host.h"
#include "driver/sdmmc_defs.h" //#include "driver/sdmmc_defs.h"
/////////////////////////////// ///////////////////////////////
#include "ClassLogFile.h" #include "ClassLogFile.h"
#include "connect_wlan.h" #include "connect_wlan.h"
@@ -27,15 +29,15 @@
#include "server_file.h" #include "server_file.h"
#include "server_ota.h" #include "server_ota.h"
#include "time_sntp.h" #include "time_sntp.h"
#include "ClassControllCamera.h" //#include "ClassControllCamera.h"
#include "server_main.h" #include "server_main.h"
#include "server_camera.h" #include "server_camera.h"
#ifdef ENABLE_MQTT #ifdef ENABLE_MQTT
#include "server_mqtt.h" #include "server_mqtt.h"
#endif //ENABLE_MQTT #endif //ENABLE_MQTT
#include "Helper.h" //#include "Helper.h"
#include "../../include/defines.h" #include "../../include/defines.h"
#include "server_GPIO.h" //#include "server_GPIO.h"
extern const char* GIT_TAG; extern const char* GIT_TAG;
extern const char* GIT_REV; extern const char* GIT_REV;