Skip to content

Switch to Arduino Core 2.6.2 #574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions airrohr-firmware/Versions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
NRZ-2019-126-B9
* Update to Arduino Core 2.6.2 to fix WiFi stability issues

NRZ-2019-126-B8
* Updated translations
* Collect error counters
* Serbian localization added

NRZ-2019-126-B7
* Updated italian translations - thanks stewecar
Expand Down
18 changes: 12 additions & 6 deletions airrohr-firmware/airrohr-firmware.ino
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
#include <pgmspace.h>

// increment on change
#define SOFTWARE_VERSION_STR "NRZ-2019-126-B8"
#define SOFTWARE_VERSION_STR "NRZ-2019-126-B9"
const String SOFTWARE_VERSION(SOFTWARE_VERSION_STR);

/*****************************************************************
Expand Down Expand Up @@ -2709,7 +2709,10 @@ static void fetchSensorSDS(String& s) {
sds_pm25_max = 0;
sds_pm25_min = 20000;
if ((cfg::sending_intervall_ms > (WARMUPTIME_SDS_MS + READINGTIME_SDS_MS))) {
is_SDS_running = SDS_cmd(PmSensorCmd::Stop);

if (is_SDS_running) {
is_SDS_running = SDS_cmd(PmSensorCmd::Stop);
}
}
}

Expand Down Expand Up @@ -4080,8 +4083,8 @@ void setup(void) {
#if defined(ESP32)
serialSDS.begin(9600, SERIAL_8N1, PM_SERIAL_RX, PM_SERIAL_TX);
#endif
serialSDS.enableIntTx(false);
serialSDS.setTimeout(300);
serialSDS.enableIntTx(true);
serialSDS.setTimeout((12 * 9 * 1000) / 9600);

#if defined(WIFI_LoRa_32_V2)
// reset the OLED display, e.g. of the heltec_wifi_lora_32 board
Expand Down Expand Up @@ -4266,7 +4269,6 @@ void loop(void) {
yield();

if (send_now) {
debug_outln_info(F("Creating data string:"));
last_signal_strength = WiFi.RSSI();
RESERVE_STRING(data, LARGE_STR);
data = FPSTR(data_first_part);
Expand Down Expand Up @@ -4362,11 +4364,15 @@ void loop(void) {
}
data += "]}";

yield();

sum_send_time += sendDataToOptionalApis(data);

// https://en.wikipedia.org/wiki/Moving_average#Cumulative_moving_average
sending_time = (3 * sending_time + sum_send_time) / 4;
debug_outln_info(F("Time for sending data (ms): "), String(sending_time));
if (sum_send_time > 0) {
debug_outln_info(F("Time for Sending (ms): "), String(sending_time));
}

// reconnect to WiFi if disconnected
if (WiFi.status() != WL_CONNECTED) {
Expand Down
6 changes: 3 additions & 3 deletions airrohr-firmware/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ src_dir = .
[common]
build_flags =
-DVTABLES_IN_FLASH -D BEARSSL_SSL_BASIC
-D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
-D PIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
-DNDEBUG
-Wl,-Teagle.flash.4m3m.ld

Expand Down Expand Up @@ -70,12 +70,12 @@ lib_deps_esp8266 = ${common.lib_deps_esp8266_platform} ${common.lib_deps_generic
lib_deps_esp32 = ${common.lib_deps_esp32_platform} ${common.lib_deps_generic_external}

extra_scripts = platformio_script.py
# This release is reflecting the Arduino Core 2.6.1 release
# This release is reflecting the Arduino Core 2.6.2 release
# When the requirement for Arduino Core is raised, this
# needs to be adjusted to the matching version from
# https://github.com/platformio/platform-espressif8266/releases
# platform_version = [email protected]
platform_version = [email protected].0
platform_version = [email protected].1
platform_version_esp32 = [email protected] ; using Arduino core 1.0.4

[env]
Expand Down
4 changes: 2 additions & 2 deletions airrohr-update-loader/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ board_build.f_cpu = 160000000L
; Keep Library names in alphabetical order
lib_deps_external =
extra_scripts = platformio_script.py
# This release is reflecting the Arduino Core 2.6.1 release
# This release is reflecting the Arduino Core 2.6.2 release
# When the requirement for Arduino Core is raised, this
# needs to be adjusted to the matching version from
# https://github.com/platformio/platform-espressif8266/releases
platform_version = [email protected].0
platform_version = [email protected].1

[env:nodemcuv2]
lang = loader
Expand Down