5 Commits

6 changed files with 538 additions and 471 deletions

View File

@ -2,4 +2,4 @@
![Screenshot](doc/images/Screenshot_20180507-100906.png) ![Screenshot](doc/images/Screenshot_20180507-100906.png)
Knihovna pro konfiguraci WiFi rozhraní modulu ESP8266 Knihovna pro konfiguraci WiFi rozhraní modulu ESP8266 a ESP32, obsahující Captive portal.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -1,6 +1,6 @@
{ {
"name":"WiFiConfig", "name":"WiFiConfig",
"description":"Web based WiFi part configuration for the ESP8266 SoC", "description":"Web based WiFi part configuration for the ESP8266 and ESP32 SoC",
"keywords":"wifi, configuration", "keywords":"wifi, configuration",
"authors": "authors":
{ {
@ -12,10 +12,10 @@
"type": "git", "type": "git",
"url": "http://git.xpablo.cz/pablo2048/WiFiConfig.git" "url": "http://git.xpablo.cz/pablo2048/WiFiConfig.git"
}, },
"version": "5.9", "version": "6.0",
"license": "MIT", "license": "MIT",
"frameworks": "arduino", "frameworks": "arduino",
"platforms": "espressif8266", "platforms": ["espressif8266", "espressif32"],
"build": { "build": {
"libCompatMode": 2 "libCompatMode": 2
} }

View File

@ -1,9 +1,9 @@
name=WiFiConfig name=WiFiConfig
version=5.9 version=6.0
author=Pavel Brychta author=Pavel Brychta
maintainer=Pavel Brychta <Pablo@xpablo.cz> maintainer=Pavel Brychta <Pablo@xpablo.cz>
sentence=Enables seamless module configuration. sentence=Enables seamless module configuration.
paragraph=With this library you can enable your ESP8266 module to be configured over WiFi. Includes Captive Portal for easy configuration. paragraph=With this library you can enable your ESP8266 or ESP32 module to be configured over WiFi. Includes Captive Portal for easy configuration.
category=Other category=Other
url=http://www.xpablo.cz url=http://www.xpablo.cz
architectures=esp8266 architectures=esp8266,esp32

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,11 @@
#ifndef __WiFiConfig_h__ #ifndef __WiFiConfig_h__
#define __WiFiConfig_h__ #define __WiFiConfig_h__
#include <ESP8266WiFi.h> #if defined(ESP8266)
#include <ESP8266WiFi.h>
#else
#include <WiFi.h>
#endif
#include <memory> #include <memory>
#define elementSize(type, element) sizeof(((type *)0)->element) #define elementSize(type, element) sizeof(((type *)0)->element)
@ -169,8 +173,8 @@ class WiFiConfig
{ {
public: public:
WiFiConfig(): _params(NULL), _timeout(0) {} WiFiConfig(): _params(NULL), _timeout(0) {}
wificonfigresult_t begin(int configarea, uint8_t forceConfigure, wificonfig_cb cb); wificonfigresult_t begin(int configarea, int forceConfigure, wificonfig_cb cb);
wificonfigresult_t begin(int configarea, uint8_t forceConfigure, int timeout, wificonfig_cb cb); wificonfigresult_t begin(int configarea, int forceConfigure, int timeout, wificonfig_cb cb);
void addParameter(WiFiConfigUsrParameter *p); void addParameter(WiFiConfigUsrParameter *p);
private: private:
wificonfigresult_t _setupAP(wificonfig_cb cb); wificonfigresult_t _setupAP(wificonfig_cb cb);