Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
marlin-anet-a8
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
1475fd31
Unverified
Commit
1475fd31
authored
5 years ago
by
chestwood96
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
M600 R<resume temperature> (#17919)
Co-authored-by:
Scott Lahteine
<
github@thinkyhead.com
>
parent
4680aa65
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Marlin/src/feature/pause.cpp
+23
-11
23 additions, 11 deletions
Marlin/src/feature/pause.cpp
Marlin/src/feature/pause.h
+1
-1
1 addition, 1 deletion
Marlin/src/feature/pause.h
Marlin/src/gcode/feature/pause/M600.cpp
+3
-1
3 additions, 1 deletion
Marlin/src/gcode/feature/pause/M600.cpp
with
27 additions
and
13 deletions
Marlin/src/feature/pause.cpp
+
23
−
11
View file @
1475fd31
...
@@ -84,26 +84,30 @@ fil_change_settings_t fc_settings[EXTRUDERS];
...
@@ -84,26 +84,30 @@ fil_change_settings_t fc_settings[EXTRUDERS];
#endif
#endif
#if HAS_BUZZER
#if HAS_BUZZER
static
void
filament_change
_beep
(
const
int8_t
max_beep_count
,
const
bool
ini
t
=
false
)
{
static
void
impatient
_beep
(
const
int8_t
max_beep_count
,
const
bool
restar
t
=
false
)
{
if
(
TERN0
(
HAS_LCD_MENU
,
pause_mode
==
PAUSE_MODE_PAUSE_PRINT
))
return
;
if
(
TERN0
(
HAS_LCD_MENU
,
pause_mode
==
PAUSE_MODE_PAUSE_PRINT
))
return
;
static
millis_t
next_buzz
=
0
;
static
millis_t
next_buzz
=
0
;
static
int8_t
runout_beep
=
0
;
static
int8_t
runout_beep
=
0
;
if
(
init
)
next_buzz
=
runout_beep
=
0
;
if
(
restart
)
next_buzz
=
runout_beep
=
0
;
const
bool
always
=
max_beep_count
<
0
;
const
millis_t
ms
=
millis
();
const
millis_t
ms
=
millis
();
if
(
ELAPSED
(
ms
,
next_buzz
))
{
if
(
ELAPSED
(
ms
,
next_buzz
))
{
if
(
max_beep_count
<
0
||
runout_beep
<
max_beep_count
+
5
)
{
// Only beep as long as we're supposed to
if
(
always
||
runout_beep
<
max_beep_count
+
5
)
{
// Only beep as long as we're supposed to
next_buzz
=
ms
+
((
max_beep_count
<
0
||
runout_beep
<
max_beep_count
)
?
1000
:
500
);
next_buzz
=
ms
+
((
always
||
runout_beep
<
max_beep_count
)
?
1000
:
500
);
BUZZ
(
50
,
880
-
(
runout_beep
&
1
)
*
220
);
BUZZ
(
50
,
880
-
(
runout_beep
&
1
)
*
220
);
runout_beep
++
;
runout_beep
++
;
}
}
}
}
}
}
inline
void
first_impatient_beep
(
const
int8_t
max_beep_count
)
{
impatient_beep
(
max_beep_count
,
true
);
}
#else
#else
inline
void
filament_change_beep
(
const
int8_t
,
const
bool
=
false
)
{}
inline
void
impatient_beep
(
const
int8_t
,
const
bool
=
false
)
{}
inline
void
first_impatient_beep
(
const
int8_t
)
{}
#endif
#endif
/**
/**
...
@@ -165,7 +169,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
...
@@ -165,7 +169,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
#endif
#endif
SERIAL_ECHO_MSG
(
_PMSG
(
STR_FILAMENT_CHANGE_INSERT
));
SERIAL_ECHO_MSG
(
_PMSG
(
STR_FILAMENT_CHANGE_INSERT
));
fi
lament_change
_beep
(
max_beep_count
,
true
);
fi
rst_impatient
_beep
(
max_beep_count
);
KEEPALIVE_STATE
(
PAUSED_FOR_USER
);
KEEPALIVE_STATE
(
PAUSED_FOR_USER
);
#if ENABLED(HOST_PROMPT_SUPPORT)
#if ENABLED(HOST_PROMPT_SUPPORT)
...
@@ -180,7 +184,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
...
@@ -180,7 +184,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
#endif
#endif
TERN_
(
EXTENSIBLE_UI
,
ExtUI
::
onUserConfirmRequired_P
(
PSTR
(
"Load Filament"
)));
TERN_
(
EXTENSIBLE_UI
,
ExtUI
::
onUserConfirmRequired_P
(
PSTR
(
"Load Filament"
)));
while
(
wait_for_user
)
{
while
(
wait_for_user
)
{
filament_change
_beep
(
max_beep_count
);
impatient
_beep
(
max_beep_count
);
idle_no_sleep
();
idle_no_sleep
();
}
}
}
}
...
@@ -448,7 +452,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
...
@@ -448,7 +452,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
show_continue_prompt
(
is_reload
);
show_continue_prompt
(
is_reload
);
fi
lament_change
_beep
(
max_beep_count
,
true
);
fi
rst_impatient
_beep
(
max_beep_count
);
// Start the heater idle timers
// Start the heater idle timers
const
millis_t
nozzle_timeout
=
SEC_TO_MS
(
PAUSE_PARK_NOZZLE_TIMEOUT
);
const
millis_t
nozzle_timeout
=
SEC_TO_MS
(
PAUSE_PARK_NOZZLE_TIMEOUT
);
...
@@ -468,7 +472,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
...
@@ -468,7 +472,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
TERN_
(
EXTENSIBLE_UI
,
ExtUI
::
onUserConfirmRequired_P
(
GET_TEXT
(
MSG_NOZZLE_PARKED
)));
TERN_
(
EXTENSIBLE_UI
,
ExtUI
::
onUserConfirmRequired_P
(
GET_TEXT
(
MSG_NOZZLE_PARKED
)));
wait_for_user
=
true
;
// LCD click or M108 will clear this
wait_for_user
=
true
;
// LCD click or M108 will clear this
while
(
wait_for_user
)
{
while
(
wait_for_user
)
{
filament_change
_beep
(
max_beep_count
);
impatient
_beep
(
max_beep_count
);
// If the nozzle has timed out...
// If the nozzle has timed out...
if
(
!
nozzle_timed_out
)
if
(
!
nozzle_timed_out
)
...
@@ -508,7 +512,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
...
@@ -508,7 +512,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
wait_for_user
=
true
;
wait_for_user
=
true
;
nozzle_timed_out
=
false
;
nozzle_timed_out
=
false
;
fi
lament_change
_beep
(
max_beep_count
,
true
);
fi
rst_impatient
_beep
(
max_beep_count
);
}
}
idle_no_sleep
();
idle_no_sleep
();
}
}
...
@@ -539,7 +543,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
...
@@ -539,7 +543,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
* - Send host action for resume, if configured
* - Send host action for resume, if configured
* - Resume the current SD print job, if any
* - Resume the current SD print job, if any
*/
*/
void
resume_print
(
const
float
&
slow_load_length
/*=0*/
,
const
float
&
fast_load_length
/*=0*/
,
const
float
&
purge_length
/*=ADVANCED_PAUSE_PURGE_LENGTH*/
,
const
int8_t
max_beep_count
/*=0*/
DXC_ARGS
)
{
void
resume_print
(
const
float
&
slow_load_length
/*=0*/
,
const
float
&
fast_load_length
/*=0*/
,
const
float
&
purge_length
/*=ADVANCED_PAUSE_PURGE_LENGTH*/
,
const
int8_t
max_beep_count
/*=0*/
,
int16_t
targetTemp
/*=0*/
DXC_ARGS
)
{
/*
/*
SERIAL_ECHOLNPAIR(
SERIAL_ECHOLNPAIR(
"start of resume_print()\ndual_x_carriage_mode:", dual_x_carriage_mode,
"start of resume_print()\ndual_x_carriage_mode:", dual_x_carriage_mode,
...
@@ -558,9 +562,17 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
...
@@ -558,9 +562,17 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
thermalManager
.
reset_hotend_idle_timer
(
e
);
thermalManager
.
reset_hotend_idle_timer
(
e
);
}
}
if
(
targetTemp
>
thermalManager
.
degTargetHotend
(
active_extruder
))
thermalManager
.
setTargetHotend
(
targetTemp
,
active_extruder
);
if
(
nozzle_timed_out
||
thermalManager
.
hotEnoughToExtrude
(
active_extruder
))
// Load the new filament
if
(
nozzle_timed_out
||
thermalManager
.
hotEnoughToExtrude
(
active_extruder
))
// Load the new filament
load_filament
(
slow_load_length
,
fast_load_length
,
purge_length
,
max_beep_count
,
true
,
nozzle_timed_out
,
PAUSE_MODE_SAME
DXC_PASS
);
load_filament
(
slow_load_length
,
fast_load_length
,
purge_length
,
max_beep_count
,
true
,
nozzle_timed_out
,
PAUSE_MODE_SAME
DXC_PASS
);
if
(
targetTemp
>
0
)
{
thermalManager
.
setTargetHotend
(
targetTemp
,
active_extruder
);
thermalManager
.
wait_for_hotend
(
active_extruder
,
false
);
}
TERN_
(
HAS_LCD_MENU
,
lcd_pause_show_message
(
PAUSE_MESSAGE_RESUME
));
TERN_
(
HAS_LCD_MENU
,
lcd_pause_show_message
(
PAUSE_MESSAGE_RESUME
));
// Retract to prevent oozing
// Retract to prevent oozing
...
...
This diff is collapsed.
Click to expand it.
Marlin/src/feature/pause.h
+
1
−
1
View file @
1475fd31
...
@@ -87,7 +87,7 @@ bool pause_print(const float &retract, const xyz_pos_t &park_point, const float
...
@@ -87,7 +87,7 @@ bool pause_print(const float &retract, const xyz_pos_t &park_point, const float
void
wait_for_confirmation
(
const
bool
is_reload
=
false
,
const
int8_t
max_beep_count
=
0
DXC_PARAMS
);
void
wait_for_confirmation
(
const
bool
is_reload
=
false
,
const
int8_t
max_beep_count
=
0
DXC_PARAMS
);
void
resume_print
(
const
float
&
slow_load_length
=
0
,
const
float
&
fast_load_length
=
0
,
const
float
&
extrude_length
=
ADVANCED_PAUSE_PURGE_LENGTH
,
const
int8_t
max_beep_count
=
0
DXC_PARAMS
);
void
resume_print
(
const
float
&
slow_load_length
=
0
,
const
float
&
fast_load_length
=
0
,
const
float
&
extrude_length
=
ADVANCED_PAUSE_PURGE_LENGTH
,
const
int8_t
max_beep_count
=
0
,
int16_t
targetTemp
=
0
DXC_PARAMS
);
bool
load_filament
(
const
float
&
slow_load_length
=
0
,
const
float
&
fast_load_length
=
0
,
const
float
&
extrude_length
=
0
,
const
int8_t
max_beep_count
=
0
,
const
bool
show_lcd
=
false
,
bool
load_filament
(
const
float
&
slow_load_length
=
0
,
const
float
&
fast_load_length
=
0
,
const
float
&
extrude_length
=
0
,
const
int8_t
max_beep_count
=
0
,
const
bool
show_lcd
=
false
,
const
bool
pause_for_user
=
false
,
const
PauseMode
mode
=
PAUSE_MODE_PAUSE_PRINT
DXC_PARAMS
);
const
bool
pause_for_user
=
false
,
const
PauseMode
mode
=
PAUSE_MODE_PAUSE_PRINT
DXC_PARAMS
);
...
...
This diff is collapsed.
Click to expand it.
Marlin/src/gcode/feature/pause/M600.cpp
+
3
−
1
View file @
1475fd31
...
@@ -56,6 +56,7 @@
...
@@ -56,6 +56,7 @@
* L[distance] - Extrude distance for insertion (manual reload)
* L[distance] - Extrude distance for insertion (manual reload)
* B[count] - Number of times to beep, -1 for indefinite (if equipped with a buzzer)
* B[count] - Number of times to beep, -1 for indefinite (if equipped with a buzzer)
* T[toolhead] - Select extruder for filament change
* T[toolhead] - Select extruder for filament change
* R[temp] - Resume temperature (in current units)
*
*
* Default values are used for omitted arguments.
* Default values are used for omitted arguments.
*/
*/
...
@@ -153,7 +154,8 @@ void GcodeSuite::M600() {
...
@@ -153,7 +154,8 @@ void GcodeSuite::M600() {
resume_print
(
slow_load_length
,
fast_load_length
,
0
,
beep_count
DXC_PASS
);
resume_print
(
slow_load_length
,
fast_load_length
,
0
,
beep_count
DXC_PASS
);
#else
#else
wait_for_confirmation
(
true
,
beep_count
DXC_PASS
);
wait_for_confirmation
(
true
,
beep_count
DXC_PASS
);
resume_print
(
slow_load_length
,
fast_load_length
,
ADVANCED_PAUSE_PURGE_LENGTH
,
beep_count
DXC_PASS
);
resume_print
(
slow_load_length
,
fast_load_length
,
ADVANCED_PAUSE_PURGE_LENGTH
,
beep_count
,
(
parser
.
seenval
(
'R'
)
?
parser
.
value_celsius
()
:
0
)
DXC_PASS
);
#endif
#endif
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment