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
2740cc64
Commit
2740cc64
authored
5 years ago
by
Clinton James
Committed by
Scott Lahteine
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add SD Release when no SD_DETECT_PIN exists (#13857)
parent
39ebca6b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Marlin/src/lcd/language/language_en.h
+6
-0
6 additions, 0 deletions
Marlin/src/lcd/language/language_en.h
Marlin/src/lcd/menu/menu_main.cpp
+24
-12
24 additions, 12 deletions
Marlin/src/lcd/menu/menu_main.cpp
with
30 additions
and
12 deletions
Marlin/src/lcd/language/language_en.h
+
6
−
0
View file @
2740cc64
...
@@ -67,6 +67,9 @@
...
@@ -67,6 +67,9 @@
#ifndef MSG_SD_REMOVED
#ifndef MSG_SD_REMOVED
#define MSG_SD_REMOVED _UxGT("Card removed")
#define MSG_SD_REMOVED _UxGT("Card removed")
#endif
#endif
#ifndef MSG_SD_RELEASED
#define MSG_SD_RELEASED _UxGT("Card released")
#endif
#ifndef MSG_LCD_ENDSTOPS
#ifndef MSG_LCD_ENDSTOPS
#define MSG_LCD_ENDSTOPS _UxGT("Endstops") // Max length 8 characters
#define MSG_LCD_ENDSTOPS _UxGT("Endstops") // Max length 8 characters
#endif
#endif
...
@@ -879,6 +882,9 @@
...
@@ -879,6 +882,9 @@
#ifndef MSG_CHANGE_SDCARD
#ifndef MSG_CHANGE_SDCARD
#define MSG_CHANGE_SDCARD _UxGT("Change SD card")
#define MSG_CHANGE_SDCARD _UxGT("Change SD card")
#endif
#endif
#ifndef MSG_RELEASE_SDCARD
#define MSG_RELEASE_SDCARD _UxGT("Release SD card")
#endif
#ifndef MSG_ZPROBE_OUT
#ifndef MSG_ZPROBE_OUT
#define MSG_ZPROBE_OUT _UxGT("Z Probe past bed")
#define MSG_ZPROBE_OUT _UxGT("Z Probe past bed")
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
Marlin/src/lcd/menu/menu_main.cpp
+
24
−
12
View file @
2740cc64
...
@@ -178,16 +178,22 @@ void menu_main() {
...
@@ -178,16 +178,22 @@ void menu_main() {
if
(
card_detected
)
{
if
(
card_detected
)
{
if
(
!
card_open
)
{
if
(
!
card_open
)
{
MENU_ITEM
(
submenu
,
MSG_CARD_MENU
,
menu_sdcard
);
MENU_ITEM
(
submenu
,
MSG_CARD_MENU
,
menu_sdcard
);
#if !PIN_EXISTS(SD_DETECT)
MENU_ITEM
(
gcode
,
MENU_ITEM
(
gcode
,
MSG_CHANGE_SDCARD
,
PSTR
(
"M21"
));
// SD-card changed by user
#if PIN_EXISTS(SD_DETECT)
#endif
MSG_CHANGE_SDCARD
,
PSTR
(
"M21"
)
#else
MSG_RELEASE_SDCARD
,
PSTR
(
"M22"
)
#endif
);
}
}
}
}
else
{
else
{
#if !PIN_EXISTS(SD_DETECT)
#if PIN_EXISTS(SD_DETECT)
MENU_ITEM
(
gcode
,
MSG_INIT_SDCARD
,
PSTR
(
"M21"
));
// Manually init SD-card
MENU_ITEM
(
function
,
MSG_NO_CARD
,
NULL
);
#else
MENU_ITEM
(
gcode
,
MSG_INIT_SDCARD
,
PSTR
(
"M21"
));
MENU_ITEM
(
function
,
MSG_SD_RELEASED
,
NULL
);
#endif
#endif
MENU_ITEM
(
function
,
MSG_NO_CARD
,
NULL
);
}
}
#endif // !HAS_ENCODER_WHEEL && SDSUPPORT
#endif // !HAS_ENCODER_WHEEL && SDSUPPORT
...
@@ -259,16 +265,22 @@ void menu_main() {
...
@@ -259,16 +265,22 @@ void menu_main() {
if
(
card_detected
)
{
if
(
card_detected
)
{
if
(
!
card_open
)
{
if
(
!
card_open
)
{
MENU_ITEM
(
submenu
,
MSG_CARD_MENU
,
menu_sdcard
);
MENU_ITEM
(
submenu
,
MSG_CARD_MENU
,
menu_sdcard
);
#if !PIN_EXISTS(SD_DETECT)
MENU_ITEM
(
gcode
,
MENU_ITEM
(
gcode
,
MSG_CHANGE_SDCARD
,
PSTR
(
"M21"
));
// SD-card changed by user
#if PIN_EXISTS(SD_DETECT)
#endif
MSG_CHANGE_SDCARD
,
PSTR
(
"M21"
)
#else
MSG_RELEASE_SDCARD
,
PSTR
(
"M22"
)
#endif
);
}
}
}
}
else
{
else
{
#if !PIN_EXISTS(SD_DETECT)
#if PIN_EXISTS(SD_DETECT)
MENU_ITEM
(
gcode
,
MSG_INIT_SDCARD
,
PSTR
(
"M21"
));
// Manually init SD-card
MENU_ITEM
(
function
,
MSG_NO_CARD
,
NULL
);
#elif
MENU_ITEM
(
gcode
,
MSG_INIT_SDCARD
,
PSTR
(
"M21"
));
MENU_ITEM
(
function
,
MSG_SD_RELEASED
,
NULL
);
#endif
#endif
MENU_ITEM
(
function
,
MSG_NO_CARD
,
NULL
);
}
}
#endif // HAS_ENCODER_WHEEL && SDSUPPORT
#endif // HAS_ENCODER_WHEEL && SDSUPPORT
...
...
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