mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 22:52:19 +03:00
добавил wifi версия которая компилируется
This commit is contained in:
15
include/Const.h
Normal file
15
include/Const.h
Normal 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 };
|
||||
@@ -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);
|
||||
@@ -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
8
include/WebServer.h
Normal file
@@ -0,0 +1,8 @@
|
||||
//#pragma once
|
||||
//
|
||||
//#include "Global.h"
|
||||
//
|
||||
//
|
||||
//
|
||||
// void initWS();
|
||||
// void init();
|
||||
9
include/utils/FileUtils.h
Normal file
9
include/utils/FileUtils.h
Normal 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
24
include/utils/JsonUtils.h
Normal 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
10
include/utils/WiFiUtils.h
Normal 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();
|
||||
Reference in New Issue
Block a user