- set version to 1.0.2
- change CPU freq 160MHz - use WIFI_NONE_SLEEP - cleanup warnings
This commit is contained in:
parent
bdf571791f
commit
3baf7810a0
|
|
@ -1,28 +1,27 @@
|
|||
[platformio]
|
||||
default_envs = default
|
||||
extra_configs =
|
||||
local.ini
|
||||
|
||||
[env]
|
||||
board = esp12e
|
||||
framework = arduino
|
||||
upload_resetmethod = nodemcu
|
||||
upload_speed = 115200
|
||||
board_build.f_cpu = 80000000L
|
||||
board_build.f_cpu = 160000000L
|
||||
board_build.f_flash = 40000000L
|
||||
board_build.flash_mode = qio
|
||||
build_flags =
|
||||
-Wall
|
||||
-Wall -Wextra -Werror
|
||||
-Wl,-Teagle.flash.4m1m.ld
|
||||
-DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY_LOW_FLASH
|
||||
-DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
|
||||
-DBEARSSL_SSL_BASIC
|
||||
-DVTABLES_IN_FLASH
|
||||
lib_deps =
|
||||
https://github.com/liebman/DLog.git
|
||||
https://github.com/liebman/DLogNet.git
|
||||
; https://github.com/liebman/MicroNMEA.git#handle-empty-date-or-time
|
||||
MicroNMEA@2.0.1
|
||||
; https://github.com/liebman/WiFiManager.git#stdfunc
|
||||
https://github.com/tzapu/WiFiManager.git#development
|
||||
; https://github.com/liebman/esp8266-oled-ssd1306.git#cleanup-warnings
|
||||
https://github.com/ThingPulse/esp8266-oled-ssd1306.git#4fa903f
|
||||
https://github.com/me-no-dev/ESPAsyncUDP.git#b592ac6
|
||||
https://github.com/arcao/Syslog.git#e9c2eea
|
||||
|
|
@ -39,4 +38,3 @@ platform_packages =
|
|||
; use upstream Git version
|
||||
framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
|
||||
extra_scripts = post:mkcerts.py ; this creates the cert file for bearssl
|
||||
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ void processOTA(const char* ota_url, const char* ota_fp)
|
|||
ESPhttpUpdate.rebootOnUpdate(false);
|
||||
|
||||
#ifdef USE_CERT_STORE
|
||||
(void)ota_fp; // we are using the cert store so don't need this
|
||||
CertStore certStore;
|
||||
#endif
|
||||
WiFiClient *client = nullptr;
|
||||
|
|
@ -88,6 +89,7 @@ void processOTA(const char* ota_url, const char* ota_fp)
|
|||
dlog.info(FPSTR(TAG), F("adding cert store to connection"));
|
||||
bear->setCertStore(&certStore);
|
||||
#else
|
||||
(void)ota_fp; // not used at the moment but maybe we want to re-instate it later.
|
||||
bear->setInsecure();
|
||||
#endif
|
||||
client = bear;
|
||||
|
|
@ -214,8 +216,8 @@ void setup()
|
|||
processOTA(url, fp);
|
||||
}
|
||||
|
||||
WiFiMode_t mode = WiFi.getMode();
|
||||
dlog.error(SETUP_TAG, "WiFi mode: %d", mode);
|
||||
dlog.info(SETUP_TAG, F("WiFi mode: %d"), WiFi.getMode());
|
||||
dlog.info(SETUP_TAG, F("wifi sleep mode: %d"), WiFi.getSleepMode());
|
||||
#endif
|
||||
|
||||
display.process();
|
||||
|
|
@ -262,17 +264,15 @@ void loop()
|
|||
if (ip != last_ip)
|
||||
{
|
||||
dlog.warning(LOOP_TAG, F("ip address change %s -> %s"), last_ip.toString().c_str(), ip.toString().c_str());
|
||||
if (ip == IPAddress(0,0,0,0))
|
||||
{
|
||||
dlog.error(LOOP_TAG, F("lost connectivity! Resetting!"));
|
||||
ESP.reset();
|
||||
delay(10000);
|
||||
}
|
||||
last_ip = ip;
|
||||
}
|
||||
|
||||
#if 0
|
||||
uint32_t m = millis();
|
||||
if (m % 1000 == 0)
|
||||
{
|
||||
dlog.info("loop", "uptime: %lu millis: %lu", m);
|
||||
}
|
||||
#endif
|
||||
|
||||
gps.process();
|
||||
|
||||
static time_t last_seconds;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#ifndef ESPNTPSERVERVERSION_H_
|
||||
#define ESPNTPSERVERVERSION_H_
|
||||
|
||||
const char* ESPNTP_SERVER_VERSION = "1.0.1";
|
||||
const char* ESPNTP_SERVER_VERSION = "1.0.2";
|
||||
|
||||
|
||||
#endif /* ESPNTPSERVERVERSION_H_ */
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ WiFiSetup::~WiFiSetup()
|
|||
void WiFiSetup::connect(bool force_config)
|
||||
{
|
||||
WiFi.mode(WiFiMode::WIFI_STA);
|
||||
WiFi.setSleepMode(WIFI_NONE_SLEEP);
|
||||
if (force_config)
|
||||
{
|
||||
dlog.info(TAG, F("connect: starting forced config portal!"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user