Followup to serial reform

Reference #13250
This commit is contained in:
Scott Lahteine
2019-02-24 15:04:29 -06:00
parent 92a4984066
commit 64253e1a58
5 changed files with 10 additions and 51 deletions

View File

@@ -51,11 +51,7 @@
*/
void GcodeSuite::M20() {
SERIAL_ECHOLNPGM(MSG_BEGIN_FILE_LIST);
card.ls(
#if NUM_SERIAL > 1
command_queue_port[cmd_queue_index_r]
#endif
);
card.ls();
SERIAL_ECHOLNPGM(MSG_END_FILE_LIST);
}
@@ -160,10 +156,6 @@ void GcodeSuite::M26() {
* OR, with 'C' get the current filename.
*/
void GcodeSuite::M27() {
#if NUM_SERIAL > 1
const int16_t port = serial_port_index;
#endif
if (parser.seen('C')) {
SERIAL_ECHOPGM("Current file: ");
card.printFilename();
@@ -171,19 +163,11 @@ void GcodeSuite::M27() {
#if ENABLED(AUTO_REPORT_SD_STATUS)
else if (parser.seenval('S'))
card.set_auto_report_interval(parser.value_byte()
#if NUM_SERIAL > 1
, port
#endif
);
card.set_auto_report_interval(parser.value_byte());
#endif
else
card.report_status(
#if NUM_SERIAL > 1
port
#endif
);
card.report_status();
}
/**
@@ -281,11 +265,7 @@ void GcodeSuite::M32() {
* /Miscellaneous/Armchair/Armchair.gcode
*/
void GcodeSuite::M33() {
card.printLongPath(parser.string_arg
#if NUM_SERIAL > 1
, command_queue_port[cmd_queue_index_r]
#endif
);
card.printLongPath(parser.string_arg);
}
#endif // LONG_FILENAME_HOST_SUPPORT

View File

@@ -34,9 +34,6 @@
* M31: Get the time since the start of SD Print (or last M109)
*/
void GcodeSuite::M31() {
#if NUM_SERIAL > 1
const int16_t port = command_queue_port[cmd_queue_index_r];
#endif
char buffer[21];
duration_t elapsed = print_job_timer.duration();
elapsed.toString(buffer);

View File

@@ -35,17 +35,9 @@ void GcodeSuite::M105() {
const int8_t target_extruder = get_target_extruder_from_command();
if (target_extruder < 0) return;
#if NUM_SERIAL > 1
const int16_t port = command_queue_port[cmd_queue_index_r];
#endif
#if HAS_TEMP_SENSOR
SERIAL_ECHOPGM(MSG_OK);
thermalManager.print_heater_states(target_extruder
#if NUM_SERIAL > 1
, port
#endif
);
thermalManager.print_heater_states(target_extruder);
#else // !HAS_TEMP_SENSOR
SERIAL_ERROR_MSG(MSG_ERR_NO_THERMISTORS);
#endif