добавил wifi версия которая компилируется

This commit is contained in:
Dmitry Borisenko
2021-12-22 23:33:47 +01:00
parent 5f605a8e7c
commit 0262fa985b
198 changed files with 1043 additions and 15417 deletions

15
include/Const.h Normal file
View File

@@ -0,0 +1,15 @@
#pragma once
#define FIRMWARE_VERSION 400
#define JSON_BUFFER_SIZE 4096
//задачи таскера
enum TimerTask_t { WIFI_SCAN,
WIFI_MQTT_CONNECTION_CHECK,
TIME,
TIME_SYNC,
UPTIME,
SYGNAL,
TIMES,
MYTEST };

View File

@@ -10,9 +10,3 @@ extern FS* filesystem;
#define FS_NAME "LittleFS"
extern bool fileSystemInit();
extern File seekFile(const String& filename, size_t position = 0);
extern const String writeFile(const String& filename, const String& str);
extern const String readFile(const String& filename, size_t max_size);
extern const String filepath(const String& filename);
extern bool cutFile(const String& src, const String& dst);

View File

@@ -3,8 +3,19 @@
//внешние глобальные директории
#include <Arduino.h>
#include <ArduinoJson.h>
#include <ESP8266httpUpdate.h>
#include <FS.h>
#include <StreamUtils.h>
#include <TickerScheduler.h>
//внутренние глобальные директории проекта
#include "Utils\SerialPrint.h"
#include "Const.h"
#include "Utils/JsonUtils.h"
#include "Utils\SerialPrint.h"
//глобальные объекты классов
extern TickerScheduler ts;
//глобальные переменные
extern String settingsFlashJson;
extern String paramsFlashJson;
extern String paramsHeapJson;

8
include/WebServer.h Normal file
View File

@@ -0,0 +1,8 @@
//#pragma once
//
//#include "Global.h"
//
//
//
// void initWS();
// void init();

View File

@@ -0,0 +1,9 @@
#pragma once
#include "EspFileSystem.h"
#include "Global.h"
extern File seekFile(const String& filename, size_t position = 0);
extern const String writeFile(const String& filename, const String& str);
extern const String readFile(const String& filename, size_t max_size);
extern const String filepath(const String& filename);
extern bool cutFile(const String& src, const String& dst);

24
include/utils/JsonUtils.h Normal file
View File

@@ -0,0 +1,24 @@
#pragma once
#include "Global.h"
String jsonReadStr(String& json, String name);
int jsonReadInt(String& json, String name);
boolean jsonReadBool(String& json, String name);
String jsonWriteStr(String& json, String name, String value);
String jsonWriteInt(String& json, String name, int value);
String jsonWriteFloat(String& json, String name, float value);
String jsonWriteBool(String& json, String name, boolean value);
bool jsonRead(String& json, String key, String& value);
bool jsonRead(String& json, String key, bool& value);
bool jsonRead(String& json, String key, int& value);
bool jsonWriteStr_(String& json, String name, String value);
bool jsonWriteBool_(String& json, String name, bool value);
bool jsonWriteInt_(String& json, String name, int value);
bool jsonWriteFloat_(String& json, String name, float value);
void saveConfig();
void saveStore();

10
include/utils/WiFiUtils.h Normal file
View File

@@ -0,0 +1,10 @@
#pragma once
#include "Global.h"
boolean isNetworkActive();
void routerConnect();
bool startAPMode();
boolean RouterFind(String ssid);
uint8_t RSSIquality();
extern void wifiSignalInit();