Make CardReader class static (#12451)

* Make CardReader a static class
* Make CardReader flags into bitfields
This commit is contained in:
Scott Lahteine
2018-11-16 22:39:16 -06:00
committed by GitHub
parent 3e9ffaddb6
commit 66580f32c2
15 changed files with 281 additions and 190 deletions

View File

@ -58,7 +58,7 @@
void lcd_sdcard_stop() {
wait_for_heatup = wait_for_user = false;
card.abort_sd_printing = true;
card.flag.abort_sd_printing = true;
ui.setstatusPGM(PSTR(MSG_PRINT_ABORTED), -1);
ui.return_to_status();
}
@ -86,7 +86,7 @@ void menu_main() {
MENU_BACK(MSG_WATCH);
#if ENABLED(SDSUPPORT)
if (card.cardOK) {
if (card.flag.cardOK) {
if (card.isFileOpen()) {
if (IS_SD_PRINTING())
MENU_ITEM(function, MSG_PAUSE_PRINT, lcd_sdcard_pause);

View File

@ -125,7 +125,7 @@ void menu_sdcard() {
card.getfilename_sorted(nr);
if (card.filenameIsDir)
if (card.flag.filenameIsDir)
MENU_ITEM(sdfolder, MSG_CARD_MENU, card);
else
MENU_ITEM(sdfile, MSG_CARD_MENU, card);