Compare commits

..

10 Commits

Author SHA1 Message Date
cyberman54
2e08deb5e6 update libs 2023-08-31 20:24:17 +02:00
cyberman54
be2a27402e update platform_espressif32 6.4.0 2023-08-31 20:22:21 +02:00
cyberman54
9727fe358d Update Links in docs 2023-08-31 20:19:08 +02:00
cyberman54
96c2f50d6c fix docs.yml 2023-07-29 19:50:16 +02:00
cyberman54
8d0f08f196 add workflow dispatch for docs 2023-07-29 19:49:21 +02:00
cyberman54
8cff078f41 v3.6.1 2023-07-29 19:28:07 +02:00
cyberman54
3af2f3d146 ota.cpp: bugfix ota_display 2023-07-29 19:25:31 +02:00
cyberman54
ff51c3163b change libpax source 2023-07-16 14:42:27 +02:00
cyberman54
44565ecdce update doc 2023-07-08 15:29:47 +02:00
cyberman54
878ccb9667 update RTC lib 2023-07-08 15:29:41 +02:00
7 changed files with 32 additions and 25 deletions

View File

@ -7,6 +7,7 @@ on:
paths: paths:
- 'mkdocs.yml' - 'mkdocs.yml'
- 'docs/**' - 'docs/**'
workflow_dispatch:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -10,6 +10,8 @@
--- ---
**Ready-to-go Hardware**: <a href="https://de.aliexpress.com/item/32915894264.html" target="_blank">LILYGO® Paxcounter LoRa</a>
**Documentation**: <a href="https://cyberman54.github.io/ESP32-Paxcounter" target="_blank">https://cyberman54.github.io/ESP32-Paxcounter</a> **Documentation**: <a href="https://cyberman54.github.io/ESP32-Paxcounter" target="_blank">https://cyberman54.github.io/ESP32-Paxcounter</a>
**Source Code**: <a href="https://github.com/cyberman54/ESP32-Paxcounter" target="_blank">https://github.com/cyberman54/ESP32-Paxcounter</a> **Source Code**: <a href="https://github.com/cyberman54/ESP32-Paxcounter" target="_blank">https://github.com/cyberman54/ESP32-Paxcounter</a>

View File

