Skip to content

Commit fa48b46

Browse files
authored
Merge pull request #574 from dirkmueller/beta
Switch to Arduino Core 2.6.2
2 parents 3b2fc81 + 3ff4496 commit fa48b46

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

airrohr-firmware/Versions.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
NRZ-2019-126-B9
2+
* Update to Arduino Core 2.6.2 to fix WiFi stability issues
3+
14
NRZ-2019-126-B8
25
* Updated translations
36
* Collect error counters
7+
* Serbian localization added
48

59
NRZ-2019-126-B7
610
* Updated italian translations - thanks stewecar

airrohr-firmware/airrohr-firmware.ino

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
#include <pgmspace.h>
9898

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

103103
/*****************************************************************
@@ -2709,7 +2709,10 @@ static void fetchSensorSDS(String& s) {
27092709
sds_pm25_max = 0;
27102710
sds_pm25_min = 20000;
27112711
if ((cfg::sending_intervall_ms > (WARMUPTIME_SDS_MS + READINGTIME_SDS_MS))) {
2712-
is_SDS_running = SDS_cmd(PmSensorCmd::Stop);
2712+
2713+
if (is_SDS_running) {
2714+
is_SDS_running = SDS_cmd(PmSensorCmd::Stop);
2715+
}
27132716
}
27142717
}
27152718

@@ -4080,8 +4083,8 @@ void setup(void) {
40804083
#if defined(ESP32)
40814084
serialSDS.begin(9600, SERIAL_8N1, PM_SERIAL_RX, PM_SERIAL_TX);
40824085
#endif
4083-
serialSDS.enableIntTx(false);
4084-
serialSDS.setTimeout(300);
4086+
serialSDS.enableIntTx(true);
4087+
serialSDS.setTimeout((12 * 9 * 1000) / 9600);
40854088

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

42684271
if (send_now) {
4269-
debug_outln_info(F("Creating data string:"));
42704272
last_signal_strength = WiFi.RSSI();
42714273
RESERVE_STRING(data, LARGE_STR);
42724274
data = FPSTR(data_first_part);
@@ -4362,11 +4364,15 @@ void loop(void) {
43624364
}
43634365
data += "]}";
43644366

4367+
yield();
4368+
43654369
sum_send_time += sendDataToOptionalApis(data);
43664370

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

43714377
// reconnect to WiFi if disconnected
43724378
if (WiFi.status() != WL_CONNECTED) {

airrohr-firmware/platformio.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ src_dir = .
1414
[common]
1515
build_flags =
1616
-DVTABLES_IN_FLASH -D BEARSSL_SSL_BASIC
17-
-D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
17+
-D PIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
1818
-DNDEBUG
1919
-Wl,-Teagle.flash.4m3m.ld
2020

@@ -70,12 +70,12 @@ lib_deps_esp8266 = ${common.lib_deps_esp8266_platform} ${common.lib_deps_generic
7070
lib_deps_esp32 = ${common.lib_deps_esp32_platform} ${common.lib_deps_generic_external}
7171

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

8181
[env]

airrohr-update-loader/platformio.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ board_build.f_cpu = 160000000L
2222
; Keep Library names in alphabetical order
2323
lib_deps_external =
2424
extra_scripts = platformio_script.py
25-
# This release is reflecting the Arduino Core 2.6.1 release
25+
# This release is reflecting the Arduino Core 2.6.2 release
2626
# When the requirement for Arduino Core is raised, this
2727
# needs to be adjusted to the matching version from
2828
# https://github.com/platformio/platform-espressif8266/releases
29-
platform_version = [email protected].0
29+
platform_version = [email protected].1
3030

3131
[env:nodemcuv2]
3232
lang = loader

0 commit comments

Comments
 (0)