From 7fffd33e3ab88ff743213f708ebae8e5571da6bb Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Fri, 5 Jan 2018 01:43:38 +0100 Subject: [PATCH] Remove dup library in mos.yml; cast 'value' to bool in Relay.Set() --- mos.yml | 1 - src/rpc.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/mos.yml b/mos.yml index 824866c..c2167d5 100644 --- a/mos.yml +++ b/mos.yml @@ -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 diff --git a/src/rpc.c b/src/rpc.c index 6054786..4a3d693 100644 --- a/src/rpc.c +++ b/src/rpc.c @@ -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;