Merge pull request #324 from cyberman54/development

Bugfixes v1.7.4 -> v1.7.41
This commit is contained in:
Verkehrsrot 2019-03-24 22:26:34 +01:00 committed by GitHub
commit e4fcf6e8bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 11 deletions

View File

@ -31,7 +31,7 @@ description = Paxcounter is a proof-of-concept ESP32 device for metering passeng
[common]
; for release_version use max. 10 chars total, use any decimal format like "a.b.c"
release_version = 1.7.4
release_version = 1.7.41
; DEBUG LEVEL: For production run set to 0, otherwise device will leak RAM while running!
; 0=None, 1=Error, 2=Warn, 3=Info, 4=Debug, 5=Verbose
debug_level = 3
@ -53,21 +53,19 @@ lib_deps_rgbled =
SmartLeds@>=1.1.5
lib_deps_gps =
TinyGPSPlus@>=1.0.2
lib_deps_rtc =
RTC@^2.3.0
lib_deps_sensors =
Adafruit Unified Sensor@^1.0.3
Adafruit BME280 Library@1.0.8
lib_deps_basic =
ArduinoJson@^5.13.1
Timezone@^1.2.2
RTC@^2.3.0
lib_deps_all =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_display}
${common.lib_deps_rgbled}
${common.lib_deps_gps}
${common.lib_deps_rtc}
build_flags_basic =
-include "src/hal/${PIOENV}.h"
-include "src/paxcounter.conf"
@ -237,7 +235,6 @@ lib_deps =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_display}
${common.lib_deps_rtc}
build_flags =
${common.build_flags_basic}
upload_protocol = ${common.upload_protocol}

View File

@ -67,6 +67,7 @@
// settings for syncing time of node with external time source
#define TIME_SYNC_INTERVAL 0 // sync time attempt each .. minutes from time source (GPS/LORA/RTC) [default = 60], 0 means off
#define TIME_SYNC_INTERVAL_RETRY 0 // retry time sync after lost sync each .. minutes [default = 10], 0 means off
#define TIME_SYNC_COMPILEDATE 0 // set to 1 to use compile date to initialize RTC after power outage [default = 0]
#define TIME_SYNC_LORAWAN 0 // set to 1 to use LORA network as time source, 0 means off [default = 0]
#define TIME_SYNC_TIMESERVER 0 // set to 1 to use LORA timeserver as time source, 0 means off [default = 0]

View File

@ -43,7 +43,7 @@ time_t timeProvider(void) {
t = get_rtctime();
if (t) {
timeSource = _rtc;
timesyncer.attach(60, timeSync); // short retry
timesyncer.attach(TIME_SYNC_INTERVAL_RETRY * 60, timeSync); // short retry
}
#endif
@ -57,7 +57,7 @@ time_t timeProvider(void) {
if (!t) {
timeSource = _unsynced;
timesyncer.attach(60, timeSync); // short retry
timesyncer.attach(TIME_SYNC_INTERVAL_RETRY * 60, timeSync); // short retry
}
return t;
@ -138,7 +138,6 @@ void IRAM_ATTR CLOCKIRQ(void) {
portYIELD_FROM_ISR();
}
// helper function to check plausibility of a time
time_t timeIsValid(time_t const t) {
// is it a time in the past? we use compile date to guess
@ -204,7 +203,6 @@ void clock_init(void) {
assert(ClockTask); // has clock task started?
} // clock_init
void clock_loop(void *taskparameter) { // ClockTask
// caveat: don't use now() in this task, it will cause a race condition

View File

@ -160,8 +160,7 @@ void process_timesync_req(void *taskparameter) {
I2C_MUTEX_UNLOCK();
timeSource = _lora;
timesyncer.attach(TIME_SYNC_INTERVAL * 60,
timeSync); // set to regular repeat
timesyncer.attach(TIME_SYNC_INTERVAL * 60, timeSync); // regular repeat
ESP_LOGI(TAG, "[%0.3f] Timesync finished, time was adjusted",
millis() / 1000.0);
} else