From 0d76a0ea23cf076bdbf1c29faf2d1497530f07b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sun, 20 Aug 2023 13:45:48 +0000 Subject: [PATCH] optimisation: sg_filter_threshold not initialised in constructor Caught with Cppcheck Change in memory: Flash: -26 bytes SRAM: 0 bytes --- src/hal/tmc2130.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hal/tmc2130.h b/src/hal/tmc2130.h index 5a95f7a..549d4cd 100644 --- a/src/hal/tmc2130.h +++ b/src/hal/tmc2130.h @@ -179,7 +179,7 @@ private: ErrorFlags errorFlags; bool initialized = false; bool enabled = false; - uint8_t sg_filter_threshold; + uint8_t sg_filter_threshold = 0; uint8_t sg_filter_counter = 0; };