mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
platformio esp8266, esp32
This commit is contained in:
@@ -1,47 +1,44 @@
|
||||
#pragma once
|
||||
/*
|
||||
* Здесь хранятся все настройки прошивки
|
||||
* Main consts
|
||||
*/
|
||||
#define firmware_version "2.3.4"
|
||||
#define FIRMWARE_VERSION "2.3.4"
|
||||
#define NUM_BUTTONS 6
|
||||
#define mb_4_of_memory 1
|
||||
#define wifi_mqtt_reconnecting 20000
|
||||
#define blink_pin 2
|
||||
#define tank_level_times_to_send 10 //после скольки выстрелов делать отправку данных
|
||||
#define statistics_update 1000 * 60 * 60 * 2
|
||||
#define LED_PIN 2
|
||||
#define FLASH_4MB true
|
||||
#define MQTT_RECONNECT_INTERVAL 20000
|
||||
// 1000 * 60 * 60 * 2
|
||||
#define TELEMETRY_UPDATE_INTERVAL 0
|
||||
|
||||
/*
|
||||
* Optional
|
||||
*/
|
||||
//#define OTA_enable
|
||||
//#define MDNS_enable
|
||||
//#define WS_enable
|
||||
//#define layout_in_ram
|
||||
#define UDP_enable
|
||||
//#define OTA_UPDATES_ENABLED
|
||||
//#define MDNS_ENABLED
|
||||
//#define WEBSOCKET_ENABLED
|
||||
//#define LAYOUT_IN_RAM
|
||||
#define UDP_ENABLED
|
||||
|
||||
/*
|
||||
* Sensor
|
||||
*/
|
||||
#define level_enable
|
||||
#define analog_enable
|
||||
#define dallas_enable
|
||||
#define dht_enable
|
||||
#define bmp_enable
|
||||
#define bme_enable
|
||||
|
||||
/*
|
||||
* Logging
|
||||
*/
|
||||
#define logging_enable
|
||||
#define TANK_LEVEL_SAMPLES 10
|
||||
#define LEVEL_ENABLED
|
||||
#define ANALOG_ENABLED
|
||||
#define DALLAS_ENABLED
|
||||
#define DHT_ENABLED
|
||||
#define BMP_ENABLED
|
||||
#define BME_ENABLED
|
||||
|
||||
/*
|
||||
* Gears
|
||||
*/
|
||||
#define stepper_enable
|
||||
#define servo_enable
|
||||
#define STEPPER_ENABLED
|
||||
#define SERVO_ENABLED
|
||||
|
||||
/*
|
||||
* Other
|
||||
*/
|
||||
#define serial_enable
|
||||
#define push_enable
|
||||
#define LOGGING_ENABLED
|
||||
#define SERIAL_ENABLED
|
||||
#define PUSH_ENABLED
|
||||
|
||||
@@ -1,18 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef ESP32
|
||||
#include <AsyncTCP.h>
|
||||
// don't change order
|
||||
#include "WiFi.h"
|
||||
//
|
||||
|
||||
#include "ESPAsyncWebServer.h"
|
||||
#include "SPIFFSEditor.h"
|
||||
// don't change order
|
||||
#include <AsyncUDP.h>
|
||||
#include <ESP32Servo.h>
|
||||
#include <HTTPClient.h>
|
||||
#include <HTTPUpdate.h>
|
||||
#include <LittleFS.h>
|
||||
|
||||
//
|
||||
#include <WiFi.h>
|
||||
#include <analogWrite.h>
|
||||
|
||||
#ifdef MDNS_enable
|
||||
#ifdef MDNS_ENABLED
|
||||
#include <ESPmDNS.h>
|
||||
#endif
|
||||
|
||||
extern AsyncUDP udp;
|
||||
|
||||
#endif
|
||||
@@ -1,13 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef ESP8266
|
||||
|
||||
#include <ESP8266HTTPClient.h>
|
||||
#include <ESP8266HTTPUpdateServer.h>
|
||||
#include <ESP8266httpUpdate.h>
|
||||
#include <ESPAsyncWebServer.h>
|
||||
#include <LittleFS.h>
|
||||
#include <SPIFFSEditor.h>
|
||||
#include <Servo.h>
|
||||
#include <WiFiUdp.h>
|
||||
|
||||
#ifdef MDNS_enable
|
||||
#ifdef MDNS_ENABLED
|
||||
#include <ESP8266mDNS.h>
|
||||
#endif
|
||||
|
||||
@@ -3,17 +3,13 @@
|
||||
/*
|
||||
* Libraries
|
||||
*/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <ArduinoJson.h>
|
||||
#include <ESP8266HTTPUpdateServer.h>
|
||||
#include <ESPAsyncWebServer.h>
|
||||
#include <LittleFS.h>
|
||||
#include <SPIFFSEditor.h>
|
||||
|
||||
#include "ESP32.h"
|
||||
#include "ESP8266.h"
|
||||
//
|
||||
#include "Consts.h"
|
||||
#include "ESP32_Spec.h"
|
||||
#include "ESP8266_Spec.h"
|
||||
#include "Errors.h"
|
||||
#include "GyverFilters.h"
|
||||
#include "UptimeInterval.h"
|
||||
@@ -34,7 +30,7 @@
|
||||
#include <TickerScheduler.h>
|
||||
#include <Wire.h>
|
||||
#include <time.h>
|
||||
#ifdef OTA_enable
|
||||
#ifdef OTA_UPDATES_ENABLED
|
||||
#include <ArduinoOTA.h>
|
||||
#endif
|
||||
|
||||
@@ -42,7 +38,7 @@
|
||||
* Objects.h(без данных)
|
||||
*/
|
||||
|
||||
#ifdef WS_enable
|
||||
#ifdef WEBSOCKET_ENABLED
|
||||
extern AsyncWebSocket ws;
|
||||
//extern AsyncEventSource events;
|
||||
#endif
|
||||
@@ -164,9 +160,6 @@ extern void Scenario_init();
|
||||
extern void txtExecution(String file);
|
||||
extern void stringExecution(String str);
|
||||
|
||||
// FileSystem
|
||||
extern void File_system_init();
|
||||
|
||||
// i2c_bu
|
||||
extern void do_i2c_scanning();
|
||||
extern String i2c_scan();
|
||||
@@ -187,7 +180,7 @@ extern void choose_log_date_and_send();
|
||||
|
||||
// Main
|
||||
extern void setChipId();
|
||||
extern void getMemoryLoad(String text);
|
||||
extern void printMemoryStatus(String text);
|
||||
extern void saveConfig();
|
||||
extern String getURL(const String &urls);
|
||||
|
||||
|
||||
@@ -1,7 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <FS.h>
|
||||
|
||||
#include "FS.h"
|
||||
|
||||
#ifdef ESP32
|
||||
#include "LITTLEFS.h"
|
||||
#define LittleFS LITTLEFS
|
||||
#endif
|
||||
#ifdef ESP8266
|
||||
#include <LittleFS.h>
|
||||
#endif
|
||||
/*
|
||||
* Инициализация ФС
|
||||
*/
|
||||
bool fileSystemInit();
|
||||
|
||||
/*
|
||||
* Удалить файл
|
||||
*/
|
||||
void removeFile(const String filename);
|
||||
|
||||
/*
|
||||
* Открыть файл на позиции
|
||||
*/
|
||||
File seekFile(const String filename, size_t position = 0);
|
||||
|
||||
/*
|
||||
* Чтение строки из файла
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
#ifdef ESP8266
|
||||
#include <TZ.h>
|
||||
#endif
|
||||
|
||||
void Time_Init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user