aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Euphrosine <proppy@google.com>2016-03-09 01:11:54 -0800
committerJohan Euphrosine <proppy@google.com>2016-03-09 11:02:44 +0000
commit8b897afa3af6adca3d3296c7e7d54021e6f090a0 (patch)
tree516e50a4388dc25bc783d30c38c855b619dfe221
parent978e712cf915649cb9c33945f2aeb3b15c675c83 (diff)
downloadlibweave-8b897afa3af6adca3d3296c7e7d54021e6f090a0.tar.gz
examples/daemon: fix ledflasher param names
tested with: http://instaweave.devrel.pub:90/?branch=54b4b0e7643738cd7c5014e01d4aeaab01165304 Change-Id: I9f5547bf33c418322d90dfae7aac2d8248c629cd Reviewed-on: https://weave-review.googlesource.com/2883 Reviewed-by: Paul Westbrook <pwestbro@google.com>
-rw-r--r--examples/daemon/ledflasher/ledflasher.cc12
1 files changed, 6 insertions, 6 deletions
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 @@ class LedFlasherHandler {
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 @@ class LedFlasherHandler {
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];