aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-06-20 18:19:02 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2015-06-20 18:19:02 +0200
commitd91e500592790f1ef22ebfe921f273a61ff6252f (patch)
treeba933803970a8c5f21285a4af428d9db2cd5bcb7 /apps
parentff6b859c52ad670b3db08e11209dc6833e894611 (diff)
downloadble-toys-d91e500592790f1ef22ebfe921f273a61ff6252f.tar.gz
ble-toys-d91e500592790f1ef22ebfe921f273a61ff6252f.tar.bz2
ble-toys-d91e500592790f1ef22ebfe921f273a61ff6252f.tar.xz
ble-toys-d91e500592790f1ef22ebfe921f273a61ff6252f.zip
o Fixing typos.
Diffstat (limited to 'apps')
-rw-r--r--apps/sm-get-value.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/sm-get-value.cpp b/apps/sm-get-value.cpp
index b813121..883495a 100644
--- a/apps/sm-get-value.cpp
+++ b/apps/sm-get-value.cpp
@@ -93,13 +93,14 @@ public:
~sm_get_value() = default;
void add_options(po::options_description_easy_init &options) override {
+ auto default_sleep = po::value<>(&sleepTime)->default_value(0);
+
options("help", "produce help message")
("device", po::value<string>()->required(), "MAC of device to poll")
("sensor", po::value<vector<unsigned int>>(&sensors)->multitoken(), "Sensor to poll, defaults to all")
- ("sleep", po::value<unsigned int>(&sleepTime)->default_value(0),
- "How long to sleep in seconds between each poll. If not give, it will exit after first poll")
- ("format", po::value<sample_format_type>(&format)->default_value(sample_format_type::KEY_VALUE), "Output format");
-
+ ("sleep", default_sleep, "How long to sleep in seconds between each poll. If not given, it will exit after first poll")
+ ("format", po::value<sample_format_type>(&format)->default_value(sample_format_type::KEY_VALUE),
+ "Output format");
}
int main(app_execution &execution) override {
@@ -147,8 +148,6 @@ public:
return EXIT_FAILURE;
}
}
-
-
};
}