@ -4,7 +4,7 @@
*With LoRa radio data transfer*: *With LoRa radio data transfer*:
- **LilyGo: [Paxcounter-Board*](https://www.aliexpress.com/item/32915894264.html?spm=a2g0o.productlist.0.0.3d656325QrcfQc&algo_pvid=4a150199-63e7-4d21-bdb1-b48164537744&algo_exp_id=4a150199-63e7-4d21-bdb1-b48164537744-2&pdp_ext_f=%7B%22sku_id%22%3A%2212000023374441919%22%7D)** - **LILYGO®: [Paxcounter LoRa V2.1*](https://de.aliexpress.com/item/32915894264.html)**
- TTGO: T1*, T2*, T3*, T-Beam, T-Fox - TTGO: T1*, T2*, T3*, T-Beam, T-Fox
- Heltec: LoRa-32 v1 and v2 - Heltec: LoRa-32 v1 and v2
- Pycom: LoPy, LoPy4, FiPy - Pycom: LoPy, LoPy4, FiPy
@ -16,7 +16,7 @@ LoLin32lite + [LoraNode32-Lite shield](https://github.com/hallard/LoLin32-Lite-L
*Without LoRa*: *Without LoRa*:
- LilyGo: [T-Dongle S3*](https://github.com/Xinyuan-LilyGO/T-Dongle-S3) - LILYGO®: [T-Dongle S3*](https://github.com/Xinyuan-LilyGO/T-Dongle-S3)
- Pyom: WiPy - Pyom: WiPy
- WeMos: LoLin32, LoLin32 Lite, WeMos D32, [Wemos32 Oled](https://www.instructables.com/id/ESP32-With-Integrated-OLED-WEMOSLolin-Getting-Star/) - WeMos: LoLin32, LoLin32 Lite, WeMos D32, [Wemos32 Oled](https://www.instructables.com/id/ESP32-With-Integrated-OLED-WEMOSLolin-Getting-Star/)
- Crowdsupply: [TinyPICO](https://www.crowdsupply.com/unexpected-maker/tinypico) - Crowdsupply: [TinyPICO](https://www.crowdsupply.com/unexpected-maker/tinypico)

View File

@ -7,6 +7,8 @@
[Tutorial (in german language)](https://www.heise.de/select/make/2019/1/1551099236518668) [Tutorial (in german language)](https://www.heise.de/select/make/2019/1/1551099236518668)
[Paxcounter dashboard with Pax.Express](https://www.pax.express/)
[![CodeFactor](https://www.codefactor.io/repository/github/cyberman54/esp32-paxcounter/badge)](https://www.codefactor.io/repository/github/cyberman54/esp32-paxcounter) [![CodeFactor](https://www.codefactor.io/repository/github/cyberman54/esp32-paxcounter/badge)](https://www.codefactor.io/repository/github/cyberman54/esp32-paxcounter)
[![PlatformIO CI](https://github.com/cyberman54/ESP32-Paxcounter/actions/workflows/build.yml/badge.svg?event=push)](https://github.com/cyberman54/ESP32-Paxcounter/actions/workflows/build.yml) [![PlatformIO CI](https://github.com/cyberman54/ESP32-Paxcounter/actions/workflows/build.yml/badge.svg?event=push)](https://github.com/cyberman54/ESP32-Paxcounter/actions/workflows/build.yml)

View File

@ -47,7 +47,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.6.0 release_version = 3.6.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
@ -55,7 +55,7 @@ extra_scripts = pre:shared/build.py
otakeyfile = ota.conf otakeyfile = ota.conf
lorakeyfile = loraconf.h lorakeyfile = loraconf.h
lmicconfigfile = lmic_config.h lmicconfigfile = lmic_config.h
platform_espressif32 = espressif32@6.3.2 platform_espressif32 = espressif32@6.4.0
monitor_speed = 115200 monitor_speed = 115200
upload_speed = 115200 ; set by build.py and taken from hal file upload_speed = 115200 ; set by build.py and taken from hal file
lib_deps_lora = lib_deps_lora =
@ -71,18 +71,18 @@ lib_deps_rgbled =
lib_deps_gps = lib_deps_gps =
mikalhart/TinyGPSPlus @ ^1.0.3 mikalhart/TinyGPSPlus @ ^1.0.3
lib_deps_sensors = lib_deps_sensors =
adafruit/Adafruit Unified Sensor @ ^1.1.9 adafruit/Adafruit Unified Sensor @ ^1.1.13
adafruit/Adafruit BME280 Library @ ^2.2.2 adafruit/Adafruit BME280 Library @ ^2.2.2
adafruit/Adafruit BMP085 Library @ ^1.2.2 adafruit/Adafruit BMP085 Library @ ^1.2.2
boschsensortec/BSEC Software Library @ 1.8.1492 boschsensortec/BSEC Software Library @ 1.8.1492
lewapek/Nova Fitness Sds dust sensors library @ ^1.5.1 lewapek/Nova Fitness Sds dust sensors library @ ^1.5.1
lib_deps_basic = lib_deps_basic =
greyrook/libpax @ ^1.1.0 https://github.com/dbSuS/libpax.git
https://github.com/SukkoPera/Arduino-Rokkit-Hash.git https://github.com/SukkoPera/Arduino-Rokkit-Hash.git
bblanchon/ArduinoJson @ ^6.21.2 bblanchon/ArduinoJson @ ^6.21.3
makuna/RTC @ ^2.4.0 makuna/RTC @ ^2.4.2
mathertel/OneButton @ ^2.0.3 mathertel/OneButton @ ^2.0.3
lewisxhe/XPowersLib @ ^0.1.7 lewisxhe/XPowersLib @ ^0.1.8
256dpi/MQTT @ ^2.5.1 256dpi/MQTT @ ^2.5.1
lib_deps_all = lib_deps_all =
${common.lib_deps_basic} ${common.lib_deps_basic}

View File

@ -10,7 +10,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.6.0 release_version = 3.6.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
@ -18,16 +18,16 @@ extra_scripts = pre:shared/build.py
otakeyfile = ota.conf otakeyfile = ota.conf
lorakeyfile = loraconf.h lorakeyfile = loraconf.h
lmicconfigfile = lmic_config.h lmicconfigfile = lmic_config.h
platform_espressif32 = espressif32@6.3.2 platform_espressif32 = espressif32@6.4.0
monitor_speed = 115200 monitor_speed = 115200
upload_speed = 115200 ; set by build.py and taken from hal file upload_speed = 115200 ; set by build.py and taken from hal file
lib_deps_all = lib_deps_all =
bitbank2/BitBang_I2C@ ^2.2.1 bitbank2/BitBang_I2C@ ^2.2.1
bitbank2/bb_spi_lcd @ ^2.4.1 bitbank2/bb_spi_lcd @ ^2.4.1
fastled/FastLED @ ^3.6.0 fastled/FastLED @ ^3.6.0
greyrook/libpax @ ^1.1.0 https://github.com/dbSuS/libpax.git
https://github.com/SukkoPera/Arduino-Rokkit-Hash.git https://github.com/SukkoPera/Arduino-Rokkit-Hash.git
bblanchon/ArduinoJson @ ^6.21.2 bblanchon/ArduinoJson @ ^6.21.3
mathertel/OneButton @ ^2.0.3 mathertel/OneButton @ ^2.0.3
256dpi/MQTT @ ^2.5.1 256dpi/MQTT @ ^2.5.1
ricmoo/QRCode @ ^0.0.1 ricmoo/QRCode @ ^0.0.1

View File

@ -1,3 +1,6 @@
// Note: Don't build & run this code with loglevel debug!
// It would crash for some unknown reason with stack canary error.
#if (USE_OTA) #if (USE_OTA)
/* /*
@ -61,12 +64,9 @@ void start_ota_update() {
ota_display(1, "**", WIFI_SSID); ota_display(1, "**", WIFI_SSID);
WiFi.disconnect(true); WiFi.disconnect(true);
WiFi.config(INADDR_NONE, INADDR_NONE, WiFi.mode(WIFI_MODE_NULL);
INADDR_NONE); // call is only a workaround for bug in WiFi class
// see https://github.com/espressif/arduino-esp32/issues/806
WiFi.setHostname(host); WiFi.setHostname(host);
WiFi.mode(WIFI_STA); WiFi.mode(WIFI_STA);
WiFi.begin();
// Connect to WiFi network // Connect to WiFi network
// workaround applied here to bypass WIFI_AUTH failure // workaround applied here to bypass WIFI_AUTH failure
@ -75,12 +75,12 @@ void start_ota_update() {
// 1st try // 1st try
WiFi.begin(WIFI_SSID, WIFI_PASS); WiFi.begin(WIFI_SSID, WIFI_PASS);
while (WiFi.status() == WL_DISCONNECTED) { while (WiFi.status() == WL_DISCONNECTED) {
delay(500); delay(2000);
} }
// 2nd try // 2nd try
if (WiFi.status() != WL_CONNECTED) { if (WiFi.status() != WL_CONNECTED) {
WiFi.begin(WIFI_SSID, WIFI_PASS); WiFi.begin(WIFI_SSID, WIFI_PASS);
delay(500); delay(2000);
} }
uint8_t i = WIFI_MAX_TRY; uint8_t i = WIFI_MAX_TRY;
@ -184,10 +184,11 @@ int do_ota_update() {
ESP_LOGI(TAG, "Requesting %s", firmwarePath.c_str()); ESP_LOGI(TAG, "Requesting %s", firmwarePath.c_str());
client.print(String("GET ") + firmwarePath + " HTTP/1.1\r\n"); client.println(String("GET " + firmwarePath + " HTTP/1.1"));
client.print(String("Host: ") + currentHost + "\r\n"); client.println(String("Host: " + currentHost));
client.print("Cache-Control: no-cache\r\n"); client.println("Cache-Control: no-cache");
client.print("Connection: close\r\n\r\n"); client.println("Connection: close");
client.println();
unsigned long timeout = millis(); unsigned long timeout = millis();
while (client.available() == 0) { while (client.available() == 0) {
@ -322,9 +323,10 @@ void ota_display(const uint8_t row, const std::string status,
dp->setCursor(14 * 8, row * 8); dp->setCursor(14 * 8, row * 8);
dp->printf(status.substr(0, 2).c_str()); dp->printf(status.substr(0, 2).c_str());
if (!msg.empty()) { if (!msg.empty()) {
dp->setCursor(0, 7 * 8);
dp->printf(" "); dp->printf(" ");
dp->setCursor(0, 7 * 8);
dp->printf(msg.substr(0, 16).c_str()); dp->printf(msg.substr(0, 16).c_str());
// dp->printf("\r\n");
} }
dp_dump(); dp_dump();
#endif #endif
@ -334,7 +336,7 @@ void ota_display(const uint8_t row, const std::string status,
void show_progress(unsigned long current, unsigned long size) { void show_progress(unsigned long current, unsigned long size) {
#ifdef HAS_DISPLAY #ifdef HAS_DISPLAY
char buf[17]; char buf[17];
snprintf(buf, 17, "%-9lu (%3lu%%)", current, current * 100 / size); snprintf(buf, 17, "%-9lu %3lu%%", current, current * 100 / size);
ota_display(4, "**", buf); ota_display(4, "**", buf);
#endif #endif
} }