Bläddra i källkod

Fix sd_status comparison

Co-Authored-By: perkmeister <perkmeister@users.noreply.github.com>
Scott Lahteine 7 år sedan
förälder
incheckning
524cc392f4
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2
    2
      Marlin/src/lcd/ultralcd.cpp

+ 2
- 2
Marlin/src/lcd/ultralcd.cpp Visa fil

5123
 
5123
 
5124
   #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
5124
   #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
5125
 
5125
 
5126
-    const bool sd_status = IS_SD_INSERTED;
5126
+    const uint8_t sd_status = (uint8_t)IS_SD_INSERTED;
5127
     if (sd_status != lcd_sd_status && lcd_detected()) {
5127
     if (sd_status != lcd_sd_status && lcd_detected()) {
5128
 
5128
 
5129
-      bool old_sd_status = lcd_sd_status; // prevent re-entry to this block!
5129
+      uint8_t old_sd_status = lcd_sd_status; // prevent re-entry to this block!
5130
       lcd_sd_status = sd_status;
5130
       lcd_sd_status = sd_status;
5131
 
5131
 
5132
       if (sd_status) {
5132
       if (sd_status) {

Laddar…
Avbryt
Spara