diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-10-09 15:36:58 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-10-09 15:36:58 +0300 |
commit | 662240bf17caa22fbb208d36f9f1871e9370ac87 (patch) | |
tree | 38c7f2d09e051169f10644d90aa96f0dc82499a0 /src/Platform | |
parent | 7e56302c1ade996d97874c5adfe07be2fe09c390 (diff) |
M17 now enables drivers even when RRF thinks they are already enabled
This was done to make it easier to tune expansion board drivers after
updating expansion board firmware.
Diffstat (limited to 'src/Platform')
-rw-r--r-- | src/Platform/Platform.cpp | 4 | ||||
-rw-r--r-- | src/Platform/Platform.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Platform/Platform.cpp b/src/Platform/Platform.cpp index 53d3f171..e7bf7910 100644 --- a/src/Platform/Platform.cpp +++ b/src/Platform/Platform.cpp @@ -2678,9 +2678,9 @@ void Platform::DisableOneLocalDriver(size_t driver) noexcept } // Enable the local drivers for a drive. Must not be called from an ISR, or with interrupts disabled. -void Platform::EnableDrivers(size_t axisOrExtruder) noexcept +void Platform::EnableDrivers(size_t axisOrExtruder, bool unconditional) noexcept { - if (driverState[axisOrExtruder] != DriverStatus::enabled) + if (unconditional || driverState[axisOrExtruder] != DriverStatus::enabled) { driverState[axisOrExtruder] = DriverStatus::enabled; const float requiredCurrent = motorCurrents[axisOrExtruder] * motorCurrentFraction[axisOrExtruder]; diff --git a/src/Platform/Platform.h b/src/Platform/Platform.h index 24c979f1..26633ec0 100644 --- a/src/Platform/Platform.h +++ b/src/Platform/Platform.h @@ -439,7 +439,7 @@ public: void SetDriverAbsoluteDirection(size_t driver, bool dVal) noexcept; void SetEnableValue(size_t driver, int8_t eVal) noexcept; int8_t GetEnableValue(size_t driver) const noexcept; - void EnableDrivers(size_t axisOrExtruder) noexcept; + void EnableDrivers(size_t axisOrExtruder, bool unconditional) noexcept; void EnableOneLocalDriver(size_t driver, float requiredCurrent) noexcept; void DisableAllDrivers() noexcept; void DisableDrivers(size_t axisOrExtruder) noexcept; |