diff options
Diffstat (limited to 'src/Platform/Platform.cpp')
-rw-r--r-- | src/Platform/Platform.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Platform/Platform.cpp b/src/Platform/Platform.cpp index 966906b5..9c392fb1 100644 --- a/src/Platform/Platform.cpp +++ b/src/Platform/Platform.cpp @@ -659,7 +659,7 @@ void Platform::Init() noexcept driveDriverBits[drive] = 0; motorCurrents[drive] = 0.0; motorCurrentFraction[drive] = 1.0; -#if HAS_SMART_DRIVERS +#if HAS_SMART_DRIVERS || SUPPORT_CAN_EXPANSION standstillCurrentPercent[drive] = DefaultStandstillCurrentPercent; #endif microstepping[drive] = 16 | 0x8000; // x16 with interpolation @@ -2666,7 +2666,7 @@ GCodeResult Platform::SetMotorCurrent(size_t axisOrExtruder, float currentOrPerc motorCurrentFraction[axisOrExtruder] = constrain<float>(0.01 * currentOrPercent, 0.0, 1.0); break; -#if HAS_SMART_DRIVERS +#if HAS_SMART_DRIVERS || SUPPORT_CAN_EXPANSION case 917: standstillCurrentPercent[axisOrExtruder] = constrain<float>(currentOrPercent, 0.0, 100.0); break; @@ -2848,7 +2848,7 @@ int Platform::GetMotorCurrent(size_t drive, int code) const noexcept rslt = motorCurrentFraction[drive] * 100.0; break; -#if HAS_SMART_DRIVERS +#if HAS_SMART_DRIVERS || SUPPORT_CAN_EXPANSION case 917: rslt = standstillCurrentPercent[drive]; break; |