From 757ce9946bf00012b22edb68af921a4e92b53181 Mon Sep 17 00:00:00 2001 From: David Crocker Date: Tue, 27 Aug 2024 16:45:30 +0100 Subject: [PATCH] Minor code improvement --- src/LedStrips/DotStarLedStrip.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/LedStrips/DotStarLedStrip.cpp b/src/LedStrips/DotStarLedStrip.cpp index 764460e92c..63490b76d9 100644 --- a/src/LedStrips/DotStarLedStrip.cpp +++ b/src/LedStrips/DotStarLedStrip.cpp @@ -25,10 +25,9 @@ GCodeResult DotStarLedStrip::Configure(GCodeBuffer& gb, const StringRef& reply, bool seen = false; GCodeResult rslt = CommonConfigure(gb, reply, pinName, seen); - if (gb.Seen('K')) + uint32_t order; + if (gb.TryGetLimitedUIValue('K', order, seen, (uint32_t)ColorOrder::count)) { - uint32_t order; - gb.TryGetLimitedUIValue('K', order, seen, (uint32_t)ColorOrder::count); colorOrder = (ColorOrder)order; }