mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 12:46:22 +01:00
Detect movement also in the negative direction
Movement should be registered if speed is non-zero, in both directions.
This commit is contained in:
parent
76c9f5530e
commit
d921db5998
@ -336,7 +336,7 @@ void LD2450Component::handle_periodic_data_(uint8_t *buffer, int len) {
|
||||
if (ss != nullptr) {
|
||||
val = this->decode_speed_(buffer[start], buffer[start + 1]);
|
||||
ts = val;
|
||||
if (val > 0) {
|
||||
if (val) {
|
||||
is_moving = true;
|
||||
moving_target_count++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user