- set version to 1.0.2

- change CPU freq  160MHz
- use WIFI_NONE_SLEEP
- cleanup warnings
This commit is contained in:
Chris Liebman 2019-09-06 16:22:12 -07:00
parent bdf571791f
commit 3baf7810a0
4 changed files with 17 additions and 18 deletions

View File

@ -1,28 +1,27 @@
[platformio] [platformio]
default_envs = default default_envs = default
extra_configs =
local.ini
[env] [env]
board = esp12e board = esp12e
framework = arduino framework = arduino
upload_resetmethod = nodemcu upload_resetmethod = nodemcu
upload_speed = 115200 upload_speed = 115200
board_build.f_cpu = 80000000L board_build.f_cpu = 160000000L
board_build.f_flash = 40000000L board_build.f_flash = 40000000L
board_build.flash_mode = qio board_build.flash_mode = qio
build_flags = build_flags =
-Wall -Wall -Wextra -Werror
-Wl,-Teagle.flash.4m1m.ld -Wl,-Teagle.flash.4m1m.ld
-DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY_LOW_FLASH -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
-DBEARSSL_SSL_BASIC -DBEARSSL_SSL_BASIC
-DVTABLES_IN_FLASH -DVTABLES_IN_FLASH
lib_deps = lib_deps =
https://github.com/liebman/DLog.git https://github.com/liebman/DLog.git
https://github.com/liebman/DLogNet.git https://github.com/liebman/DLogNet.git
; https://github.com/liebman/MicroNMEA.git#handle-empty-date-or-time
MicroNMEA@2.0.1 MicroNMEA@2.0.1
; https://github.com/liebman/WiFiManager.git#stdfunc
https://github.com/tzapu/WiFiManager.git#development 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/ThingPulse/esp8266-oled-ssd1306.git#4fa903f
https://github.com/me-no-dev/ESPAsyncUDP.git#b592ac6 https://github.com/me-no-dev/ESPAsyncUDP.git#b592ac6
https://github.com/arcao/Syslog.git#e9c2eea https://github.com/arcao/Syslog.git#e9c2eea
@ -39,4 +38,3 @@ platform_packages =
; use upstream Git version ; use upstream Git version
framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
extra_scripts = post:mkcerts.py ; this creates the cert file for bearssl extra_scripts = post:mkcerts.py ; this creates the cert file for bearssl

View File

@ -72,6 +72,7 @@ void processOTA(const char* ota_url, const char* ota_fp)
ESPhttpUpdate.rebootOnUpdate(false); ESPhttpUpdate.rebootOnUpdate(false);
#ifdef USE_CERT_STORE #ifdef USE_CERT_STORE
(void)ota_fp; // we are using the cert store so don't need this
CertStore certStore; CertStore certStore;
#endif #endif
WiFiClient *client = nullptr; 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")); dlog.info(FPSTR(TAG), F("adding cert store to connection"));
bear->setCertStore(&certStore); bear->setCertStore(&certStore);
#else #else
(void)ota_fp; // not used at the moment but maybe we want to re-instate it later.
bear->setInsecure(); bear->setInsecure();
#endif #endif
client = bear; client = bear;
@ -214,8 +216,8 @@ void setup()
processOTA(url, fp); processOTA(url, fp);
} }
WiFiMode_t mode = WiFi.getMode(); dlog.info(SETUP_TAG, F("WiFi mode: %d"), WiFi.getMode());
dlog.error(SETUP_TAG, "WiFi mode: %d", mode); dlog.info(SETUP_TAG, F("wifi sleep mode: %d"), WiFi.getSleepMode());
#endif #endif
display.process(); display.process();
@ -262,17 +264,15 @@ void loop()
if (ip != last_ip) if (ip != last_ip)
{ {
dlog.warning(LOOP_TAG, F("ip address change %s -> %s"), last_ip.toString().c_str(), ip.toString().c_str()); 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; last_ip = ip;
} }
#if 0
uint32_t m = millis();
if (m % 1000 == 0)
{
dlog.info("loop", "uptime: %lu millis: %lu", m);
}
#endif
gps.process(); gps.process();
static time_t last_seconds; static time_t last_seconds;

View File

@ -8,7 +8,7 @@
#ifndef ESPNTPSERVERVERSION_H_ #ifndef ESPNTPSERVERVERSION_H_
#define ESPNTPSERVERVERSION_H_ #define ESPNTPSERVERVERSION_H_
const char* ESPNTP_SERVER_VERSION = "1.0.1"; const char* ESPNTP_SERVER_VERSION = "1.0.2";
#endif /* ESPNTPSERVERVERSION_H_ */ #endif /* ESPNTPSERVERVERSION_H_ */

View File

@ -49,6 +49,7 @@ WiFiSetup::~WiFiSetup()
void WiFiSetup::connect(bool force_config) void WiFiSetup::connect(bool force_config)
{ {
WiFi.mode(WiFiMode::WIFI_STA); WiFi.mode(WiFiMode::WIFI_STA);
WiFi.setSleepMode(WIFI_NONE_SLEEP);
if (force_config) if (force_config)
{ {
dlog.info(TAG, F("connect: starting forced config portal!")); dlog.info(TAG, F("connect: starting forced config portal!"));