PFW-1386 Implement 'L' parameter for M701
It is only used when the MMU is disabled. With the MMU we use a defined ramming sequence. When the MMU is disabled I borrowed the usages from Marlin 2. The L parameter only defines the length for the "fast" load length. Default value is 70mm, same as M600
This commit is contained in:
parent
94dd4aec73
commit
7e9166976f
|
|
@ -464,7 +464,7 @@ void gcode_M114();
|
||||||
#if (defined(FANCHECK) && (((defined(TACH_0) && (TACH_0 >-1)) || (defined(TACH_1) && (TACH_1 > -1)))))
|
#if (defined(FANCHECK) && (((defined(TACH_0) && (TACH_0 >-1)) || (defined(TACH_1) && (TACH_1 > -1)))))
|
||||||
void gcode_M123();
|
void gcode_M123();
|
||||||
#endif //FANCHECK and TACH_0 and TACH_1
|
#endif //FANCHECK and TACH_0 and TACH_1
|
||||||
void gcode_M701(uint8_t mmuSlotIndex);
|
void gcode_M701(float fastLoadLength, uint8_t mmuSlotIndex);
|
||||||
|
|
||||||
#define UVLO !(PINE & (1<<4))
|
#define UVLO !(PINE & (1<<4))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3668,7 +3668,7 @@ static void gcode_M600(bool automatic, float x_position, float y_position, float
|
||||||
custom_message_type = CustomMsg::Status;
|
custom_message_type = CustomMsg::Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gcode_M701(uint8_t mmuSlotIndex){
|
void gcode_M701(float fastLoadLength, uint8_t mmuSlotIndex){
|
||||||
printf_P(PSTR("gcode_M701 begin\n"));
|
printf_P(PSTR("gcode_M701 begin\n"));
|
||||||
|
|
||||||
FSensorBlockRunout fsBlockRunout;
|
FSensorBlockRunout fsBlockRunout;
|
||||||
|
|
@ -3684,10 +3684,10 @@ void gcode_M701(uint8_t mmuSlotIndex){
|
||||||
const int feed_mm_before_raising = 30;
|
const int feed_mm_before_raising = 30;
|
||||||
static_assert(feed_mm_before_raising <= FILAMENTCHANGE_FIRSTFEED);
|
static_assert(feed_mm_before_raising <= FILAMENTCHANGE_FIRSTFEED);
|
||||||
|
|
||||||
lcd_setstatuspgm(_T(MSG_LOADING_FILAMENT));
|
lcd_setstatuspgm(_T(MSG_LOADING_FILAMENT));
|
||||||
current_position[E_AXIS] += FILAMENTCHANGE_FIRSTFEED - feed_mm_before_raising;
|
current_position[E_AXIS] += FILAMENTCHANGE_FIRSTFEED - feed_mm_before_raising;
|
||||||
plan_buffer_line_curposXYZE(FILAMENTCHANGE_EFEED_FIRST); //fast sequence
|
plan_buffer_line_curposXYZE(FILAMENTCHANGE_EFEED_FIRST); //fast sequence
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
|
|
||||||
raise_z_above(MIN_Z_FOR_LOAD, false);
|
raise_z_above(MIN_Z_FOR_LOAD, false);
|
||||||
current_position[E_AXIS] += feed_mm_before_raising;
|
current_position[E_AXIS] += feed_mm_before_raising;
|
||||||
|
|
@ -8586,6 +8586,7 @@ Sigma_Exit:
|
||||||
case 701:
|
case 701:
|
||||||
{
|
{
|
||||||
uint8_t mmuSlotIndex = 0xffU;
|
uint8_t mmuSlotIndex = 0xffU;
|
||||||
|
float fastLoadLength = FILAMENTCHANGE_FIRSTFEED; // Only used without MMU
|
||||||
if( MMU2::mmu2.Enabled() )
|
if( MMU2::mmu2.Enabled() )
|
||||||
{
|
{
|
||||||
if( code_seen('P') || code_seen('T') ) {
|
if( code_seen('P') || code_seen('T') ) {
|
||||||
|
|
@ -8593,7 +8594,10 @@ Sigma_Exit:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Implement L parameter
|
if (code_seen('L'))
|
||||||
|
{
|
||||||
|
fastLoadLength = code_value();
|
||||||
|
}
|
||||||
|
|
||||||
enable_z();
|
enable_z();
|
||||||
if (code_seen('Z'))
|
if (code_seen('Z'))
|
||||||
|
|
@ -8605,7 +8609,7 @@ Sigma_Exit:
|
||||||
}
|
}
|
||||||
disable_z();
|
disable_z();
|
||||||
|
|
||||||
gcode_M701(mmuSlotIndex);
|
gcode_M701(fastLoadLength, mmuSlotIndex);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3958,7 +3958,7 @@ static void lcd_wizard_load() {
|
||||||
lcd_clear();
|
lcd_clear();
|
||||||
lcd_puts_at_P(0, 2, _T(MSG_LOADING_FILAMENT));
|
lcd_puts_at_P(0, 2, _T(MSG_LOADING_FILAMENT));
|
||||||
loading_flag = true;
|
loading_flag = true;
|
||||||
gcode_M701(0);
|
gcode_M701(FILAMENTCHANGE_FIRSTFEED, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool lcd_autoDepleteEnabled()
|
bool lcd_autoDepleteEnabled()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue