diff options
author | Vince Leung <leungv@google.com> | 2021-04-07 19:28:59 +0000 |
---|---|---|
committer | Vince Leung <leungv@google.com> | 2021-04-09 19:12:17 +0000 |
commit | 7179d78070a4471b7b1f7229cb091b1483626d32 (patch) | |
tree | bb0f999e52b102a40ccbdfc6b62eecc6fa8edbe4 | |
parent | ff96afe05f363284b7ea4e61c9add69a2e69e195 (diff) | |
download | pixel-7179d78070a4471b7b1f7229cb091b1483626d32.tar.gz |
vibrator: cs40l25: use min freq in brakingpwle
Use the minimum frequency when creating the segments for BrakingPwle
instead of 0 because 0 is not within the valid frequency range.
Bug: 184682289
Test: verify brakingpwles can be created and played using idlcli
Change-Id: I4416448b86e1473175adf93be441ab3bb811f266
-rw-r--r-- | vibrator/cs40l25/Vibrator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vibrator/cs40l25/Vibrator.cpp b/vibrator/cs40l25/Vibrator.cpp index 5d711d0c..1a80ed47 100644 --- a/vibrator/cs40l25/Vibrator.cpp +++ b/vibrator/cs40l25/Vibrator.cpp @@ -531,7 +531,7 @@ static void constructBrakingSegment(std::ostringstream &pwleBuilder, const int & int duration, Braking brakingType) { pwleBuilder << ",T" << segmentIdx << ":" << duration; pwleBuilder << ",L" << segmentIdx << ":" << 0; - pwleBuilder << ",F" << segmentIdx << ":" << 0; + pwleBuilder << ",F" << segmentIdx << ":" << PWLE_FREQUENCY_MIN_HZ; pwleBuilder << ",C" << segmentIdx << ":0"; pwleBuilder << ",B" << segmentIdx << ":" << static_cast<std::underlying_type<Braking>::type>(brakingType); |