Browse Source

Followup to AUTO_REPORT_SD_STATUS

Followup to #9832
pull/1/head
Scott Lahteine 6 years ago
parent
commit
b198b49d15
  1. 5
      Marlin/Configuration_adv.h
  2. 2
      Marlin/src/gcode/gcode.h
  3. 26
      Marlin/src/gcode/sdcard/M20-M30_M32-M34_M928.cpp

5
Marlin/Configuration_adv.h

@ -1410,6 +1410,11 @@
*/
#define AUTO_REPORT_TEMPERATURES
/**
* Auto-report SdCard status with M27 S<seconds>
*/
//#define AUTO_REPORT_SD_STATUS
/**
* Include capabilities in M115 output
*/

2
Marlin/src/gcode/gcode.h

@ -85,7 +85,7 @@
* M24 - Start/resume SD print. (Requires SDSUPPORT)
* M25 - Pause SD print. (Requires SDSUPPORT)
* M26 - Set SD position in bytes: "M26 S12345". (Requires SDSUPPORT)
* M27 - Report SD print status. (Requires SDSUPPORT) With 'S<seconds>' sets the SD status auto-report interval. (Requires AUTO_REPORT_SD_STATUS)
* M27 - Report SD print status. (Requires SDSUPPORT) Or, with 'S<seconds>' set the SD status auto-report interval. (Requires AUTO_REPORT_SD_STATUS)
* M28 - Start SD write: "M28 /path/file.gco". (Requires SDSUPPORT)
* M29 - Stop SD write. (Requires SDSUPPORT)
* M30 - Delete file from SD: "M30 /path/file.gco"

26
Marlin/src/gcode/sdcard/M20-M30_M32-M34_M928.cpp

@ -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
);
}
/**

Loading…
Cancel
Save