-
-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #608 from cyberman54/development
v1.9.996
- Loading branch information
Showing
22 changed files
with
430 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#ifndef _MQTTCLIENT_H | ||
#define _MQTTCLIENT_H | ||
|
||
#include "globals.h" | ||
#include "rcommand.h" | ||
#include <ETH.h> | ||
#include <PubSubClient.h> | ||
|
||
#define MQTT_INTOPIC "paxcounter_in/" | ||
#define MQTT_OUTTOPIC "paxcounter_out/" | ||
#define MQTT_PORT 1883 | ||
#define MQTT_SERVER "broker.hivemq.com" | ||
#define MQTT_RETRYSEC 10 // retry reconnect every 10 seconds | ||
|
||
extern TaskHandle_t mqttTask; | ||
extern PubSubClient mqttClient; | ||
|
||
void mqtt_enqueuedata(MessageBuffer_t *message); | ||
void mqtt_queuereset(void); | ||
void mqtt_client_task(void *param); | ||
int mqtt_connect(const char *my_host, const uint16_t my_port); | ||
void mqtt_callback(char *topic, byte *payload, unsigned int length); | ||
void NetworkEvent(WiFiEvent_t event); | ||
esp_err_t mqtt_init(void); | ||
|
||
#endif // _MQTTCLIENT_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ halfile = generic.h | |
;halfile = tinypicomatrix.h | ||
;halfile = m5core.h | ||
;halfile = m5fire.h | ||
;halfile = olimexpoeiso.h | ||
|
||
[platformio] | ||
; upload firmware to board with usb cable | ||
|
@@ -45,51 +46,54 @@ 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 = 1.9.991 | ||
release_version = 1.9.996 | ||
; 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 | ||
extra_scripts = pre:build.py | ||
otakeyfile = ota.conf | ||
lorakeyfile = loraconf.h | ||
lmicconfigfile = lmic_config.h | ||
platform_espressif32 = [email protected].1 | ||
platform_espressif32 = [email protected].2 | ||
monitor_speed = 115200 | ||
upload_speed = 115200 | ||
upload_speed = 115200 ; set by build.py and taken from hal file | ||
display_library = ; set by build.py and taken from hal file | ||
lib_deps_lora = | ||
MCCI LoRaWAN LMIC [email protected] ; MCCI LMIC by Terrill Moore | ||
lib_deps_display = | ||
[email protected] ; fast and small OLED lib by Larry Bank | ||
[email protected] | ||
;OneBitDisplay@>1.4.0 | ||
https://github.com/bitbank2/OneBitDisplay.git | ||
[email protected] | ||
[email protected] | ||
lib_deps_matrix_display = | ||
[email protected] | ||
TFT_eSPI@>=2.2.8 | ||
lib_deps_ledmatrix = | ||
Ultrathin_LED_Matrix@>=1.0.0 | ||
lib_deps_rgbled = | ||
SmartLeds@>=1.2.0 | ||
lib_deps_gps = | ||
1655@>=1.0.2 ; #1655 TinyGPSPlus by Mikal Hart | ||
lib_deps_sensors = | ||
Adafruit Unified Sensor@>=1.1.2 | ||
Adafruit Unified Sensor@>=1.1.3 | ||
Adafruit BME280 Library@>=2.0.2 | ||
Adafruit BMP085 Library@>=1.0.1 | ||
Adafruit BMP085 Library@>=1.1.0 | ||
BSEC Software [email protected] | ||
https://github.com/ricki-z/SDS011.git | ||
lib_deps_basic = | ||
ArduinoJson@^5.13.1 | ||
76@>=1.2.4 ; #76 Timezone by Jack Christensen | ||
274@>=2.3.4 ; #274 RTC by Michael Miller | ||
SimpleButton | ||
AXP202X_Library@>=1.1.0 ; AXP202 PMU lib by Lewis He | ||
AXP202X_Library@>=1.1.1 ; AXP202 PMU lib by Lewis He | ||
esp32-micro-sdcard | ||
PubSubClient@>=2.8.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_sensors} | ||
${common.lib_deps_matrix_display} | ||
${common.lib_deps_ledmatrix} | ||
build_flags_basic = | ||
-include "src/hal/${board.halfile}" | ||
-include "src/paxcounter.conf" | ||
|
@@ -110,7 +114,7 @@ framework = arduino | |
board = esp32dev | ||
board_build.partitions = min_spiffs.csv | ||
upload_speed = ${common.upload_speed} | ||
;upload_port = COM5 | ||
;upload_port = COM7 | ||
platform = ${common.platform_espressif32} | ||
lib_deps = ${common.lib_deps_all} | ||
build_flags = ${common.build_flags_all} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.