Followup to AUTO_REPORT_SD_STATUS

Followup to #9832
This commit is contained in:
Scott Lahteine
2018-03-07 00:13:25 -06:00
parent d7aed2fe4f
commit b198b49d15
3 changed files with 20 additions and 13 deletions

View File

@ -107,22 +107,24 @@ void GcodeSuite::M26() {
}
/**
* M27: Get SD Card status
* M27: Get SD Card status or set the SD status auto-report interval.
*/
void GcodeSuite::M27() {
card.getStatus(
#if NUM_SERIAL > 1
command_queue_port[cmd_queue_index_r]
#endif
);
#if ENABLED(AUTO_REPORT_SD_STATUS)
if (parser.seenval('S'))
card.set_auto_report_interval(parser.value_byte()
#if NUM_SERIAL > 1
, command_queue_port[cmd_queue_index_r]
#endif
);
if (parser.seenval('S')) {
card.set_auto_report_interval(parser.value_byte()
#if NUM_SERIAL > 1
, command_queue_port[cmd_queue_index_r]
#endif
);
}
else
#endif
card.getStatus(
#if NUM_SERIAL > 1
command_queue_port[cmd_queue_index_r]
#endif
);
}
/**