Remove dup library in mos.yml; cast 'value' to bool in Relay.Set()

This commit is contained in:
Pim van Pelt
2018-01-05 01:43:38 +01:00
parent 71410fee91
commit 7fffd33e3a
2 changed files with 1 additions and 2 deletions

View File

@ -99,7 +99,6 @@ libs:
- origin: https://github.com/mongoose-os-libs/rpc-service-fs
- origin: https://github.com/mongoose-os-libs/prometheus-metrics
- origin: https://github.com/mongoose-os-libs/rpc-common
- origin: https://github.com/mongoose-os-libs/rpc-service-config
- origin: https://github.com/mongoose-os-libs/rpc-mqtt
- origin: https://github.com/mongoose-os-libs/mqtt
- origin: https://github.com/mongoose-os-libs/pwm

View File

@ -90,7 +90,7 @@ static void rpc_relay_set_handler(struct mg_rpc_request_info *ri, void *cb_arg,
return;
}
relays_set_by_idx(idx, state);
relays_set_by_idx(idx, (bool) state);
mg_rpc_send_responsef(ri, "{idx: %d, gpio: %d, state: %d}", idx, gpio, state);
(void) cb_arg;