Skip to content

Commit e2cf62b

Browse files
- Updated RadioLib to Version 7.1.2
- moved LoRaWAN module pinout configuration to defines.h - made esp32-s3-wroom-1 the default environment in platformio.ini and enabled persistent storage - LoRaWAN communication made configurable using config.ini
1 parent 68eab04 commit e2cf62b

17 files changed

+3161
-254
lines changed

code/components/RadioLib

Submodule RadioLib updated 295 files

code/components/jomjol_flowcontroll/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ FILE(GLOB_RECURSE app_sources ${CMAKE_CURRENT_SOURCE_DIR}/*.*)
22

33
idf_component_register(SRCS ${app_sources}
44
INCLUDE_DIRS "."
5-
REQUIRES esp_timer esp_wifi jomjol_tfliteclass jomjol_helper jomjol_controlcamera jomjol_mqtt jomjol_influxdb jomjol_webhook jomjol_fileserver_ota jomjol_image_proc jomjol_wlan openmetrics)
5+
REQUIRES esp_timer esp_wifi jomjol_tfliteclass jomjol_helper jomjol_controlcamera jomjol_lorawan jomjol_mqtt jomjol_influxdb jomjol_webhook jomjol_fileserver_ota jomjol_image_proc jomjol_wlan openmetrics)
66

77

code/components/jomjol_flowcontroll/ClassFlowControll.cpp

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ std::string ClassFlowControll::doSingleStep(std::string _stepname, std::string _
5656
_classname = "ClassFlowMQTT";
5757
}
5858
#endif //ENABLE_MQTT
59+
#ifdef ENABLE_LORAWAN
60+
if ((_stepname.compare("[LoRaWAN]") == 0) || (_stepname.compare(";[LoRaWAN]") == 0)){
61+
_classname = "ClassFlowLoRaWAN";
62+
}
63+
#endif //ENABLE_LORAWAN
5964

6065
#ifdef ENABLE_INFLUXDB
6166
if ((_stepname.compare("[InfluxDB]") == 0) || (_stepname.compare(";[InfluxDB]") == 0)){
@@ -105,7 +110,10 @@ std::string ClassFlowControll::TranslateAktstatus(std::string _input)
105110
return ("Sending MQTT");
106111
}
107112
#endif //ENABLE_MQTT
108-
113+
#ifdef ENABLE_LORAWAN
114+
if (_input.compare("ClassFlowLoRaWAN") == 0)
115+
return ("Sending LoRaWAN");
116+
#endif //ENABLE_LORAWAN
109117
#ifdef ENABLE_INFLUXDB
110118
if (_input.compare("ClassFlowInfluxDB") == 0) {
111119
return ("Sending InfluxDB");
@@ -195,6 +203,20 @@ bool ClassFlowControll::StartMQTTService()
195203
}
196204
#endif //ENABLE_MQTT
197205

206+
#ifdef ENABLE_LORAWAN
207+
bool ClassFlowControll::StartLoRaWANService()
208+
{
209+
/* Start the LoRaWAN service */
210+
for (int i = 0; i < FlowControll.size(); ++i) {
211+
if (FlowControll[i]->name().compare("ClassFlowLoRaWAN") == 0) {
212+
return ((ClassFlowLoRaWAN*) (FlowControll[i]))->Start(AutoInterval);
213+
}
214+
}
215+
return false;
216+
}
217+
#endif //ENABLE_LORAWAN
218+
219+
198220
void ClassFlowControll::SetInitialParameter(void)
199221
{
200222
AutoStart = true;
@@ -252,7 +274,10 @@ ClassFlow* ClassFlowControll::CreateClassFlow(std::string _type)
252274
cfc = new ClassFlowMQTT(&FlowControll);
253275
}
254276
#endif //ENABLE_MQTT
255-
277+
#ifdef ENABLE_LORAWAN
278+
if (toUpper(_type).compare("[LoRaWAN]") == 0)
279+
cfc = new ClassFlowLoRaWAN(&FlowControll);
280+
#endif //ENABLE_LORAWAN
256281
#ifdef ENABLE_INFLUXDB
257282
if (toUpper(_type).compare("[INFLUXDB]") == 0) {
258283
cfc = new ClassFlowInfluxDB(&FlowControll);

code/components/jomjol_flowcontroll/ClassFlowControll.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
#ifdef ENABLE_MQTT
1414
#include "ClassFlowMQTT.h"
1515
#endif //ENABLE_MQTT
16+
#ifdef ENABLE_LORAWAN
17+
#include "ClassFlowLoRaWAN.h"
18+
#endif //ENABLE_LORAWAN
1619
#ifdef ENABLE_INFLUXDB
1720
#include "ClassFlowInfluxDB.h"
1821
#include "ClassFlowInfluxDBv2.h"
@@ -87,6 +90,10 @@ class ClassFlowControll :
8790
bool StartMQTTService();
8891
#endif //ENABLE_MQTT
8992

93+
#ifdef ENABLE_LORAWAN
94+
bool StartLoRaWANService();
95+
#endif //ENABLE_LORAWAN
96+
9097
int CleanTempFolder();
9198

9299
string name(){return "ClassFlowControll";};

0 commit comments

Comments
 (0)