Merge branch 'master' into dev

This commit is contained in:
Tobias Reisinger 2020-07-14 19:50:35 +02:00
commit c5b282d5a3
6 changed files with 11 additions and 5 deletions

View file

@ -40,3 +40,10 @@ steps:
when: when:
branch: master branch: master
event: tag event: tag
trigger:
ref:
include:
- refs/heads/master
- refs/heads/testing
- refs/tags/**

View file

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.7) cmake_minimum_required (VERSION 3.7)
project(controller project(controller
VERSION 0.2.1 VERSION 0.2.4
LANGUAGES C) LANGUAGES C)
add_executable(controller src/main.c) add_executable(controller src/main.c)

3
README
View file

@ -1,3 +0,0 @@
<a href="https://ci.serguzim.me/jobs/emgauwa-controller">
<img src="https://ci.serguzim.me/jobs/emgauwa-controller">
</a>

1
README.md Normal file
View file

@ -0,0 +1 @@
[![Build Status](https://ci.serguzim.me/api/badges/emgauwa/controller/status.svg)](https://ci.serguzim.me/emgauwa/controller)

View file

@ -29,7 +29,7 @@ struct mg_connection*
connection_mqtt_connect(struct mg_mgr *mgr) connection_mqtt_connect(struct mg_mgr *mgr)
{ {
char address[100]; 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); struct mg_connection *c = mg_connect(mgr, address, handler_mqtt);
return c; return c;
} }

View file

@ -125,6 +125,7 @@ main(int argc, const char** argv)
if(global_config.relay_configs[i].driver == RELAY_DRIVER_GPIO) if(global_config.relay_configs[i].driver == RELAY_DRIVER_GPIO)
{ {
pinMode(global_config.relay_configs[i].pin, OUTPUT); pinMode(global_config.relay_configs[i].pin, OUTPUT);
digitalWrite(global_config.relay_configs[i].pin, global_config.relay_configs[i].inverted);
} }
} }