Merge branch 'master' into dev
This commit is contained in:
commit
c5b282d5a3
6 changed files with 11 additions and 5 deletions
|
@ -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/**
|
||||||
|
|
|
@ -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
3
README
|
@ -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
1
README.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
[![Build Status](https://ci.serguzim.me/api/badges/emgauwa/controller/status.svg)](https://ci.serguzim.me/emgauwa/controller)
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue