From 50afb3411aa17d6905368ecf246258f2e9763ee5 Mon Sep 17 00:00:00 2001 From: Hareesh M U Date: Wed, 8 Nov 2023 14:12:49 +0000 Subject: [PATCH] Initialize tx,ty,td,ts vars --- esphome/components/ld2450/ld2450.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/esphome/components/ld2450/ld2450.cpp b/esphome/components/ld2450/ld2450.cpp index ee20607b05..e6b4e7c719 100644 --- a/esphome/components/ld2450/ld2450.cpp +++ b/esphome/components/ld2450/ld2450.cpp @@ -298,10 +298,10 @@ void LD2450Component::handle_periodic_data_(uint8_t *buffer, int len) { int16_t start; int16_t val; uint8_t index; - int16_t tx; - int16_t ty; - int16_t td; - int16_t ts; + int16_t tx = 0; + int16_t ty = 0; + int16_t td = 0; + int16_t ts = 0; int16_t angle; std::string direction;