From 6901180c481e181ff656b9c7dd3fe4a901fd31da Mon Sep 17 00:00:00 2001 From: David Crocker Date: Tue, 13 Sep 2022 12:37:16 +0100 Subject: Fixed bug with main boards in expansion mode generating stall events --- src/Platform/Platform.cpp | 19 ++++++++++++------- src/Version.h | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/Platform/Platform.cpp b/src/Platform/Platform.cpp index 0eb3bd59..ba00aab9 100644 --- a/src/Platform/Platform.cpp +++ b/src/Platform/Platform.cpp @@ -1186,17 +1186,22 @@ void Platform::Spin() noexcept # if SUPPORT_REMOTE_COMMANDS if (CanInterface::InExpansionMode()) { - CanInterface::RaiseEvent(EventType::driver_stall, 0, nextDriveToPoll, "", va_list()); + if (eventOnStallDrivers.Intersects(mask)) + { + CanInterface::RaiseEvent(EventType::driver_stall, 0, nextDriveToPoll, "", va_list()); + } } else # endif - if (eventOnStallDrivers.Intersects(mask)) - { - Event::AddEvent(EventType::driver_stall, 0, CanInterface::GetCanAddress(), nextDriveToPoll, ""); - } - else if (logOnStallDrivers.Intersects(mask)) { - MessageF(WarningMessage, "Driver %u stalled at Z height %.2f\n", nextDriveToPoll, (double)reprap.GetMove().LiveCoordinate(Z_AXIS, reprap.GetCurrentTool())); + if (eventOnStallDrivers.Intersects(mask)) + { + Event::AddEvent(EventType::driver_stall, 0, CanInterface::GetCanAddress(), nextDriveToPoll, ""); + } + else if (logOnStallDrivers.Intersects(mask)) + { + MessageF(WarningMessage, "Driver %u stalled at Z height %.2f\n", nextDriveToPoll, (double)reprap.GetMove().LiveCoordinate(Z_AXIS, reprap.GetCurrentTool())); + } } } # endif diff --git a/src/Version.h b/src/Version.h index c624f546..44a59909 100644 --- a/src/Version.h +++ b/src/Version.h @@ -10,7 +10,7 @@ #ifndef VERSION // Note: the complete VERSION string must be in standard version number format and must not contain spaces! This is so that DWC can parse it. -# define MAIN_VERSION "3.4.2rc3+1" +# define MAIN_VERSION "3.4.2rc3+2" # ifdef USE_CAN0 # define VERSION_SUFFIX "(CAN0)" # else -- cgit v1.2.3