Fix usage of CurrentPositionPulley_mm in debug macros

Rename to the correct Pulley::CurrentPosition_mm
pull/165/head
Yuri D'Elia 2022-05-10 15:46:38 +02:00 committed by DRracer
parent ff1a89d369
commit 6b4ba322bb
3 changed files with 7 additions and 7 deletions

View File

@ -33,7 +33,7 @@ bool FeedToBondtech::Step() {
case EngagingIdler:
if (mi::idler.Engaged()) {
dbg_logic_P(PSTR("Feed to Bondtech --> Idler engaged"));
dbg_logic_fP(PSTR("Pulley start steps %u"), mpu::pulley.CurrentPositionPulley_mm());
dbg_logic_fP(PSTR("Pulley start steps %u"), mpu::pulley.CurrentPosition_mm());
state = PushingFilamentToFSensor;
mpu::pulley.InitAxis();
mpu::pulley.PlanMove(config::defaultBowdenLength, config::pulleyLoadFeedrate, config::pulleySlowFeedrate);
@ -63,7 +63,7 @@ bool FeedToBondtech::Step() {
case DisengagingIdler:
if (!mi::idler.Engaged()) {
dbg_logic_P(PSTR("Feed to Bondtech --> Idler disengaged"));
dbg_logic_fP(PSTR("Pulley end steps %u"), mpu::pulley.CurrentPositionPulley_mm());
dbg_logic_fP(PSTR("Pulley end steps %u"), mpu::pulley.CurrentPosition_mm());
state = OK;
mpu::pulley.Disable();
ml::leds.SetMode(mg::globals.ActiveSlot(), ml::green, ml::on);

View File

@ -28,7 +28,7 @@ bool FeedToFinda::Step() {
case EngagingIdler:
if (mi::idler.Engaged() && ms::selector.Slot() == mg::globals.ActiveSlot()) {
dbg_logic_P(PSTR("Feed to Finda --> Idler engaged"));
dbg_logic_fP(PSTR("Pulley start steps %u"), mpu::pulley.CurrentPositionPulley_mm());
dbg_logic_fP(PSTR("Pulley start steps %u"), mpu::pulley.CurrentPosition_mm());
mpu::pulley.InitAxis();
// @@TODO this may never happen as load filament always assumes the filament is at least at the pulley
// if (mg::globals.FilamentLoaded() == mg::FilamentLoadState::NotLoaded) { // feed slowly filament to PTFE
@ -54,7 +54,7 @@ bool FeedToFinda::Step() {
// FINDA triggered - that means it works and detected the filament tip
mg::globals.SetFilamentLoaded(mg::globals.ActiveSlot(), mg::FilamentLoadState::InSelector);
dbg_logic_P(PSTR("Feed to Finda --> Idler disengaged"));
dbg_logic_fP(PSTR("Pulley end steps %u"), mpu::pulley.CurrentPositionPulley_mm());
dbg_logic_fP(PSTR("Pulley end steps %u"), mpu::pulley.CurrentPosition_mm());
state = OK;
return true; // return immediately to allow for a seamless planning of another move (like feeding to bondtech)
} else if (mm::motion.QueueEmpty()) { // all moves have been finished and FINDA didn't switch on
@ -70,7 +70,7 @@ bool FeedToFinda::Step() {
// FINDA triggered - that means it works and detected the filament tip
mg::globals.SetFilamentLoaded(mg::globals.ActiveSlot(), mg::FilamentLoadState::InSelector);
dbg_logic_P(PSTR("Feed to Finda --> Idler disengaged"));
dbg_logic_fP(PSTR("Pulley end steps %u"), mpu::pulley.CurrentPositionPulley_mm());
dbg_logic_fP(PSTR("Pulley end steps %u"), mpu::pulley.CurrentPosition_mm());
state = mui::userInput.AnyEvent() ? Stopped : OK;
mui::userInput.Clear();
return true; // return immediately to allow for a seamless planning of another move (like feeding to bondtech)

View File

@ -21,7 +21,7 @@ bool RetractFromFinda::Step() {
switch (state) {
case EngagingIdler:
if (mi::idler.Engaged()) {
dbg_logic_fP(PSTR("Pulley start steps %u"), mpu::pulley.CurrentPositionPulley_mm());
dbg_logic_fP(PSTR("Pulley start steps %u"), mpu::pulley.CurrentPosition_mm());
state = UnloadBackToPTFE;
mpu::pulley.PlanMove(-(config::cuttingEdgeToFindaMidpoint + config::cuttingEdgeRetract), config::pulleyUnloadFeedrate);
}
@ -32,7 +32,7 @@ bool RetractFromFinda::Step() {
if (!mf::finda.Pressed()) { // FINDA switched off correctly while the move was performed
state = OK;
mg::globals.SetFilamentLoaded(mg::globals.ActiveSlot(), mg::FilamentLoadState::AtPulley);
dbg_logic_fP(PSTR("Pulley end steps %u"), mpu::pulley.CurrentPositionPulley_mm());
dbg_logic_fP(PSTR("Pulley end steps %u"), mpu::pulley.CurrentPosition_mm());
ml::leds.SetMode(mg::globals.ActiveSlot(), ml::green, ml::off);
} else { // FINDA didn't switch off
state = Failed;