Set real slot positions for the Idler and Selector
Extracted from the previous FW, may need some tuning based on units selected for each of these axes (degrees, millimeters) - waiting for an update of the motion implementation. Updated starting conditions of the unit tests to reflect the global configuration. MMU-58pull/77/head
parent
ef96d998a3
commit
16dc129b49
|
|
@ -8,6 +8,7 @@ namespace config {
|
||||||
static constexpr const uint8_t toolCount = 5U; ///< Max number of extruders/tools/slots
|
static constexpr const uint8_t toolCount = 5U; ///< Max number of extruders/tools/slots
|
||||||
|
|
||||||
// Idler's setup
|
// Idler's setup
|
||||||
|
/*
|
||||||
static constexpr U_deg idlerSlotPositions[toolCount + 1] = {
|
static constexpr U_deg idlerSlotPositions[toolCount + 1] = {
|
||||||
1.0_deg, 2.0_deg, 3.0_deg, 4.0_deg, 5.0_deg, 0
|
1.0_deg, 2.0_deg, 3.0_deg, 4.0_deg, 5.0_deg, 0
|
||||||
}; ///< slots 0-4 are the real ones, the 5th is the idle position
|
}; ///< slots 0-4 are the real ones, the 5th is the idle position
|
||||||
|
|
@ -16,6 +17,33 @@ static constexpr U_deg idlerSlotPositions[toolCount + 1] = {
|
||||||
static constexpr U_mm selectorSlotPositions[toolCount + 1] = {
|
static constexpr U_mm selectorSlotPositions[toolCount + 1] = {
|
||||||
1.0_mm, 2.0_mm, 3.0_mm, 4.0_mm, 5.0_mm, 6.0_mm
|
1.0_mm, 2.0_mm, 3.0_mm, 4.0_mm, 5.0_mm, 6.0_mm
|
||||||
}; ///< slots 0-4 are the real ones, the 5th is the farthest parking positions
|
}; ///< slots 0-4 are the real ones, the 5th is the farthest parking positions
|
||||||
|
*/
|
||||||
|
/// Idler steps between neighbor positions: 2 msteps = 180 / 4
|
||||||
|
static constexpr uint16_t idlerSteps = 1420 / 4;
|
||||||
|
|
||||||
|
/// Absolute positions for Idler's slots: 0-4 are the real ones, the 5th index is the idle position
|
||||||
|
static constexpr uint16_t idlerSlotPositions[toolCount + 1] = {
|
||||||
|
idlerSteps,
|
||||||
|
idlerSteps * 2,
|
||||||
|
idlerSteps * 3,
|
||||||
|
idlerSteps * 4,
|
||||||
|
idlerSteps * 5,
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
|
// Selector's setup
|
||||||
|
|
||||||
|
/// Selector steps between neighbor positions
|
||||||
|
static constexpr uint16_t selectorSteps = 2790 / 4;
|
||||||
|
/// slots 0-4 are the real ones, the 5th is the farthest parking positions
|
||||||
|
static constexpr uint16_t selectorSlotPositions[toolCount + 1] = {
|
||||||
|
selectorSteps,
|
||||||
|
selectorSteps * 2,
|
||||||
|
selectorSteps * 3,
|
||||||
|
selectorSteps * 4,
|
||||||
|
selectorSteps * 5,
|
||||||
|
selectorSteps * 6
|
||||||
|
};
|
||||||
|
|
||||||
// Printer's filament sensor setup
|
// Printer's filament sensor setup
|
||||||
static constexpr const uint16_t fsensorDebounceMs = 10;
|
static constexpr const uint16_t fsensorDebounceMs = 10;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
#include "motion.h"
|
#include "motion.h"
|
||||||
|
#include "idler.h"
|
||||||
#include "stub_motion.h"
|
#include "stub_motion.h"
|
||||||
|
|
||||||
|
namespace mi = modules::idler;
|
||||||
|
|
||||||
namespace modules {
|
namespace modules {
|
||||||
namespace motion {
|
namespace motion {
|
||||||
|
|
||||||
|
|
@ -75,8 +78,10 @@ void ReinitMotion() {
|
||||||
|
|
||||||
// reset the simulation data to defaults
|
// reset the simulation data to defaults
|
||||||
axes[0] = AxisSim({ 0, 0, false, false, false }); // pulley
|
axes[0] = AxisSim({ 0, 0, false, false, false }); // pulley
|
||||||
axes[1] = AxisSim({ selector_pos, selector_pos, false, false, false }); // selector //@@TODO proper selector positions once defined
|
// axes[1] = AxisSim({ selector_pos, selector_pos, false, false, false }); // selector //@@TODO proper selector positions once defined
|
||||||
axes[2] = AxisSim({ 0, 0, false, false, false }); // idler
|
// axes[2] = AxisSim({ 0, 0, false, false, false }); // idler
|
||||||
|
axes[1] = AxisSim({ config::selectorSlotPositions[0], config::selectorSlotPositions[0], false, false, false }); // selector
|
||||||
|
axes[2] = AxisSim({ config::idlerSlotPositions[mi::Idler::IdleSlotIndex()], config::idlerSlotPositions[mi::Idler::IdleSlotIndex()], false, false, false }); // idler
|
||||||
}
|
}
|
||||||
|
|
||||||
/// probably higher-level operations knowing the semantic meaning of axes
|
/// probably higher-level operations knowing the semantic meaning of axes
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue