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
3460f29a
Commit
3460f29a
authored
9 years ago
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cardereader lcdstatus
parent
2df6d691
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
cardreader.cpp
MarlinKimbra/cardreader.cpp
+3
-2
cardreader.h
MarlinKimbra/cardreader.h
+1
-1
No files found.
MarlinKimbra/cardreader.cpp
View file @
3460f29a
...
...
@@ -264,7 +264,7 @@ void CardReader::getAbsFilename(char *t) {
t
[
0
]
=
0
;
}
void
CardReader
::
openFile
(
char
*
name
,
bool
read
,
bool
replace_current
/*=true*/
)
{
void
CardReader
::
openFile
(
char
*
name
,
bool
read
,
bool
replace_current
/*=true*/
,
bool
lcd_status
/*=true*/
)
{
if
(
!
cardOK
)
return
;
if
(
file
.
isOpen
())
{
//replacing current file by new file, or subfile call
if
(
!
replace_current
)
{
...
...
@@ -342,7 +342,7 @@ void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/)
ECHO_EM
(
MSG_SD_FILE_SELECTED
);
getfilename
(
0
,
fname
);
lcd_setstatus
(
longFilename
[
0
]
?
longFilename
:
fname
);
if
(
lcd_status
)
lcd_setstatus
(
longFilename
[
0
]
?
longFilename
:
fname
);
}
else
{
ECHO_MV
(
MSG_SD_OPEN_FILE_FAIL
,
fname
);
...
...
@@ -353,6 +353,7 @@ void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/)
if
(
!
file
.
open
(
curDir
,
fname
,
O_CREAT
|
O_APPEND
|
O_WRITE
|
O_TRUNC
))
{
ECHO_MV
(
MSG_SD_OPEN_FILE_FAIL
,
fname
);
ECHO_PGM
(
".
\n
"
);
if
(
lcd_status
)
lcd_setstatus
(
fname
);
}
else
{
saving
=
true
;
...
...
This diff is collapsed.
Click to expand it.
MarlinKimbra/cardreader.h
View file @
3460f29a
...
...
@@ -18,7 +18,7 @@ public:
//this is to delay autostart and hence the initialisaiton of the sd card to some seconds after the normal init, so the device is available quick after a reset
void
checkautostart
(
bool
x
);
void
openFile
(
char
*
name
,
bool
read
,
bool
replace_current
=
true
);
void
openFile
(
char
*
name
,
bool
read
,
bool
replace_current
=
true
,
bool
lcd_status
=
true
);
void
openLogFile
(
char
*
name
);
void
removeFile
(
char
*
name
);
void
closeFile
(
bool
store_location
=
false
);
...
...
This diff is collapsed.
Click to expand it.
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