Add parentheses to SD macros
This commit is contained in:
@ -885,7 +885,7 @@ void ST7920_Lite_Status_Screen::update_progress(const bool forceUpdate) {
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
// Progress bar % comes from SD when actively printing
|
||||
if (IS_SD_PRINTING) progress_bar_percent = card.percentDone();
|
||||
if (IS_SD_PRINTING()) progress_bar_percent = card.percentDone();
|
||||
#endif
|
||||
|
||||
// Since the progress bar involves writing
|
||||
|
@ -433,7 +433,7 @@ namespace UI {
|
||||
}
|
||||
|
||||
bool isPrinting() {
|
||||
return (planner.movesplanned() || IS_SD_PRINTING ||
|
||||
return (planner.movesplanned() || IS_SD_PRINTING() ||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
(card.cardOK && card.isFileOpen())
|
||||
#else
|
||||
@ -444,7 +444,7 @@ namespace UI {
|
||||
|
||||
bool isMediaInserted() {
|
||||
#if ENABLED(SDSUPPORT)
|
||||
return IS_SD_INSERTED && card.cardOK;
|
||||
return IS_SD_INSERTED() && card.cardOK;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
@ -583,7 +583,7 @@ void lcd_init() {
|
||||
void lcd_update() {
|
||||
#if ENABLED(SDSUPPORT)
|
||||
static bool last_sd_status;
|
||||
const bool sd_status = IS_SD_INSERTED;
|
||||
const bool sd_status = IS_SD_INSERTED();
|
||||
if (sd_status != last_sd_status) {
|
||||
last_sd_status = sd_status;
|
||||
if (sd_status) {
|
||||
|
@ -509,7 +509,7 @@ millis_t next_lcd_update_ms;
|
||||
return click;
|
||||
}
|
||||
|
||||
inline bool printer_busy() { return planner.movesplanned() || IS_SD_PRINTING; }
|
||||
inline bool printer_busy() { return planner.movesplanned() || IS_SD_PRINTING(); }
|
||||
|
||||
void lcd_move_z();
|
||||
float move_menu_scale;
|
||||
@ -689,7 +689,7 @@ void lcd_status_screen() {
|
||||
|
||||
#if ENABLED(LCD_SET_PROGRESS_MANUALLY) && ENABLED(SDSUPPORT) && (ENABLED(LCD_PROGRESS_BAR) || ENABLED(DOGLCD))
|
||||
// Progress bar % comes from SD when actively printing
|
||||
if (IS_SD_PRINTING)
|
||||
if (IS_SD_PRINTING())
|
||||
progress_bar_percent = card.percentDone();
|
||||
#endif
|
||||
|
||||
@ -5462,7 +5462,7 @@ void lcd_update() {
|
||||
|
||||
#if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
|
||||
|
||||
const uint8_t sd_status = (uint8_t)IS_SD_INSERTED;
|
||||
const uint8_t sd_status = (uint8_t)IS_SD_INSERTED();
|
||||
if (sd_status != lcd_sd_status && lcd_detected()) {
|
||||
|
||||
uint8_t old_sd_status = lcd_sd_status; // prevent re-entry to this block!
|
||||
|
@ -571,7 +571,7 @@ FORCE_INLINE void _draw_bed_status(const bool blink) {
|
||||
FORCE_INLINE void _draw_print_progress() {
|
||||
const uint8_t percent = (
|
||||
#if ENABLED(SDSUPPORT)
|
||||
IS_SD_PRINTING ? card.percentDone() : 0
|
||||
IS_SD_PRINTING() ? card.percentDone() : 0
|
||||
#else
|
||||
progress_bar_percent
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user