From 9881e7d92b1ae2d990fb1ace63e30aa52eae474b Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Sat, 9 May 2020 19:46:28 +0200 Subject: [PATCH 1/8] fix: README --- README | 3 --- README.md | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 README create mode 100644 README.md 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..b41b378 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ + + + \ No newline at end of file From 212b2156a593e7f026a2de4c06c44eddd18d267b Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Tue, 30 Jun 2020 23:19:46 +0200 Subject: [PATCH 2/8] fix: drone release handling --- .drone.yml | 15 +++++++++++++++ CMakeLists.txt | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index a1c6e48..8b17aa1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,6 +14,20 @@ steps: - cmake .. - make +- name: gitea_prerelease + image: plugins/gitea-release + settings: + prerelease: true + api_key: + from_secret: gitea_token + base_url: https://git.serguzim.me + files: + - build/controller + - build/controller.ini + when: + branch: testing + event: tag + - name: gitea_release image: plugins/gitea-release settings: @@ -24,4 +38,5 @@ steps: - build/controller - build/controller.ini when: + branch: master event: tag diff --git a/CMakeLists.txt b/CMakeLists.txt index a884811..b700667 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.2 LANGUAGES C) add_executable(controller src/main.c) From 5113d134bb0998667ffb7cd094de726d47ddbd66 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Tue, 30 Jun 2020 23:50:48 +0200 Subject: [PATCH 3/8] add: prerelease --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8b17aa1..e288d0d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,11 +13,13 @@ steps: - cd build - cmake .. - make + - echo "GITEA_RELEASE_TITLE=$(controller --version)" > /drone/src/release_env - name: gitea_prerelease image: plugins/gitea-release settings: prerelease: true + env-file: release_env api_key: from_secret: gitea_token base_url: https://git.serguzim.me @@ -26,7 +28,6 @@ steps: - build/controller.ini when: branch: testing - event: tag - name: gitea_release image: plugins/gitea-release @@ -38,5 +39,4 @@ steps: - build/controller - build/controller.ini when: - branch: master event: tag From 5acadf0cc8f6cad09c804c917c3b38c721b31cd9 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Tue, 30 Jun 2020 23:52:15 +0200 Subject: [PATCH 4/8] fix: release handling (prepend testing in git :/ ) --- .drone.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.drone.yml b/.drone.yml index e288d0d..a1c6e48 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,21 +13,6 @@ steps: - cd build - cmake .. - make - - echo "GITEA_RELEASE_TITLE=$(controller --version)" > /drone/src/release_env - -- name: gitea_prerelease - image: plugins/gitea-release - settings: - prerelease: true - env-file: release_env - api_key: - from_secret: gitea_token - base_url: https://git.serguzim.me - files: - - build/controller - - build/controller.ini - when: - branch: testing - name: gitea_release image: plugins/gitea-release From 79bf436a01e956fe460846224071f4f60103d689 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Wed, 1 Jul 2020 23:22:43 +0200 Subject: [PATCH 5/8] add: drone triggers --- .drone.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.drone.yml b/.drone.yml index a1c6e48..c2a5100 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,3 +25,10 @@ steps: - build/controller.ini when: event: tag + +trigger: + ref: + include: + - refs/heads/master + - refs/heads/testing + - refs/tags/** From 03b1cb857ead5a6f0c9ef1d9b046cb42fcabb98f Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Thu, 2 Jul 2020 02:40:23 +0200 Subject: [PATCH 6/8] fix: relays in on mode on start --- CMakeLists.txt | 2 +- src/main.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b700667..48f8dd6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project(controller - VERSION 0.2.2 + VERSION 0.2.3 LANGUAGES C) add_executable(controller src/main.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); } } From aa389d5c40adf87d2f577554b959c66465f5b255 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Thu, 2 Jul 2020 14:58:30 +0200 Subject: [PATCH 7/8] hotfix: bad mqtt connection address --- CMakeLists.txt | 2 +- src/connections.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 48f8dd6..a85fc70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project(controller - VERSION 0.2.3 + VERSION 0.2.4 LANGUAGES C) add_executable(controller src/main.c) 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; } From 61e7a94dbb3bda073b4b305fc7d5ec3c7c4345e9 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Sun, 5 Jul 2020 16:47:28 +0200 Subject: [PATCH 8/8] Update 'README.md' --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index b41b378..0358051 100644 --- a/README.md +++ b/README.md @@ -1,3 +1 @@ - - - \ No newline at end of file +[![Build Status](https://ci.serguzim.me/api/badges/emgauwa/controller/status.svg)](https://ci.serguzim.me/emgauwa/controller) \ No newline at end of file