Merge branch 'master' into development
This commit is contained in:
commit
cbca3ebb90
@ -46,7 +46,7 @@ description = Paxcounter is a device for metering passenger flows in realtime. I
|
|||||||
|
|
||||||
[common]
|
[common]
|
||||||
; for release_version use max. 10 chars total, use any decimal format like "a.b.c"
|
; for release_version use max. 10 chars total, use any decimal format like "a.b.c"
|
||||||
release_version = 3.2.0
|
release_version = 3.2.1
|
||||||
; DEBUG LEVEL: For production run set to 0, otherwise device will leak RAM while running!
|
; 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
|
; 0=None, 1=Error, 2=Warn, 3=Info, 4=Debug, 5=Verbose
|
||||||
debug_level = 3
|
debug_level = 3
|
||||||
@ -122,11 +122,15 @@ monitor_filters = time, esp32_exception_decoder, default
|
|||||||
|
|
||||||
[env:ota]
|
[env:ota]
|
||||||
upload_protocol = custom
|
upload_protocol = custom
|
||||||
|
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
|
||||||
|
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#c2e5957
|
||||||
|
|
||||||
[env:usb]
|
[env:usb]
|
||||||
upload_protocol = esptool
|
upload_protocol = esptool
|
||||||
|
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
|
||||||
|
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#c2e5957
|
||||||
|
|
||||||
[env:dev]
|
[env:dev]
|
||||||
upload_protocol = esptool
|
upload_protocol = esptool
|
||||||
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
|
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
|
||||||
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git
|
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#c2e5957
|
||||||
|
@ -12,7 +12,8 @@ void i2c_init(void) {
|
|||||||
Wire.begin();
|
Wire.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
void i2c_deinit(void) { Wire.end(); }
|
//void i2c_deinit(void) { Wire.end(); }
|
||||||
|
void i2c_deinit(void) { Wire.~TwoWire(); }
|
||||||
|
|
||||||
void i2c_scan(void) {
|
void i2c_scan(void) {
|
||||||
|
|
||||||
|
@ -4,7 +4,9 @@
|
|||||||
//
|
//
|
||||||
// --> adapt to your needs and use case <--
|
// --> adapt to your needs and use case <--
|
||||||
//
|
//
|
||||||
// Note: After editing, before "build", use "clean" button in PlatformIO!
|
// Notes:
|
||||||
|
// 1. After editing, before "build", use "clean" button in PlatformIO!
|
||||||
|
// 2. Clear NVRAM of the board to delete previous stored runtime settings (pio run -t erase)
|
||||||
|
|
||||||
// Device options
|
// Device options
|
||||||
#define VERBOSE 1 // set to 0 to silence the device, 1 enables additional debug output
|
#define VERBOSE 1 // set to 0 to silence the device, 1 enables additional debug output
|
||||||
|
@ -33,9 +33,6 @@ void setTimeSyncIRQ() { xTaskNotify(irqHandlerTask, TIMESYNC_IRQ, eSetBits); }
|
|||||||
|
|
||||||
void calibrateTime(void) {
|
void calibrateTime(void) {
|
||||||
|
|
||||||
time_t t = 0;
|
|
||||||
uint16_t t_msec = 0;
|
|
||||||
|
|
||||||
// kick off asynchronous lora timesync if we have
|
// kick off asynchronous lora timesync if we have
|
||||||
#if (HAS_LORA_TIME)
|
#if (HAS_LORA_TIME)
|
||||||
timesync_request();
|
timesync_request();
|
||||||
@ -43,6 +40,10 @@ void calibrateTime(void) {
|
|||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ((HAS_GPS) || (HAS_RTC))
|
||||||
|
time_t t = 0;
|
||||||
|
uint16_t t_msec = 0;
|
||||||
|
|
||||||
// get GPS time, if we have
|
// get GPS time, if we have
|
||||||
#if (HAS_GPS)
|
#if (HAS_GPS)
|
||||||
t = get_gpstime(&t_msec);
|
t = get_gpstime(&t_msec);
|
||||||
@ -57,6 +58,8 @@ void calibrateTime(void) {
|
|||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
} // calibrateTime()
|
} // calibrateTime()
|
||||||
|
|
||||||
// set system time (UTC), calibrate RTC and RTC_INT pps
|
// set system time (UTC), calibrate RTC and RTC_INT pps
|
||||||
@ -250,14 +253,16 @@ void clock_init(void) {
|
|||||||
|
|
||||||
void clock_loop(void *taskparameter) { // ClockTask
|
void clock_loop(void *taskparameter) { // ClockTask
|
||||||
|
|
||||||
uint64_t ClockPulse = 0;
|
|
||||||
uint32_t current_time = 0, previous_time = 0;
|
uint32_t current_time = 0, previous_time = 0;
|
||||||
int8_t ClockMinute = -1;
|
|
||||||
time_t tt;
|
time_t tt;
|
||||||
struct tm t = {0};
|
struct tm t = {0};
|
||||||
#ifdef HAS_TWO_LED
|
#ifdef HAS_TWO_LED
|
||||||
static bool led1_state = false;
|
static bool led1_state = false;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAS_DCF77
|
||||||
|
uint64_t ClockPulse = 0;
|
||||||
|
int8_t ClockMinute = -1;
|
||||||
|
#endif
|
||||||
|
|
||||||
// output the next second's pulse/telegram after pps arrived
|
// output the next second's pulse/telegram after pps arrived
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
Loading…
Reference in New Issue
Block a user