diff --git a/.drone.yml b/.drone.yml index 8b17aa1..e3d84dd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -40,3 +40,10 @@ steps: when: branch: master event: tag + +trigger: + ref: + include: + - refs/heads/master + - refs/heads/testing + - refs/tags/** diff --git a/CMakeLists.txt b/CMakeLists.txt index a884811..a85fc70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project(controller - VERSION 0.2.1 + VERSION 0.2.4 LANGUAGES C) add_executable(controller src/main.c) diff --git a/README b/README deleted file mode 100644 index a0d37d0..0000000 --- a/README +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..0358051 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +[![Build Status](https://ci.serguzim.me/api/badges/emgauwa/controller/status.svg)](https://ci.serguzim.me/emgauwa/controller) \ No newline at end of file diff --git a/src/connections.c b/src/connections.c index 3be866f..2f2b2f2 100644 --- a/src/connections.c +++ b/src/connections.c @@ -29,7 +29,7 @@ struct mg_connection* connection_mqtt_connect(struct mg_mgr *mgr) { char address[100]; - sprintf(address, "tcp://localhost:%u", global_config.mqtt_port); + sprintf(address, "tcp://127.0.0.1:%u", global_config.mqtt_port); struct mg_connection *c = mg_connect(mgr, address, handler_mqtt); return c; } diff --git a/src/main.c b/src/main.c index 1c64695..4736efe 100644 --- a/src/main.c +++ b/src/main.c @@ -125,6 +125,7 @@ main(int argc, const char** argv) if(global_config.relay_configs[i].driver == RELAY_DRIVER_GPIO) { pinMode(global_config.relay_configs[i].pin, OUTPUT); + digitalWrite(global_config.relay_configs[i].pin, global_config.relay_configs[i].inverted); } }