mirror of
https://gitlab.com/wirelos/sprocket-plugin-mqtt.git
synced 2025-12-15 22:18:20 +01:00
Use new config folder
This commit is contained in:
@@ -11,4 +11,4 @@ examples:
|
|||||||
image: python:2.7-stretch
|
image: python:2.7-stretch
|
||||||
script:
|
script:
|
||||||
- pio run -t clean
|
- pio run -t clean
|
||||||
- pio run -e basic
|
- pio run
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
[platformio]
|
[platformio]
|
||||||
env_default = basic, chat
|
env_default = basic, chat, chat-esp01
|
||||||
|
|
||||||
[common]
|
[common]
|
||||||
framework = arduino
|
framework = arduino
|
||||||
@@ -13,7 +13,7 @@ lib_deps =
|
|||||||
SPIFFS
|
SPIFFS
|
||||||
ArduinoJson@5.13.4
|
ArduinoJson@5.13.4
|
||||||
https://gitlab.com/wirelos/sprocket-lib.git#develop
|
https://gitlab.com/wirelos/sprocket-lib.git#develop
|
||||||
https://gitlab.com/wirelos/sprocket-network-wifi.git
|
https://gitlab.com/wirelos/sprocket-network-wifi.git#next
|
||||||
|
|
||||||
[env:basic]
|
[env:basic]
|
||||||
src_filter = +<*> -<examples/> +<examples/basic/>
|
src_filter = +<*> -<examples/> +<examples/basic/>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ void MqttPlugin::applyConfigFromFile(const char* fileName) {
|
|||||||
|
|
||||||
void MqttPlugin::activate(Scheduler *scheduler)
|
void MqttPlugin::activate(Scheduler *scheduler)
|
||||||
{
|
{
|
||||||
applyConfigFromFile("/mqttConfig.json");
|
applyConfigFromFile("/config/mqtt.json");
|
||||||
client = new PubSubClient(brokerHost.c_str(), brokerPort, bind(&MqttPlugin::downstreamHandler, this, _1, _2, _3), wifiClient);
|
client = new PubSubClient(brokerHost.c_str(), brokerPort, bind(&MqttPlugin::downstreamHandler, this, _1, _2, _3), wifiClient);
|
||||||
enableConnectTask(scheduler);
|
enableConnectTask(scheduler);
|
||||||
enableProcessTask(scheduler);
|
enableProcessTask(scheduler);
|
||||||
|
|||||||
Reference in New Issue
Block a user