From 0ccba920a6ebba939b23063b384ae15146d53469 Mon Sep 17 00:00:00 2001 From: Ben Agricola Date: Wed, 21 Aug 2024 13:43:02 +0100 Subject: [PATCH] Suppress Modbus comm error when V passed Signed-off-by: Ben Agricola --- src/Platform/Platform.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Platform/Platform.cpp b/src/Platform/Platform.cpp index 8c79902ef0..94503ba85a 100644 --- a/src/Platform/Platform.cpp +++ b/src/Platform/Platform.cpp @@ -2502,12 +2502,12 @@ GCodeResult Platform::ReceiveI2cOrModbus(GCodeBuffer& gb, const StringRef &reply break; } } - else + else if(resultVar == nullptr) // Report comm error if output variable not set { reply.copy("no or bad response from Modbus device"); } } - else + else if(resultVar == nullptr) // Report init error if output variable not set { reply.copy("couldn't initiate Modbus transaction"); }