summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2020-07-21 08:35:42 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-07-21 08:35:42 +0000
commit5896c6247111f2f0984f76e614bc53315c9a3825 (patch)
treee2ff54971f60bcf365fce5788c34603e96956358
parent9a8c972a980ea84b8c8852b626bbb68c7eb37ac4 (diff)
parent54a2e58b0948462411346bc38c07a1bdf67d0dd5 (diff)
Merge "idlcli: vibrator: Fix Compose Scale Validation"
-rw-r--r--cmds/idlcli/vibrator/CommandCompose.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds/idlcli/vibrator/CommandCompose.cpp b/cmds/idlcli/vibrator/CommandCompose.cpp
index 97c057fa0c..eb9008b68e 100644
--- a/cmds/idlcli/vibrator/CommandCompose.cpp
+++ b/cmds/idlcli/vibrator/CommandCompose.cpp
@@ -37,7 +37,7 @@ class CommandCompose : public Command {
{"-b", {"Block for duration of vibration."}},
{"<delay>", {"In milliseconds"}},
{"<primitive>", {"Primitive ID."}},
- {"<scale>", {"0.0 (exclusive) - 1.0 (inclusive)."}},
+ {"<scale>", {"0.0 (inclusive) - 1.0 (inclusive)."}},
{"...", {"May repeat multiple times."}},
};
return details;
@@ -72,7 +72,7 @@ class CommandCompose : public Command {
return USAGE;
}
if (auto scale = args.pop<decltype(effect.scale)>();
- scale && *scale > 0.0 && scale <= 1.0) {
+ scale && *scale >= 0.0 && scale <= 1.0) {
effect.scale = *scale;
std::cout << "Scale: " << effect.scale << std::endl;
} else {