Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2022-08-30 15:28:17 +0300
committerDavid Crocker <dcrocker@eschertech.com>2022-08-30 15:28:17 +0300
commit5d0c6ce9ee169a9371d06ef1bbe73c678314a846 (patch)
treef42f2870cebab689c8a01891b1b33f816bfa94c5 /src
parent20f3d6cd93a4dbf22414a317f27f7463b69805cd (diff)
Fixes for M917 on MB6XD
Diffstat (limited to 'src')
-rw-r--r--src/Config/Pins_Duet3_MB6XD.h2
-rw-r--r--src/Platform/Platform.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/Config/Pins_Duet3_MB6XD.h b/src/Config/Pins_Duet3_MB6XD.h
index 6d597b01..c8a296e4 100644
--- a/src/Config/Pins_Duet3_MB6XD.h
+++ b/src/Config/Pins_Duet3_MB6XD.h
@@ -113,6 +113,8 @@ constexpr GpioPinFunction StepGatePinFunction = GpioPinFunction::C; // TIOB11
#define STEP_GATE_TC_ID (ID_TC11) // ID for peripheral clock and interrupt
#define STEP_GATE_TC_CHAN (2)
+constexpr uint32_t DefaultStandstillCurrentPercent = 71; // needed to support expansion boards
+
// Thermistor/PT1000 inputs
constexpr Pin TEMP_SENSE_PINS[NumThermistorInputs] = { PortCPin(15), PortCPin(29), PortCPin(0), PortCPin(31) }; // Thermistor/PT1000 pins
constexpr Pin VssaSensePin = PortCPin(13);
diff --git a/src/Platform/Platform.cpp b/src/Platform/Platform.cpp
index e0331947..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
@@ -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;