cherry pick ledflasher fixes 8b897afa3af6adca3d3296c7e7d54021e6f090a0: examples/daemon: fix ledflasher param names Bug: 27533153 Change-Id: Idb2c4ca7974096949cd87d2639c97530da2b62de Reviewed-on: https://weave-review.googlesource.com/2885 Reviewed-by: Johan Euphrosine <proppy@google.com>
diff --git a/examples/daemon/ledflasher/ledflasher.cc b/examples/daemon/ledflasher/ledflasher.cc index 369b003..2e740b6 100644 --- a/examples/daemon/ledflasher/ledflasher.cc +++ b/examples/daemon/ledflasher/ledflasher.cc
@@ -84,11 +84,11 @@ int32_t led_index = 0; const auto& params = cmd->GetParameters(); bool cmd_value = false; - if (params.GetInteger("_led", &led_index) && - params.GetBoolean("_on", &cmd_value)) { + if (params.GetInteger("led", &led_index) && + params.GetBoolean("on", &cmd_value)) { // Display this command in terminal - LOG(INFO) << cmd->GetName() << " _led: " << led_index - << ", _on: " << (cmd_value ? "true" : "false"); + LOG(INFO) << cmd->GetName() << " led: " << led_index + << ", on: " << (cmd_value ? "true" : "false"); led_index--; int new_state = cmd_value ? 1 : 0; @@ -114,8 +114,8 @@ LOG(INFO) << "received command: " << cmd->GetName(); const auto& params = cmd->GetParameters(); int32_t led_index = 0; - if (params.GetInteger("_led", &led_index)) { - LOG(INFO) << cmd->GetName() << " _led: " << led_index; + if (params.GetInteger("led", &led_index)) { + LOG(INFO) << cmd->GetName() << " led: " << led_index; led_index--; led_status_[led_index] = ~led_status_[led_index];