diff --git a/src/config/config.h b/src/config/config.h index 85ca0b3..91a3e89 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -82,11 +82,6 @@ static constexpr U_mm findaTriggerDistance = 4.5_mm; /// 9.0_mm /// FINDA trigge static constexpr U_mm cuttingEdgeToFindaMidpoint = 22.85_mm; /// Cutting edge to Midpoint of FINDA should be 22.85_mm. static constexpr U_mm findaToCoupler = 12.0_mm; /// 12.0_mm /// FINDA Coupler side to coupler screw. static constexpr U_mm couplerToBowden = 3.5_mm; /// 3.5_mm /// FINDA Coupler screw to bowden mmu2s side (in coupling). - -// @@TODO this is very tricky - the same MMU, same PTFE, -// just another piece of PLA (probably having more resistance in the tubes) -// and we are at least 40mm off! It looks like this really depends on the exact position -// We'll probably need to check for stallguard while pushing the filament to avoid ginding the filament static constexpr U_mm defaultBowdenLength = 427.0_mm; /// ~427.0_mm /// Default Bowden length. static constexpr U_mm minimumBowdenLength = 341.0_mm; /// ~341.0_mm /// Minimum bowden length. static constexpr U_mm maximumBowdenLength = 792.0_mm; /// ~792.0_mm /// Maximum bowden length. diff --git a/src/logic/feed_to_bondtech.cpp b/src/logic/feed_to_bondtech.cpp index c6c1410..15f3b49 100644 --- a/src/logic/feed_to_bondtech.cpp +++ b/src/logic/feed_to_bondtech.cpp @@ -63,14 +63,14 @@ bool FeedToBondtech::Step() { state = PushingFilamentFast; mpu::pulley.InitAxis(); // plan a fast move while in the safe minimal length - feedStart_mm = mm::stepsToUnit(mm::P_pos_t({ mm::motion.CurPosition(mm::Pulley) })); + feedStart_mm = mm::motion.CurPosition(mm::Pulley); // fast feed in millimeters - if the EEPROM value is incorrect, we'll get the default length unit::U_mm fastFeedDistance = { (long double)mps::BowdenLength::Get(mg::globals.ActiveSlot()) }; - mpu::pulley.PlanMove(config::minimumBowdenLength, + mpu::pulley.PlanMove(fastFeedDistance, mg::globals.PulleyLoadFeedrate_mm_s(), mg::globals.PulleySlowFeedrate_mm_s()); // plan additional slow move while waiting for fsensor to trigger - mpu::pulley.PlanMove(config::maximumBowdenLength - config::minimumBowdenLength, + mpu::pulley.PlanMove(config::maximumBowdenLength - fastFeedDistance, mg::globals.PulleySlowFeedrate_mm_s(), mg::globals.PulleySlowFeedrate_mm_s()); } @@ -122,7 +122,7 @@ bool FeedToBondtech::Step() { dbg_logic_fP(PSTR("Pulley end steps %u"), mpu::pulley.CurrentPosition_mm()); state = OK; mpu::pulley.Disable(); - UpdateBowdenLength(mm::stepsToUnit(mm::P_pos_t({ mm::motion.CurPosition(mm::Pulley) }))); + UpdateBowdenLength(mm::motion.CurPosition(mm::Pulley)); mm::motion.Disable(mm::Pulley); ml::leds.SetMode(mg::globals.ActiveSlot(), ml::green, ml::on); }