Browse Source

Output a message for SD read errors

Scott Lahteine 9 years ago
parent
commit
400e13d136
2 changed files with 5 additions and 0 deletions
  1. 4
    0
      Marlin/Marlin_main.cpp
  2. 1
    0
      Marlin/language.h

+ 4
- 0
Marlin/Marlin_main.cpp View File

1140
           card.printingHasFinished();
1140
           card.printingHasFinished();
1141
           card.checkautostart(true);
1141
           card.checkautostart(true);
1142
         }
1142
         }
1143
+        else if (n == -1) {
1144
+          SERIAL_ERROR_START;
1145
+          SERIAL_ECHOLNPGM(MSG_SD_ERR_READ);
1146
+        }
1143
         if (sd_char == '#') stop_buffering = true;
1147
         if (sd_char == '#') stop_buffering = true;
1144
 
1148
 
1145
         sd_comment_mode = false; //for new command
1149
         sd_comment_mode = false; //for new command

+ 1
- 0
Marlin/language.h View File

171
 #define MSG_SD_PRINTING_BYTE                "SD printing byte "
171
 #define MSG_SD_PRINTING_BYTE                "SD printing byte "
172
 #define MSG_SD_NOT_PRINTING                 "Not SD printing"
172
 #define MSG_SD_NOT_PRINTING                 "Not SD printing"
173
 #define MSG_SD_ERR_WRITE_TO_FILE            "error writing to file"
173
 #define MSG_SD_ERR_WRITE_TO_FILE            "error writing to file"
174
+#define MSG_SD_ERR_READ                     "SD read error"
174
 #define MSG_SD_CANT_ENTER_SUBDIR            "Cannot enter subdir: "
175
 #define MSG_SD_CANT_ENTER_SUBDIR            "Cannot enter subdir: "
175
 
176
 
176
 #define MSG_STEPPER_TOO_HIGH                "Steprate too high: "
177
 #define MSG_STEPPER_TOO_HIGH                "Steprate too high: "

Loading…
Cancel
Save