Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MarlinKimbra
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
MarlinKimbra
Commits
31f1256c
Commit
31f1256c
authored
Nov 20, 2015
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Nextion SD
parent
b78d629a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
38 deletions
+41
-38
Marlin_main.cpp
MarlinKimbra/Marlin_main.cpp
+24
-23
nextion_lcd.cpp
MarlinKimbra/nextion_lcd.cpp
+16
-14
pins.h
MarlinKimbra/pins.h
+1
-1
No files found.
MarlinKimbra/Marlin_main.cpp
View file @
31f1256c
...
...
@@ -118,6 +118,7 @@
* M3 - Put S<value> in laser beam control
* M4 - Turn on laser beam
* M5 - Turn off laser beam
* M11 - Start printer for pause mode
* M17 - Enable/Power all stepper motors
* M18 - Disable all stepper motors; same as M84
* M20 - List SD card
...
...
@@ -433,7 +434,7 @@ unsigned long printer_usage_seconds;
#if HAS(FILRUNOUT)
static
bool
filrunoutEnqueued
=
false
;
bool
filrunoutActive
=
false
;
bool
printing
=
false
;
#endif
#if ENABLED(SDSUPPORT)
...
...
@@ -4336,6 +4337,22 @@ inline void gcode_G92() {
}
#endif //LASERBEAM
#if HAS(FILRUNOUT)
/**
* M11: Start printing
*/
inline
void
gcode_M11
()
{
printing
=
true
;
filrunoutEnqueued
=
false
;
ECHO_LM
(
DB
,
"Start Printing, pause pin active."
);
ECHO_S
(
RESUME
);
ECHO_E
;
#if HAS(POWER_CONSUMPTION_SENSOR)
startpower
=
power_consumption_hour
;
#endif
}
#endif
/**
* M17: Enable power on all stepper motors
*/
...
...
@@ -6326,7 +6343,6 @@ inline void gcode_M503() {
* X[position] - Move to this X position, with Y
* Y[position] - Move to this Y position, with X
* L[distance] - Retract distance for removal (manual reload)
* S[0-1] - Deactivate Filament runout - Active Filament runout
*
* Default values are used for omitted arguments.
*
...
...
@@ -6338,26 +6354,6 @@ inline void gcode_M503() {
return
;
}
#if HAS(FILRUNOUT)
if
(
code_seen
(
'S'
))
{
if
(
code_value
()
==
1
)
{
filrunoutActive
=
true
;
filrunoutEnqueued
=
false
;
ECHO_LM
(
DB
,
"Filament runout activated."
);
ECHO_S
(
RESUME
);
ECHO_E
;
#if HAS(POWER_CONSUMPTION_SENSOR)
startpower
=
power_consumption_hour
;
#endif
}
else
{
filrunoutActive
=
false
;
filrunoutEnqueued
=
false
;
ECHO_LM
(
DB
,
"Filament runout deactivated."
);
}
return
;
}
#endif
float
lastpos
[
NUM_AXIS
],
fr60
=
feedrate
/
60
;
filament_changing
=
true
;
...
...
@@ -7123,6 +7119,11 @@ void process_next_command() {
gcode_M5
();
break
;
#endif //LASERBEAM
#if HAS(FILRUNOUT)
case
11
:
//M11 - Start printing
gcode_M11
();
break
;
#endif
case
17
:
//M17 - Enable/Power all stepper motors
gcode_M17
();
break
;
...
...
@@ -7978,7 +7979,7 @@ void idle(bool ignore_stepper_queue/*=false*/) {
void
manage_inactivity
(
bool
ignore_stepper_queue
/*=false*/
)
{
#if HAS(FILRUNOUT)
if
((
filrunoutActive
||
IS_SD_PRINTING
)
&&
(
READ
(
FILRUNOUT_PIN
)
^
FILRUNOUT_PIN_INVERTING
))
if
((
printing
||
IS_SD_PRINTING
)
&&
(
READ
(
FILRUNOUT_PIN
)
^
FILRUNOUT_PIN_INVERTING
))
filrunout
();
#endif
...
...
MarlinKimbra/nextion_lcd.cpp
View file @
31f1256c
...
...
@@ -455,22 +455,24 @@
enqueuecommands_P
(
PSTR
(
"G90"
));
}
void
PlayPausePopCallback
(
void
*
ptr
)
{
if
(
card
.
cardOK
&&
card
.
isFileOpen
())
{
if
(
card
.
sdprinting
)
card
.
pauseSDPrint
();
else
card
.
startFileprint
();
#if ENABLED(SDSUPPORT)
void
PlayPausePopCallback
(
void
*
ptr
)
{
if
(
card
.
cardOK
&&
card
.
isFileOpen
())
{
if
(
card
.
sdprinting
)
card
.
pauseSDPrint
();
else
card
.
startFileprint
();
}
}
}
void
StopPopCallback
(
void
*
ptr
)
{
quickStop
();
card
.
sdprinting
=
false
;
card
.
closeFile
();
autotempShutdown
();
lcd_setstatus
(
MSG_PRINT_ABORTED
,
true
);
}
void
StopPopCallback
(
void
*
ptr
)
{
quickStop
();
card
.
sdprinting
=
false
;
card
.
closeFile
();
autotempShutdown
();
lcd_setstatus
(
MSG_PRINT_ABORTED
,
true
);
}
#endif
void
lcd_init
()
{
delay
(
1000
);
...
...
MarlinKimbra/pins.h
View file @
31f1256c
...
...
@@ -24,7 +24,7 @@
*302 BOARD_MINIRAMBO - Mini Rambo
*
* 4 BOARD_DUEMILANOVE_328P - Duemilanove w/ ATMega328P pin assignment
* 40 BOARD_MKS_BASE Arduino Mega2560 with RAMPS v1.4 pin assignments
* 40 BOARD_MKS_BASE
–
Arduino Mega2560 with RAMPS v1.4 pin assignments
*401 BOARD_RADDS - Radds Arduino DUE
*403 BOARD_RAMPS_FD_V1 - Ramps FD version 1
*404 BOARD_RAMPS_FD_V2 - Ramps FD version 2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment