Add timespec() and channel_override logic -- so we can install a time specification with which the channels are driven, but yet allowing a human override (either by RPC or by Button)

This commit is contained in:
Pim van Pelt
2018-11-04 15:44:17 +01:00
parent d5778c6fba
commit 0ad33f5fbc
3 changed files with 112 additions and 13 deletions

View File

@ -118,6 +118,7 @@ static void rpc_channel_set_handler(struct mg_rpc_request_info *ri, void *cb_arg
} else {
channel_set(idx, (bool)value);
}
channel_override_set(idx);
mg_rpc_send_responsef(ri, "{idx: %d, relay_state: %d}", idx, channel_get(idx));
ri = NULL;