Update arduino-esp32 from 2.0.16 to 3.0.2 (from ESP IDF 4.4.7 to ESP IDF 5.1.4)
parent
51330258d4
commit
a82fa2e48c
|
|
@ -1,37 +0,0 @@
|
|||
/**
|
||||
@file Camera_cfg.h
|
||||
|
||||
@brief Here is saved camera GPIO cfg for camera module OV2640
|
||||
|
||||
@author Miroslav Pivovarsky
|
||||
Contact: miroslav.pivovarsky@gmail.com
|
||||
|
||||
@bug: no know bug
|
||||
*/
|
||||
|
||||
#ifndef _CAMERA_CFG_H_
|
||||
#define _CAMERA_CFG_H_
|
||||
|
||||
// OV2640 camera module pins (CAMERA_MODEL_AI_THINKER)
|
||||
#define PWDN_GPIO_NUM 32 ///< Power down control pin
|
||||
#define RESET_GPIO_NUM -1 ///< Reset control pin
|
||||
#define XCLK_GPIO_NUM 0 ///< External clock pin
|
||||
#define SIOD_GPIO_NUM 26 ///< SCCB: SI/O data pin
|
||||
#define SIOC_GPIO_NUM 27 ///< SCCB: SI/O control pin
|
||||
#define Y9_GPIO_NUM 35 ///< SCCB: Y9 pin
|
||||
#define Y8_GPIO_NUM 34 ///< SCCB: Y8 pin
|
||||
#define Y7_GPIO_NUM 39 ///< SCCB: Y7 pin
|
||||
#define Y6_GPIO_NUM 36 ///< SCCB: Y6 pin
|
||||
#define Y5_GPIO_NUM 21 ///< SCCB: Y5 pin
|
||||
#define Y4_GPIO_NUM 19 ///< SCCB: Y4 pin
|
||||
#define Y3_GPIO_NUM 18 ///< SCCB: Y3 pin
|
||||
#define Y2_GPIO_NUM 5 ///< SCCB: Y2 pin
|
||||
#define VSYNC_GPIO_NUM 25 ///< Vertical sync pin
|
||||
#define HREF_GPIO_NUM 23 ///< Line sync pin
|
||||
#define PCLK_GPIO_NUM 22 ///< Pixel clock pin
|
||||
|
||||
#define FLASH_GPIO_NUM 4 ///< Flash control pin
|
||||
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
|
|
@ -9,8 +9,7 @@
|
|||
@bug: no know bug
|
||||
*/
|
||||
|
||||
#ifndef _CERTIFICATE_H_
|
||||
#define _CERTIFICATE_H_
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
echo -n | openssl s_client -servername connect.prusa.com -connect connect.prusa.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > connect_prusa_com.crt
|
||||
|
|
@ -54,6 +53,4 @@ emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=
|
|||
-----END CERTIFICATE-----
|
||||
)rawliteral";
|
||||
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
@bug: no know bug
|
||||
*/
|
||||
|
||||
#ifndef _CERTIFICATE_OTA_H_
|
||||
#define _CERTIFICATE_OTA_H_
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
echo -n | openssl s_client -servername github.com -connect github.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > github_com.crt
|
||||
|
|
@ -135,6 +134,4 @@ RNZu9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg=
|
|||
-----END CERTIFICATE-----
|
||||
)rawliteral";
|
||||
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@
|
|||
This project uses other libraries. It is necessary to install them in the arduino IDE.
|
||||
- Library - License - Version - Link
|
||||
- ESPAsyncWebServer - LGPL 3.0 - 2.10.8 - https://github.com/mathieucarbou/ESPAsyncWebServer
|
||||
- AsyncTCP - LGPL 3.0 - 1.1.4 - https://github.com/dvarrel/ESPAsyncTCP
|
||||
- AsyncTCP - LGPL 3.0 - 3.1.4 - https://github.com/mathieucarbou/AsyncTCP
|
||||
- ArduinoJson - MIT - 7.0.4 - https://github.com/bblanchon/ArduinoJson
|
||||
- ArduinoUniqueID - MIT - 1.3.0 - https://github.com/ricaun/ArduinoUniqueID
|
||||
- ESP32 - LGPL 2.1 - 2.0.16 - https://github.com/espressif/arduino-esp32
|
||||
- ESP32 - LGPL 2.1 - 3.0.1 - https://github.com/espressif/arduino-esp32
|
||||
|
||||
Arduino IDE configuration for the MCU are stored in the module_XXX.h file.
|
||||
|
||||
|
|
@ -38,14 +38,12 @@
|
|||
*/
|
||||
|
||||
/* includes */
|
||||
#include <WiFi.h>
|
||||
#include "Arduino.h"
|
||||
#include <esp_task_wdt.h>
|
||||
#include <ESPmDNS.h>
|
||||
#include <esp_wifi.h>
|
||||
#include "esp32-hal-cpu.h"
|
||||
|
||||
#include "server.h"
|
||||
#include "WebServer.h"
|
||||
#include "cfg.h"
|
||||
#include "var.h"
|
||||
#include "mcu_cfg.h"
|
||||
|
|
@ -107,43 +105,47 @@ void setup() {
|
|||
/* init class for communication with PrusaConnect */
|
||||
Connect.Init();
|
||||
|
||||
/* init wdg */
|
||||
SystemLog.AddEvent(LogLevel_Info, F("Init WDG"));
|
||||
esp_task_wdt_config_t twdt_config;
|
||||
twdt_config.timeout_ms = 60000;
|
||||
twdt_config.idle_core_mask = (1 << portNUM_PROCESSORS) - 1, /* Bitmask of all cores */
|
||||
twdt_config.trigger_panic = true;
|
||||
|
||||
esp_task_wdt_reconfigure(&twdt_config);
|
||||
//ESP_ERROR_CHECK(esp_task_wdt_init(&twdt_config)); /* enable panic so ESP32 restarts */
|
||||
ESP_ERROR_CHECK(esp_task_wdt_add(NULL)); /* add current thread to WDT watch */
|
||||
ESP_ERROR_CHECK(esp_task_wdt_reset()); /* reset wdg */
|
||||
|
||||
/* init tasks */
|
||||
SystemLog.AddEvent(LogLevel_Info, F("Start tasks"));
|
||||
xTaskCreatePinnedToCore(System_TaskMain, "SystemNtpOtaUpdate", 6200, NULL, 1, &Task_SystemMain, 0); /*function, description, stack size, parameters, priority, task handle, core*/
|
||||
ESP_ERROR_CHECK(esp_task_wdt_add(Task_SystemMain));
|
||||
xTaskCreatePinnedToCore(System_TaskCaptureAndSendPhoto, "CaptureAndSendPhoto", 4400, NULL, 2, &Task_CapturePhotoAndSend, 0); /*function, description, stack size, parameters, priority, task handle, core*/
|
||||
ESP_ERROR_CHECK(esp_task_wdt_add(Task_CapturePhotoAndSend));
|
||||
xTaskCreatePinnedToCore(System_TaskWifiManagement, "WiFiManagement", 2800, NULL, 3, &Task_WiFiManagement, 0); /*function, description, stack size, parameters, priority, task handle, core*/
|
||||
ESP_ERROR_CHECK(esp_task_wdt_add(Task_WiFiManagement));
|
||||
#if (true == ENABLE_SD_CARD)
|
||||
xTaskCreatePinnedToCore(System_TaskSdCardCheck, "CheckMicroSdCard", 3000, NULL, 4, &Task_SdCardCheck, 0); /*function, description, stack size, parameters, priority, task handle, core*/
|
||||
ESP_ERROR_CHECK(esp_task_wdt_add(Task_SdCardCheck));
|
||||
#endif
|
||||
xTaskCreatePinnedToCore(System_TaskSerialCfg, "CheckSerialConfiguration", 2600, NULL, 5, &Task_SerialCfg, 0); /*function, description, stack size, parameters, priority, task handle, core*/
|
||||
ESP_ERROR_CHECK(esp_task_wdt_add(Task_SerialCfg));
|
||||
xTaskCreatePinnedToCore(System_TaskStreamTelemetry, "PrintStreamTelemetry", 2200, NULL, 6, &Task_StreamTelemetry, 0); /*function, description, stack size, parameters, priority, task handle, core*/
|
||||
ESP_ERROR_CHECK(esp_task_wdt_add(Task_StreamTelemetry));
|
||||
xTaskCreatePinnedToCore(System_TaskSysLed, "SystemLed", 2100, NULL, 7, &Task_SysLed, 0); /*function, description, stack size, parameters, priority, task handle, core*/
|
||||
ESP_ERROR_CHECK(esp_task_wdt_add(Task_SysLed));
|
||||
xTaskCreatePinnedToCore(System_TaskWiFiWatchdog, "WiFiWatchdog", 2200, NULL, 8, &Task_WiFiWatchdog, 0); /*function, description, stack size, parameters, priority, task handle, core*/
|
||||
ESP_ERROR_CHECK(esp_task_wdt_add(Task_WiFiWatchdog));
|
||||
//xTaskCreatePinnedToCore(System_TaskSdCardRemove, "SdCardRemove", 3000, NULL, 9, &Task_SdCardFileRemove, 0); /*function, description, stack size, parameters, priority, task handle, core*/
|
||||
|
||||
/* init wdg */
|
||||
SystemLog.AddEvent(LogLevel_Info, F("Init WDG"));
|
||||
esp_task_wdt_init(WDG_TIMEOUT, true); /* enable panic so ESP32 restarts */
|
||||
esp_task_wdt_add(NULL); /* add current thread to WDT watch */
|
||||
esp_task_wdt_add(Task_CapturePhotoAndSend);
|
||||
esp_task_wdt_add(Task_WiFiManagement);
|
||||
esp_task_wdt_add(Task_SystemMain);
|
||||
#if (true == ENABLE_SD_CARD)
|
||||
esp_task_wdt_add(Task_SdCardCheck);
|
||||
#endif
|
||||
esp_task_wdt_add(Task_SerialCfg);
|
||||
esp_task_wdt_add(Task_StreamTelemetry);
|
||||
esp_task_wdt_add(Task_SysLed);
|
||||
esp_task_wdt_add(Task_WiFiWatchdog);
|
||||
//esp_task_wdt_add(Task_SdCardFileRemove);
|
||||
esp_task_wdt_reset(); /* reset wdg */
|
||||
|
||||
SystemLog.AddEvent(LogLevel_Info, F("MCU configuration done"));
|
||||
}
|
||||
|
||||
void loop() {
|
||||
/* reset wdg */
|
||||
esp_task_wdt_reset();
|
||||
ESP_ERROR_CHECK(esp_task_wdt_reset());
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
@ -11,8 +11,7 @@
|
|||
@bug: no know bug
|
||||
*/
|
||||
|
||||
#ifndef _WEB_PAGE_H_
|
||||
#define _WEB_PAGE_H_
|
||||
#pragma once
|
||||
|
||||
#define MSG_REBOOT_MCU "Reboot process started, wait several seconds for mcu to boot up. You can close this window now"
|
||||
#define MSG_SAVE_OK_REBOOT "Save OK. Please reboot MCU" ///< WEB app msg save OK
|
||||
|
|
@ -1412,6 +1411,4 @@ const char cookies_html[] PROGMEM = R"rawliteral(
|
|||
</script>
|
||||
)rawliteral";
|
||||
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@
|
|||
@bug: no know bug
|
||||
*/
|
||||
|
||||
#ifndef _WEB_PAGE_ICONS_H_
|
||||
#define _WEB_PAGE_ICONS_H_
|
||||
#pragma once
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------------------ */
|
||||
const char esp32_cam_logo_svg[] PROGMEM = R"rawliteral(
|
||||
|
|
@ -89,7 +88,4 @@ const char favicon_svg[] PROGMEM = R"rawliteral(
|
|||
</svg>
|
||||
)rawliteral";
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
*/
|
||||
|
||||
#include "server.h"
|
||||
#include "WebServer.h"
|
||||
#include "Certificate.h"
|
||||
|
||||
AsyncWebServer server(WEB_SERVER_PORT);
|
||||
|
|
@ -10,21 +10,16 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef _SERVER_H_
|
||||
#define _SERVER_H_
|
||||
#pragma once
|
||||
|
||||
#include <AsyncEventSource.h>
|
||||
#include <AsyncWebSocket.h>
|
||||
#include <AsyncWebSynchronization.h>
|
||||
#include <Arduino.h>
|
||||
#include <WiFi.h>
|
||||
#include <AsyncTCP.h>
|
||||
#include <ESPAsyncWebServer.h>
|
||||
#include <esp_task_wdt.h>
|
||||
#include <StringArray.h>
|
||||
#include <WiFiClientSecure.h>
|
||||
#include <HTTPClient.h>
|
||||
#include <EEPROM.h>
|
||||
#include <Update.h>
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
#include "micro_sd.h"
|
||||
#include "log.h"
|
||||
#include "WebPage.h"
|
||||
#include "WebPage_Icons.h"
|
||||
#include "mcu_cfg.h"
|
||||
|
|
@ -33,12 +28,9 @@
|
|||
#include "cfg.h"
|
||||
#include "jquery.h"
|
||||
#include "system.h"
|
||||
#include "log.h"
|
||||
#include "connect.h"
|
||||
#include "wifi_mngt.h"
|
||||
#include "stream.h"
|
||||
|
||||
#include "exif.h"
|
||||
#include "WebStream.h"
|
||||
|
||||
extern AsyncWebServer server; ///< global variable for web server
|
||||
|
||||
|
|
@ -67,6 +59,4 @@ bool Server_TransfeStringToBool(String);
|
|||
|
||||
String Server_TranslateBoolToString(bool);
|
||||
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
@bug: no know bug
|
||||
*/
|
||||
#include "stream.h"
|
||||
#include "WebStream.h"
|
||||
|
||||
#define PART_BOUNDARY "123456789000000000000987654321" ///< Must be unique for each stream
|
||||
static const char *STREAM_CONTENT_TYPE = "multipart/x-mixed-replace;boundary=" PART_BOUNDARY; ///< content type for stream
|
||||
|
|
@ -11,12 +11,14 @@
|
|||
@bug: no know bug
|
||||
*/
|
||||
|
||||
#ifndef _STREAM_H_
|
||||
#define _STREAM_H_
|
||||
#pragma once
|
||||
|
||||
#include "ESPAsyncWebServer.h"
|
||||
#include <Arduino.h>
|
||||
#include <WiFi.h>
|
||||
#include <AsyncTCP.h>
|
||||
#include <ESPAsyncWebServer.h>
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "WebServer.h"
|
||||
#include "mcu_cfg.h"
|
||||
#include "var.h"
|
||||
#include "log.h"
|
||||
|
|
@ -71,5 +73,4 @@ public:
|
|||
size_t _content(uint8_t *, size_t , size_t );
|
||||
};
|
||||
|
||||
#endif
|
||||
/* EOF */
|
||||
|
|
@ -48,9 +48,8 @@ void Camera::Init() {
|
|||
log->AddEvent(LogLevel_Info, F("Init camera lib"));
|
||||
|
||||
log->AddEvent(LogLevel_Info, F("Init GPIO"));
|
||||
ledcSetup(FLASH_PWM_CHANNEL, FLASH_PWM_FREQ, FLASH_PWM_RESOLUTION);
|
||||
ledcAttachPin(FLASH_GPIO_NUM, FLASH_PWM_CHANNEL);
|
||||
ledcWrite(FLASH_PWM_CHANNEL, FLASH_OFF_STATUS);
|
||||
ledcAttach(FLASH_GPIO_NUM, FLASH_PWM_FREQ, FLASH_PWM_RESOLUTION);
|
||||
ledcWrite(FLASH_GPIO_NUM, FLASH_OFF_STATUS);
|
||||
|
||||
InitCameraModule();
|
||||
ApplyCameraCfg();
|
||||
|
|
@ -213,9 +212,9 @@ void Camera::SetPhotoSending(bool i_data) {
|
|||
*/
|
||||
void Camera::SetFlashStatus(bool i_data) {
|
||||
if (true == i_data) {
|
||||
ledcWrite(FLASH_PWM_CHANNEL, FLASH_ON_STATUS);
|
||||
ledcWrite(FLASH_GPIO_NUM, FLASH_ON_STATUS);
|
||||
} else if (false == i_data) {
|
||||
ledcWrite(FLASH_PWM_CHANNEL, FLASH_OFF_STATUS);
|
||||
ledcWrite(FLASH_GPIO_NUM, FLASH_OFF_STATUS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -225,9 +224,9 @@ void Camera::SetFlashStatus(bool i_data) {
|
|||
@return bool - true = on, false = off
|
||||
*/
|
||||
bool Camera::GetFlashStatus() {
|
||||
if (ledcRead(FLASH_PWM_CHANNEL) == FLASH_OFF_STATUS) {
|
||||
if (ledcRead(FLASH_GPIO_NUM) == FLASH_OFF_STATUS) {
|
||||
return false;
|
||||
} else if (ledcRead(FLASH_PWM_CHANNEL) == FLASH_ON_STATUS) {
|
||||
} else if (ledcRead(FLASH_GPIO_NUM) == FLASH_ON_STATUS) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -334,7 +333,7 @@ void Camera::CapturePhoto() {
|
|||
CameraCaptureSuccess = false;
|
||||
/* check flash, and enable FLASH LED */
|
||||
if (true == CameraFlashEnable) {
|
||||
ledcWrite(FLASH_PWM_CHANNEL, FLASH_ON_STATUS);
|
||||
ledcWrite(FLASH_GPIO_NUM, FLASH_ON_STATUS);
|
||||
delay(CameraFlashTime);
|
||||
}
|
||||
|
||||
|
|
@ -403,7 +402,7 @@ void Camera::CapturePhoto() {
|
|||
/* Disable flash */
|
||||
if (true == CameraFlashEnable) {
|
||||
//delay(CameraFlashTime);
|
||||
ledcWrite(FLASH_PWM_CHANNEL, FLASH_OFF_STATUS);
|
||||
ledcWrite(FLASH_GPIO_NUM, FLASH_OFF_STATUS);
|
||||
}
|
||||
xSemaphoreGive(frameBufferSemaphore);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
@bug: no know bug
|
||||
*/
|
||||
|
||||
#ifndef _CAMERA_H_
|
||||
#define _CAMERA_H_
|
||||
#pragma once
|
||||
|
||||
#include "esp_camera.h"
|
||||
#include "esp_timer.h"
|
||||
|
|
@ -18,13 +17,13 @@
|
|||
#include "soc/soc.h"
|
||||
#include "soc/rtc_cntl_reg.h"
|
||||
|
||||
#include "micro_sd.h"
|
||||
#include "log.h"
|
||||
#include "cfg.h"
|
||||
#include "exif.h"
|
||||
#include "module_templates.h"
|
||||
#include "Arduino.h"
|
||||
#include "mcu_cfg.h"
|
||||
#include "var.h"
|
||||
#include "log.h"
|
||||
|
||||
class Configuration;
|
||||
|
||||
|
|
@ -176,6 +175,4 @@ public:
|
|||
|
||||
extern Camera SystemCamera; ///< Camera object
|
||||
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
|
|
@ -9,19 +9,20 @@
|
|||
@bug: no know bug
|
||||
*/
|
||||
|
||||
#ifndef _CFG_H_
|
||||
#define _CFG_H_
|
||||
#include <WiFi.h>
|
||||
#include <EEPROM.h>
|
||||
#pragma once
|
||||
|
||||
#include "Arduino.h"
|
||||
#include <EEPROM.h>
|
||||
#include <Arduino.h>
|
||||
#include <ArduinoUniqueID.h>
|
||||
#include <base64.h>
|
||||
|
||||
#include "micro_sd.h"
|
||||
#include "log.h"
|
||||
#include "log_level.h"
|
||||
#include "mcu_cfg.h"
|
||||
#include "module_templates.h"
|
||||
#include "var.h"
|
||||
#include "log.h"
|
||||
#include "wifi_mngt.h"
|
||||
|
||||
class Configuration {
|
||||
public:
|
||||
|
|
@ -139,6 +140,4 @@ private:
|
|||
|
||||
extern Configuration SystemConfig; ///< Configuration object
|
||||
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
|
|
|
|||
|
|
@ -8,14 +8,12 @@
|
|||
|
||||
@bug: no know bug
|
||||
*/
|
||||
|
||||
#ifndef _PRUSA_CONNECT_H_
|
||||
#define _PRUSA_CONNECT_H_
|
||||
#pragma once
|
||||
|
||||
#include <WiFiClientSecure.h>
|
||||
#include <HTTPClient.h>
|
||||
#include <esp_task_wdt.h>
|
||||
#include "Arduino.h"
|
||||
#include <Arduino.h>
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
#include "wifi_mngt.h"
|
||||
|
|
@ -26,27 +24,11 @@
|
|||
#include "cfg.h"
|
||||
#include "Certificate.h"
|
||||
#include "server.h"
|
||||
#include "connect_types.h"
|
||||
|
||||
class WiFiMngt;
|
||||
|
||||
/**
|
||||
* @brief BackendAvailabilitStatus enum
|
||||
* status of backend availability
|
||||
*/
|
||||
enum BackendAvailabilitStatus {
|
||||
WaitForFirstConnection = 0, ///< waiting for first connection to backend
|
||||
BackendAvailable = 1, ///< backend is available
|
||||
BackendUnavailable = 2, ///< backend is unavailable
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief SendDataToBackendType enum
|
||||
* type of data to send to backend
|
||||
*/
|
||||
enum SendDataToBackendType {
|
||||
SendPhoto = 0, ///< send photo to backend
|
||||
SendInfo = 1, ///< send device information to backend
|
||||
};
|
||||
class Configuration;
|
||||
class Camera;
|
||||
|
||||
class PrusaConnect {
|
||||
private:
|
||||
|
|
@ -109,4 +91,4 @@ public:
|
|||
|
||||
extern PrusaConnect Connect; ///< PrusaConnect object
|
||||
|
||||
#endif
|
||||
/* EOF */
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
|
||||
/**
|
||||
* @brief BackendAvailabilitStatus enum
|
||||
* status of backend availability
|
||||
*/
|
||||
enum BackendAvailabilitStatus {
|
||||
WaitForFirstConnection = 0, ///< waiting for first connection to backend
|
||||
BackendAvailable = 1, ///< backend is available
|
||||
BackendUnavailable = 2, ///< backend is unavailable
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief SendDataToBackendType enum
|
||||
* type of data to send to backend
|
||||
*/
|
||||
enum SendDataToBackendType {
|
||||
SendPhoto = 0, ///< send photo to backend
|
||||
SendInfo = 1, ///< send device information to backend
|
||||
};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -9,22 +9,12 @@
|
|||
@bug: no know bug
|
||||
*/
|
||||
|
||||
#ifndef _LOG_H_
|
||||
#define _LOG_H_
|
||||
#pragma once
|
||||
|
||||
#include "Arduino.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "mcu_cfg.h"
|
||||
#include "var.h"
|
||||
#include "micro_sd.h"
|
||||
#include "module_templates.h"
|
||||
|
||||
enum LogLevel_enum {
|
||||
LogLevel_Error = 0, ///< Error
|
||||
LogLevel_Warning = 1, ///< Warning
|
||||
LogLevel_Info = 2, ///< Info
|
||||
LogLevel_Verbose = 3 ///< Verbose
|
||||
};
|
||||
#include "log_level.h"
|
||||
|
||||
class Logs : public MicroSd {
|
||||
private:
|
||||
|
|
@ -71,6 +61,4 @@ public:
|
|||
|
||||
extern Logs SystemLog; ///< log object
|
||||
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
enum LogLevel_enum {
|
||||
LogLevel_Error = 0, ///< Error
|
||||
LogLevel_Warning = 1, ///< Warning
|
||||
LogLevel_Info = 2, ///< Info
|
||||
LogLevel_Verbose = 3 ///< Verbose
|
||||
};
|
||||
|
||||
/* EOF */
|
||||
|
|
@ -21,12 +21,11 @@
|
|||
D1 4
|
||||
*/
|
||||
|
||||
#ifndef _MICRO_SD_H_
|
||||
#define _MICRO_SD_H_
|
||||
#pragma once
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "FS.h"
|
||||
#include "SD_MMC.h"
|
||||
#include <Arduino.h>
|
||||
#include <FS.h>
|
||||
#include <SD_MMC.h>
|
||||
|
||||
#include "mcu_cfg.h"
|
||||
#include "module_templates.h"
|
||||
|
|
@ -87,6 +86,4 @@ public:
|
|||
uint8_t GetUsedSpacePercent();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
|
|
@ -21,8 +21,7 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __MODULE_AI_THINKER_ESP32_CAM_H__
|
||||
#define __MODULE_AI_THINKER_ESP32_CAM_H__
|
||||
#pragma once
|
||||
|
||||
#include "mcu_cfg.h"
|
||||
|
||||
|
|
@ -70,5 +69,4 @@
|
|||
#define STATUS_LED_OFF_PIN_LEVEL LOW ///< GPIO pin level for status LED ON
|
||||
|
||||
#endif // AI_THINKER_ESP32_CAM
|
||||
#endif // MODULE_AI_THINKER_ESP32_CAM_H
|
||||
/* EOF */
|
||||
|
|
@ -21,8 +21,7 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __MODULE_ESP32_WROVER_DEV_H__
|
||||
#define __MODULE_ESP32_WROVER_DEV_H__
|
||||
#pragma once
|
||||
|
||||
#include "mcu_cfg.h"
|
||||
|
||||
|
|
@ -70,5 +69,4 @@
|
|||
#define STATUS_LED_OFF_PIN_LEVEL HIGH ///< GPIO pin level for status LED ON
|
||||
|
||||
#endif // ESP32_WROVER_DEV
|
||||
#endif // MODULE_ESP32_WROVER_DEV_H
|
||||
/* EOF */
|
||||
|
|
@ -10,8 +10,7 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __MODULE_TEMPLATES_H__
|
||||
#define __MODULE_TEMPLATES_H__
|
||||
#pragma once
|
||||
|
||||
#include "mcu_cfg.h"
|
||||
|
||||
|
|
@ -23,5 +22,4 @@
|
|||
#include "module_ESP32-WROVER-DEV.h"
|
||||
#endif
|
||||
|
||||
#endif // MODULE_TEMPLATES_H
|
||||
/* EOF */
|
||||
|
|
@ -9,10 +9,9 @@
|
|||
@bug: no know bug
|
||||
*/
|
||||
|
||||
#ifndef _SERIAL_CFG_H
|
||||
#define _SERIAL_CFG_H
|
||||
#pragma once
|
||||
|
||||
#include "Arduino.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "mcu_cfg.h"
|
||||
#include "var.h"
|
||||
|
|
@ -48,6 +47,4 @@ public:
|
|||
|
||||
extern SerialCfg SystemSerialCfg; ///< SerialCfg object
|
||||
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
|
|
@ -9,12 +9,13 @@
|
|||
@bug: no know bug
|
||||
*/
|
||||
|
||||
#ifndef _SYS_LED_H_
|
||||
#define _SYS_LED_H_
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "log.h"
|
||||
#include "mcu_cfg.h"
|
||||
#include "arduino.h"
|
||||
|
||||
class Logs;
|
||||
|
||||
class sys_led {
|
||||
private:
|
||||
|
|
@ -38,6 +39,4 @@ public:
|
|||
|
||||
extern sys_led system_led;
|
||||
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
|
|
@ -9,18 +9,17 @@
|
|||
@bug: no know bug
|
||||
*/
|
||||
|
||||
#ifndef _SYSTEM_H_
|
||||
#define _SYSTEM_H_
|
||||
#pragma once
|
||||
|
||||
#include <WiFi.h>
|
||||
#include <Update.h>
|
||||
#include "Arduino.h"
|
||||
#include <Arduino.h>
|
||||
#include <WiFiClientSecure.h>
|
||||
#include <HTTPClient.h>
|
||||
#include <HTTPUpdate.h>
|
||||
#include <ArduinoJson.h>
|
||||
#include <esp_wifi.h>
|
||||
#include "esp32/rom/rtc.h"
|
||||
#include <esp32/rom/rtc.h>
|
||||
#include <esp_task_wdt.h>
|
||||
|
||||
#include "mcu_cfg.h"
|
||||
|
|
@ -65,5 +64,4 @@ void System_TaskSysLed(void *);
|
|||
void System_TaskWiFiWatchdog(void *);
|
||||
void System_TaskSdCardRemove(void *);
|
||||
|
||||
#endif
|
||||
/* EOF */
|
||||
|
|
@ -9,10 +9,9 @@
|
|||
@bug: no know bug
|
||||
*/
|
||||
|
||||
#ifndef _VARIABLE_H_
|
||||
#define _VARIABLE_H_
|
||||
#pragma once
|
||||
|
||||
#include "Arduino.h"
|
||||
#include <Arduino.h>
|
||||
#include "mcu_cfg.h"
|
||||
|
||||
struct WebBasicAuth_struct {
|
||||
|
|
@ -53,6 +52,4 @@ extern TaskHandle_t Task_WiFiWatchdog; ///< task handle for wifi w
|
|||
extern uint8_t StartRemoveSdCard;
|
||||
extern uint32_t SdCardRemoveTime;
|
||||
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
|
|
@ -8,16 +8,14 @@
|
|||
|
||||
@bug: no know bug
|
||||
*/
|
||||
|
||||
#ifndef _WIFI_MNGT_H_
|
||||
#define _WIFI_MNGT_H_
|
||||
#pragma once
|
||||
|
||||
#include <WiFi.h>
|
||||
#include "Arduino.h"
|
||||
#include <Arduino.h>
|
||||
#include <esp_task_wdt.h>
|
||||
#include <ESPmDNS.h>
|
||||
#include <esp_wifi.h>
|
||||
#include "esp32-hal-cpu.h"
|
||||
#include <esp32-hal-cpu.h>
|
||||
|
||||
#include "mcu_cfg.h"
|
||||
#include "var.h"
|
||||
|
|
@ -143,6 +141,4 @@ public:
|
|||
|
||||
extern WiFiMngt SystemWifiMngt; ///< global variable for wifi management
|
||||
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
Loading…
Reference in New Issue