Compare commits

..

No commits in common. "2e08deb5e60233372e3df9c3fa8f6b972a7f8e87" and "8c7b8730a205565ffc9526d5e9762b3adb9581c0" have entirely different histories.

7 changed files with 25 additions and 32 deletions

View File

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

View File

@ -10,8 +10,6 @@
---
**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>
**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*:
- **LILYGO®: [Paxcounter LoRa V2.1*](https://de.aliexpress.com/item/32915894264.html)**
- **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)**
- TTGO: T1*, T2*, T3*, T-Beam, T-Fox
- Heltec: LoRa-32 v1 and v2
- Pycom: LoPy, LoPy4, FiPy
@ -16,7 +16,7 @@ LoLin32lite + [LoraNode32-Lite shield](https://github.com/hallard/LoLin32-Lite-L
*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
- 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)

View File

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

View File

@ -10,7 +10,7 @@ description = Paxcounter is a device for metering passenger flows in realtime. I
[common]
; for release_version use max. 10 chars total, use any decimal format like "a.b.c"
release_version = 3.6.1
release_version = 3.6.0
; 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
@ -18,16 +18,16 @@ extra_scripts = pre:shared/build.py
otakeyfile = ota.conf
lorakeyfile = loraconf.h
lmicconfigfile = lmic_config.h
platform_espressif32 = espressif32@6.4.0
platform_espressif32 = espressif32@6.3.2
monitor_speed = 115200
upload_speed = 115200 ; set by build.py and taken from hal file
lib_deps_all =
bitbank2/BitBang_I2C@ ^2.2.1
bitbank2/bb_spi_lcd @ ^2.4.1
fastled/FastLED @ ^3.6.0
https://github.com/dbSuS/libpax.git
greyrook/libpax @ ^1.1.0
https://github.com/SukkoPera/Arduino-Rokkit-Hash.git
bblanchon/ArduinoJson @ ^6.21.3
bblanchon/ArduinoJson @ ^6.21.2
mathertel/OneButton @ ^2.0.3
256dpi/MQTT @ ^2.5.1
ricmoo/QRCode @ ^0.0.1

View File

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