Use serial shorthand
This commit is contained in:
parent
bb5c643dfb
commit
582458998f
@ -419,8 +419,7 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) {
|
|||||||
if (parked_or_ignoring) gcode.reset_stepper_timeout(ms);
|
if (parked_or_ignoring) gcode.reset_stepper_timeout(ms);
|
||||||
|
|
||||||
if (gcode.stepper_max_timed_out(ms)) {
|
if (gcode.stepper_max_timed_out(ms)) {
|
||||||
SERIAL_ERROR_START();
|
SERIAL_ERROR_MSG(STR_KILL_INACTIVE_TIME, parser.command_ptr);
|
||||||
SERIAL_ECHOLNPAIR(STR_KILL_INACTIVE_TIME, parser.command_ptr);
|
|
||||||
kill();
|
kill();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,8 +352,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG("Packet header(", packet.header.sync, "?) corrupt");
|
||||||
SERIAL_ECHOLNPAIR("Packet header(", packet.header.sync, "?) corrupt");
|
|
||||||
stream_state = StreamState::PACKET_RESEND;
|
stream_state = StreamState::PACKET_RESEND;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -387,8 +386,7 @@ public:
|
|||||||
stream_state = StreamState::PACKET_PROCESS;
|
stream_state = StreamState::PACKET_PROCESS;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG("Packet(", packet.header.sync, ") payload corrupt");
|
||||||
SERIAL_ECHOLNPAIR("Packet(", packet.header.sync, ") payload corrupt");
|
|
||||||
stream_state = StreamState::PACKET_RESEND;
|
stream_state = StreamState::PACKET_RESEND;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -406,8 +404,7 @@ public:
|
|||||||
if (packet_retries < MAX_RETRIES || MAX_RETRIES == 0) {
|
if (packet_retries < MAX_RETRIES || MAX_RETRIES == 0) {
|
||||||
packet_retries++;
|
packet_retries++;
|
||||||
stream_state = StreamState::PACKET_RESET;
|
stream_state = StreamState::PACKET_RESET;
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG("Resend request ", int(packet_retries));
|
||||||
SERIAL_ECHOLNPAIR("Resend request ", int(packet_retries));
|
|
||||||
SERIAL_ECHOLNPAIR("rs", sync);
|
SERIAL_ECHOLNPAIR("rs", sync);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -67,8 +67,7 @@ void CancelObject::uncancel_object(const int8_t obj) {
|
|||||||
|
|
||||||
void CancelObject::report() {
|
void CancelObject::report() {
|
||||||
if (active_object >= 0) {
|
if (active_object >= 0) {
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG("Active Object: ", int(active_object));
|
||||||
SERIAL_ECHOLNPAIR("Active Object: ", int(active_object));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canceled) {
|
if (canceled) {
|
||||||
|
@ -514,8 +514,7 @@ static void mmu2_not_responding() {
|
|||||||
extruder = index; // filament change is finished
|
extruder = index; // filament change is finished
|
||||||
active_extruder = 0;
|
active_extruder = 0;
|
||||||
ENABLE_AXIS_E0();
|
ENABLE_AXIS_E0();
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG(STR_ACTIVE_EXTRUDER, int(extruder));
|
||||||
SERIAL_ECHOLNPAIR(STR_ACTIVE_EXTRUDER, int(extruder));
|
|
||||||
}
|
}
|
||||||
ui.reset_status();
|
ui.reset_status();
|
||||||
}
|
}
|
||||||
@ -602,8 +601,7 @@ static void mmu2_not_responding() {
|
|||||||
active_extruder = 0;
|
active_extruder = 0;
|
||||||
|
|
||||||
ENABLE_AXIS_E0();
|
ENABLE_AXIS_E0();
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG(STR_ACTIVE_EXTRUDER, int(extruder));
|
||||||
SERIAL_ECHOLNPAIR(STR_ACTIVE_EXTRUDER, int(extruder));
|
|
||||||
|
|
||||||
ui.reset_status();
|
ui.reset_status();
|
||||||
}
|
}
|
||||||
@ -698,8 +696,7 @@ static void mmu2_not_responding() {
|
|||||||
extruder = index; //filament change is finished
|
extruder = index; //filament change is finished
|
||||||
active_extruder = 0;
|
active_extruder = 0;
|
||||||
ENABLE_AXIS_E0();
|
ENABLE_AXIS_E0();
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG(STR_ACTIVE_EXTRUDER, int(extruder));
|
||||||
SERIAL_ECHOLNPAIR(STR_ACTIVE_EXTRUDER, int(extruder));
|
|
||||||
ui.reset_status();
|
ui.reset_status();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,8 +142,7 @@ void GcodeSuite::G29() {
|
|||||||
if (parser.seenval('I')) {
|
if (parser.seenval('I')) {
|
||||||
ix = parser.value_int();
|
ix = parser.value_int();
|
||||||
if (!WITHIN(ix, 0, GRID_MAX_POINTS_X - 1)) {
|
if (!WITHIN(ix, 0, GRID_MAX_POINTS_X - 1)) {
|
||||||
SERIAL_ECHOPAIR("I out of range (0-", int(GRID_MAX_POINTS_X - 1));
|
SERIAL_ECHOLNPAIR("I out of range (0-", int(GRID_MAX_POINTS_X - 1), ")");
|
||||||
SERIAL_ECHOLNPGM(")");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -153,8 +152,7 @@ void GcodeSuite::G29() {
|
|||||||
if (parser.seenval('J')) {
|
if (parser.seenval('J')) {
|
||||||
iy = parser.value_int();
|
iy = parser.value_int();
|
||||||
if (!WITHIN(iy, 0, GRID_MAX_POINTS_Y - 1)) {
|
if (!WITHIN(iy, 0, GRID_MAX_POINTS_Y - 1)) {
|
||||||
SERIAL_ECHOPAIR("J out of range (0-", int(GRID_MAX_POINTS_Y - 1));
|
SERIAL_ECHOLNPAIR("J out of range (0-", int(GRID_MAX_POINTS_Y - 1), ")");
|
||||||
SERIAL_ECHOLNPGM(")");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -182,10 +180,8 @@ void GcodeSuite::G29() {
|
|||||||
|
|
||||||
} // switch(state)
|
} // switch(state)
|
||||||
|
|
||||||
if (state == MeshNext) {
|
if (state == MeshNext)
|
||||||
SERIAL_ECHOPAIR("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS));
|
SERIAL_ECHOLNPAIR("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", int(GRID_MAX_POINTS));
|
||||||
SERIAL_ECHOLNPAIR(" of ", int(GRID_MAX_POINTS));
|
|
||||||
}
|
|
||||||
|
|
||||||
report_current_position();
|
report_current_position();
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,9 @@
|
|||||||
* U<angle> - Stowed Angle
|
* U<angle> - Stowed Angle
|
||||||
*/
|
*/
|
||||||
void GcodeSuite::M281() {
|
void GcodeSuite::M281() {
|
||||||
|
|
||||||
if (!parser.seenval('P')) return;
|
if (!parser.seenval('P')) return;
|
||||||
|
|
||||||
const int servo_index = parser.value_int();
|
const int servo_index = parser.value_int();
|
||||||
if (WITHIN(servo_index, 0, NUM_SERVOS - 1)) {
|
if (WITHIN(servo_index, 0, NUM_SERVOS - 1)) {
|
||||||
#if ENABLED(BLTOUCH)
|
#if ENABLED(BLTOUCH)
|
||||||
@ -53,16 +55,14 @@ void GcodeSuite::M281() {
|
|||||||
angle_change = true;
|
angle_change = true;
|
||||||
}
|
}
|
||||||
if (!angle_change) {
|
if (!angle_change) {
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG(" Servo ", servo_index,
|
||||||
SERIAL_ECHOLNPAIR(" Servo ", servo_index,
|
|
||||||
" L", servo_angles[servo_index][0],
|
" L", servo_angles[servo_index][0],
|
||||||
" U", servo_angles[servo_index][1]);
|
" U", servo_angles[servo_index][1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
SERIAL_ERROR_START();
|
SERIAL_ERROR_MSG("Servo ", servo_index, " out of range");
|
||||||
SERIAL_ECHOLNPAIR("Servo ", servo_index, " out of range");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // EDITABLE_SERVO_ANGLES
|
#endif // EDITABLE_SERVO_ANGLES
|
||||||
|
@ -35,14 +35,15 @@
|
|||||||
* D<dval> - Set the D value
|
* D<dval> - Set the D value
|
||||||
*/
|
*/
|
||||||
void GcodeSuite::M304() {
|
void GcodeSuite::M304() {
|
||||||
|
|
||||||
if (parser.seen('P')) thermalManager.temp_bed.pid.Kp = parser.value_float();
|
if (parser.seen('P')) thermalManager.temp_bed.pid.Kp = parser.value_float();
|
||||||
if (parser.seen('I')) thermalManager.temp_bed.pid.Ki = scalePID_i(parser.value_float());
|
if (parser.seen('I')) thermalManager.temp_bed.pid.Ki = scalePID_i(parser.value_float());
|
||||||
if (parser.seen('D')) thermalManager.temp_bed.pid.Kd = scalePID_d(parser.value_float());
|
if (parser.seen('D')) thermalManager.temp_bed.pid.Kd = scalePID_d(parser.value_float());
|
||||||
|
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG(" p:", thermalManager.temp_bed.pid.Kp,
|
||||||
SERIAL_ECHOLNPAIR(" p:", thermalManager.temp_bed.pid.Kp,
|
|
||||||
" i:", unscalePID_i(thermalManager.temp_bed.pid.Ki),
|
" i:", unscalePID_i(thermalManager.temp_bed.pid.Ki),
|
||||||
" d:", unscalePID_d(thermalManager.temp_bed.pid.Kd));
|
" d:", unscalePID_d(thermalManager.temp_bed.pid.Kd));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // PIDTEMPBED
|
#endif // PIDTEMPBED
|
||||||
|
@ -49,10 +49,8 @@ void GcodeSuite::M305() {
|
|||||||
const bool do_set = parser.seen("BCRT");
|
const bool do_set = parser.seen("BCRT");
|
||||||
|
|
||||||
// A valid P index is required
|
// A valid P index is required
|
||||||
if (t_index >= (USER_THERMISTORS) || (do_set && t_index < 0)) {
|
if (t_index >= (USER_THERMISTORS) || (do_set && t_index < 0))
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG("!Invalid index. (0 <= P <= ", int(USER_THERMISTORS - 1), ")");
|
||||||
SERIAL_ECHOLNPAIR("!Invalid index. (0 <= P <= ", int(USER_THERMISTORS - 1), ")");
|
|
||||||
}
|
|
||||||
else if (do_set) {
|
else if (do_set) {
|
||||||
if (parser.seen('R')) // Pullup resistor value
|
if (parser.seen('R')) // Pullup resistor value
|
||||||
if (!thermalManager.set_pull_up_res(t_index, parser.value_float()))
|
if (!thermalManager.set_pull_up_res(t_index, parser.value_float()))
|
||||||
|
@ -31,7 +31,9 @@
|
|||||||
* M280: Get or set servo position. P<index> [S<angle>]
|
* M280: Get or set servo position. P<index> [S<angle>]
|
||||||
*/
|
*/
|
||||||
void GcodeSuite::M280() {
|
void GcodeSuite::M280() {
|
||||||
|
|
||||||
if (!parser.seen('P')) return;
|
if (!parser.seen('P')) return;
|
||||||
|
|
||||||
const int servo_index = parser.value_int();
|
const int servo_index = parser.value_int();
|
||||||
if (WITHIN(servo_index, 0, NUM_SERVOS - 1)) {
|
if (WITHIN(servo_index, 0, NUM_SERVOS - 1)) {
|
||||||
if (parser.seen('S')) {
|
if (parser.seen('S')) {
|
||||||
@ -41,15 +43,12 @@ void GcodeSuite::M280() {
|
|||||||
else
|
else
|
||||||
MOVE_SERVO(servo_index, a);
|
MOVE_SERVO(servo_index, a);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG(" Servo ", servo_index, ": ", servo[servo_index].read());
|
||||||
SERIAL_ECHOLNPAIR(" Servo ", servo_index, ": ", servo[servo_index].read());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
SERIAL_ERROR_START();
|
|
||||||
SERIAL_ECHOLNPAIR("Servo ", servo_index, " out of range");
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
SERIAL_ERROR_MSG("Servo ", servo_index, " out of range");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HAS_SERVOS
|
#endif // HAS_SERVOS
|
||||||
|
@ -32,14 +32,14 @@
|
|||||||
* S<seconds> Optional. Set the keepalive interval.
|
* S<seconds> Optional. Set the keepalive interval.
|
||||||
*/
|
*/
|
||||||
void GcodeSuite::M113() {
|
void GcodeSuite::M113() {
|
||||||
|
|
||||||
if (parser.seenval('S')) {
|
if (parser.seenval('S')) {
|
||||||
host_keepalive_interval = parser.value_byte();
|
host_keepalive_interval = parser.value_byte();
|
||||||
NOMORE(host_keepalive_interval, 60);
|
NOMORE(host_keepalive_interval, 60);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG("M113 S", (uint16_t)host_keepalive_interval);
|
||||||
SERIAL_ECHOLNPAIR("M113 S", (unsigned long)host_keepalive_interval);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HOST_KEEPALIVE_FEATURE
|
#endif // HOST_KEEPALIVE_FEATURE
|
||||||
|
@ -42,14 +42,12 @@
|
|||||||
FORCE_INLINE void mod_probe_offset(const float &offs) {
|
FORCE_INLINE void mod_probe_offset(const float &offs) {
|
||||||
if (TERN1(BABYSTEP_HOTEND_Z_OFFSET, active_extruder == 0)) {
|
if (TERN1(BABYSTEP_HOTEND_Z_OFFSET, active_extruder == 0)) {
|
||||||
probe.offset.z += offs;
|
probe.offset.z += offs;
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG(STR_PROBE_OFFSET " " STR_Z, probe.offset.z);
|
||||||
SERIAL_ECHOLNPAIR(STR_PROBE_OFFSET " " STR_Z, probe.offset.z);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
|
#if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
|
||||||
hotend_offset[active_extruder].z -= offs;
|
hotend_offset[active_extruder].z -= offs;
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG(STR_PROBE_OFFSET STR_Z ": ", hotend_offset[active_extruder].z);
|
||||||
SERIAL_ECHOLNPAIR(STR_PROBE_OFFSET STR_Z ": ", hotend_offset[active_extruder].z);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,5 @@ void GcodeSuite::M31() {
|
|||||||
|
|
||||||
ui.set_status(buffer);
|
ui.set_status(buffer);
|
||||||
|
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG("Print time: ", buffer);
|
||||||
SERIAL_ECHOLNPAIR("Print time: ", buffer);
|
|
||||||
}
|
}
|
||||||
|
@ -552,10 +552,8 @@ void AnycubicTFTClass::GetCommandFromTFT() {
|
|||||||
a_command = ((int)((strtod(&TFTcmdbuffer[TFTbufindw][TFTstrchr_pointer - TFTcmdbuffer[TFTbufindw] + 1], nullptr))));
|
a_command = ((int)((strtod(&TFTcmdbuffer[TFTbufindw][TFTstrchr_pointer - TFTcmdbuffer[TFTbufindw] + 1], nullptr))));
|
||||||
|
|
||||||
#if ENABLED(ANYCUBIC_LCD_DEBUG)
|
#if ENABLED(ANYCUBIC_LCD_DEBUG)
|
||||||
if ((a_command > 7) && (a_command != 20)) { // No debugging of status polls, please!
|
if ((a_command > 7) && (a_command != 20)) // No debugging of status polls, please!
|
||||||
SERIAL_ECHOPGM("TFT Serial Command: ");
|
SERIAL_ECHOLNPAIR("TFT Serial Command: ", TFTcmdbuffer[TFTbufindw]);
|
||||||
SERIAL_ECHOLN(TFTcmdbuffer[TFTbufindw]);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
switch (a_command) {
|
switch (a_command) {
|
||||||
|
@ -1083,8 +1083,7 @@ void CLCD::init() {
|
|||||||
|
|
||||||
if (counter == 249) {
|
if (counter == 249) {
|
||||||
#if ENABLED(TOUCH_UI_DEBUG)
|
#if ENABLED(TOUCH_UI_DEBUG)
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG("Timeout waiting for device ID, should be 124, got ", int(device_id));
|
||||||
SERIAL_ECHOLNPAIR("Timeout waiting for device ID, should be 124, got ", device_id);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1101,10 +1100,8 @@ void CLCD::init() {
|
|||||||
else
|
else
|
||||||
delay(1);
|
delay(1);
|
||||||
|
|
||||||
if (ENABLED(TOUCH_UI_DEBUG) && counter == 99) {
|
if (ENABLED(TOUCH_UI_DEBUG) && counter == 99)
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG("Timeout waiting for reset status. Should be 0x00, got ", int(reset_status));
|
||||||
SERIAL_ECHOLNPAIR("Timeout waiting for reset status. Should be 0x00, got ", reset_status);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mem_write_8(REG::PWM_DUTY, 0); // turn off Backlight, Frequency already is set to 250Hz default
|
mem_write_8(REG::PWM_DUTY, 0); // turn off Backlight, Frequency already is set to 250Hz default
|
||||||
|
@ -124,8 +124,7 @@ namespace FTDI {
|
|||||||
case UNPRESSED:
|
case UNPRESSED:
|
||||||
if (tag != 0) {
|
if (tag != 0) {
|
||||||
#if ENABLED(TOUCH_UI_DEBUG)
|
#if ENABLED(TOUCH_UI_DEBUG)
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG("Touch start: ", int(tag));
|
||||||
SERIAL_ECHOLNPAIR("Touch start: ", tag);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pressed_tag = tag;
|
pressed_tag = tag;
|
||||||
@ -186,8 +185,7 @@ namespace FTDI {
|
|||||||
if (UIData::flags.bits.touch_end_sound) sound.play(unpress_sound);
|
if (UIData::flags.bits.touch_end_sound) sound.play(unpress_sound);
|
||||||
|
|
||||||
#if ENABLED(TOUCH_UI_DEBUG)
|
#if ENABLED(TOUCH_UI_DEBUG)
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG("Touch end: ", int(pressed_tag));
|
||||||
SERIAL_ECHOLNPAIR("Touch end: ", pressed_tag);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const uint8_t saved_pressed_tag = pressed_tag;
|
const uint8_t saved_pressed_tag = pressed_tag;
|
||||||
|
@ -43,8 +43,7 @@ void ScreenRef::setScreen(onRedraw_func_t onRedraw_ptr) {
|
|||||||
if (type != 0xFF) {
|
if (type != 0xFF) {
|
||||||
setType(type);
|
setType(type);
|
||||||
#if ENABLED(TOUCH_UI_DEBUG)
|
#if ENABLED(TOUCH_UI_DEBUG)
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG("New screen: ", int(type));
|
||||||
SERIAL_ECHOLNPAIR("New screen: ", type);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,8 +127,7 @@ void BioPrintingDialogBox::setStatusMessage(const char* message) {
|
|||||||
storeBackground();
|
storeBackground();
|
||||||
|
|
||||||
#if ENABLED(TOUCH_UI_DEBUG)
|
#if ENABLED(TOUCH_UI_DEBUG)
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG("New status message: ", message);
|
||||||
SERIAL_ECHOLNPAIR("New status message: ", message);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (AT_SCREEN(BioPrintingDialogBox))
|
if (AT_SCREEN(BioPrintingDialogBox))
|
||||||
|
@ -2946,7 +2946,7 @@ void MarlinSettings::reset() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define CONFIG_ECHO_START() do{ if (!forReplay) SERIAL_ECHO_START(); }while(0)
|
#define CONFIG_ECHO_START() do{ if (!forReplay) SERIAL_ECHO_START(); }while(0)
|
||||||
#define CONFIG_ECHO_MSG(STR) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM(STR); }while(0)
|
#define CONFIG_ECHO_MSG(V...) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPAIR(V); }while(0)
|
||||||
#define CONFIG_ECHO_HEADING(STR) config_heading(forReplay, PSTR(STR))
|
#define CONFIG_ECHO_HEADING(STR) config_heading(forReplay, PSTR(STR))
|
||||||
|
|
||||||
#if HAS_TRINAMIC_CONFIG
|
#if HAS_TRINAMIC_CONFIG
|
||||||
@ -3039,8 +3039,7 @@ void MarlinSettings::reset() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if EXTRUDERS == 1
|
#if EXTRUDERS == 1
|
||||||
CONFIG_ECHO_START();
|
CONFIG_ECHO_MSG(" M200 S", int(parser.volumetric_enabled)
|
||||||
SERIAL_ECHOLNPAIR(" M200 S", int(parser.volumetric_enabled)
|
|
||||||
, " D", LINEAR_UNIT(planner.filament_size[0])
|
, " D", LINEAR_UNIT(planner.filament_size[0])
|
||||||
#if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT)
|
#if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT)
|
||||||
, " L", LINEAR_UNIT(planner.volumetric_extruder_limit[0])
|
, " L", LINEAR_UNIT(planner.volumetric_extruder_limit[0])
|
||||||
@ -3048,17 +3047,16 @@ void MarlinSettings::reset() {
|
|||||||
);
|
);
|
||||||
#else
|
#else
|
||||||
LOOP_L_N(i, EXTRUDERS) {
|
LOOP_L_N(i, EXTRUDERS) {
|
||||||
CONFIG_ECHO_START();
|
CONFIG_ECHO_MSG(" M200 T", int(i)
|
||||||
SERIAL_ECHOLNPAIR(" M200 T", int(i)
|
|
||||||
, " D", LINEAR_UNIT(planner.filament_size[i])
|
, " D", LINEAR_UNIT(planner.filament_size[i])
|
||||||
#if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT)
|
#if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT)
|
||||||
, " L", LINEAR_UNIT(planner.volumetric_extruder_limit[i])
|
, " L", LINEAR_UNIT(planner.volumetric_extruder_limit[i])
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
CONFIG_ECHO_START();
|
CONFIG_ECHO_MSG(" M200 S", int(parser.volumetric_enabled));
|
||||||
SERIAL_ECHOLNPAIR(" M200 S", int(parser.volumetric_enabled));
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // EXTRUDERS && !NO_VOLUMETRICS
|
#endif // EXTRUDERS && !NO_VOLUMETRICS
|
||||||
|
|
||||||
CONFIG_ECHO_HEADING("Steps per unit:");
|
CONFIG_ECHO_HEADING("Steps per unit:");
|
||||||
@ -3194,7 +3192,7 @@ void MarlinSettings::reset() {
|
|||||||
|
|
||||||
CONFIG_ECHO_START();
|
CONFIG_ECHO_START();
|
||||||
SERIAL_ECHOLNPAIR_P(
|
SERIAL_ECHOLNPAIR_P(
|
||||||
PSTR(" M420 S"), planner.leveling_active ? 1 : 0
|
PSTR(" M420 S"), int(planner.leveling_active)
|
||||||
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
|
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
|
||||||
, SP_Z_STR, LINEAR_UNIT(planner.z_fade_height)
|
, SP_Z_STR, LINEAR_UNIT(planner.z_fade_height)
|
||||||
#endif
|
#endif
|
||||||
@ -3260,8 +3258,7 @@ void MarlinSettings::reset() {
|
|||||||
#elif ENABLED(BLTOUCH) || (HAS_Z_SERVO_PROBE && defined(Z_SERVO_ANGLES))
|
#elif ENABLED(BLTOUCH) || (HAS_Z_SERVO_PROBE && defined(Z_SERVO_ANGLES))
|
||||||
case Z_PROBE_SERVO_NR:
|
case Z_PROBE_SERVO_NR:
|
||||||
#endif
|
#endif
|
||||||
CONFIG_ECHO_START();
|
CONFIG_ECHO_MSG(" M281 P", int(i), " L", servo_angles[i][0], " U", servo_angles[i][1]);
|
||||||
SERIAL_ECHOLNPAIR(" M281 P", int(i), " L", servo_angles[i][0], " U", servo_angles[i][1]);
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3382,8 +3379,7 @@ void MarlinSettings::reset() {
|
|||||||
#endif // PIDTEMP
|
#endif // PIDTEMP
|
||||||
|
|
||||||
#if ENABLED(PIDTEMPBED)
|
#if ENABLED(PIDTEMPBED)
|
||||||
CONFIG_ECHO_START();
|
CONFIG_ECHO_MSG(
|
||||||
SERIAL_ECHOLNPAIR(
|
|
||||||
" M304 P", thermalManager.temp_bed.pid.Kp
|
" M304 P", thermalManager.temp_bed.pid.Kp
|
||||||
, " I", unscalePID_i(thermalManager.temp_bed.pid.Ki)
|
, " I", unscalePID_i(thermalManager.temp_bed.pid.Ki)
|
||||||
, " D", unscalePID_d(thermalManager.temp_bed.pid.Kd)
|
, " D", unscalePID_d(thermalManager.temp_bed.pid.Kd)
|
||||||
@ -3400,16 +3396,14 @@ void MarlinSettings::reset() {
|
|||||||
|
|
||||||
#if HAS_LCD_CONTRAST
|
#if HAS_LCD_CONTRAST
|
||||||
CONFIG_ECHO_HEADING("LCD Contrast:");
|
CONFIG_ECHO_HEADING("LCD Contrast:");
|
||||||
CONFIG_ECHO_START();
|
CONFIG_ECHO_MSG(" M250 C", ui.contrast);
|
||||||
SERIAL_ECHOLNPAIR(" M250 C", ui.contrast);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TERN_(CONTROLLER_FAN_EDITABLE, M710_report(forReplay));
|
TERN_(CONTROLLER_FAN_EDITABLE, M710_report(forReplay));
|
||||||
|
|
||||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||||
CONFIG_ECHO_HEADING("Power-Loss Recovery:");
|
CONFIG_ECHO_HEADING("Power-Loss Recovery:");
|
||||||
CONFIG_ECHO_START();
|
CONFIG_ECHO_MSG(" M413 S", int(recovery.enabled));
|
||||||
SERIAL_ECHOLNPAIR(" M413 S", int(recovery.enabled));
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(FWRETRACT)
|
#if ENABLED(FWRETRACT)
|
||||||
@ -3424,8 +3418,7 @@ void MarlinSettings::reset() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
CONFIG_ECHO_HEADING("Recover: S<length> F<units/m>");
|
CONFIG_ECHO_HEADING("Recover: S<length> F<units/m>");
|
||||||
CONFIG_ECHO_START();
|
CONFIG_ECHO_MSG(
|
||||||
SERIAL_ECHOLNPAIR(
|
|
||||||
" M208 S", LINEAR_UNIT(fwretract.settings.retract_recover_extra)
|
" M208 S", LINEAR_UNIT(fwretract.settings.retract_recover_extra)
|
||||||
, " W", LINEAR_UNIT(fwretract.settings.swap_retract_recover_extra)
|
, " W", LINEAR_UNIT(fwretract.settings.swap_retract_recover_extra)
|
||||||
, " F", LINEAR_UNIT(MMS_TO_MMM(fwretract.settings.retract_recover_feedrate_mm_s))
|
, " F", LINEAR_UNIT(MMS_TO_MMM(fwretract.settings.retract_recover_feedrate_mm_s))
|
||||||
@ -3434,8 +3427,7 @@ void MarlinSettings::reset() {
|
|||||||
#if ENABLED(FWRETRACT_AUTORETRACT)
|
#if ENABLED(FWRETRACT_AUTORETRACT)
|
||||||
|
|
||||||
CONFIG_ECHO_HEADING("Auto-Retract: S=0 to disable, 1 to interpret E-only moves as retract/recover");
|
CONFIG_ECHO_HEADING("Auto-Retract: S=0 to disable, 1 to interpret E-only moves as retract/recover");
|
||||||
CONFIG_ECHO_START();
|
CONFIG_ECHO_MSG(" M209 S", int(fwretract.autoretract_enabled));
|
||||||
SERIAL_ECHOLNPAIR(" M209 S", fwretract.autoretract_enabled ? 1 : 0);
|
|
||||||
|
|
||||||
#endif // FWRETRACT_AUTORETRACT
|
#endif // FWRETRACT_AUTORETRACT
|
||||||
|
|
||||||
@ -3780,13 +3772,10 @@ void MarlinSettings::reset() {
|
|||||||
#if ENABLED(LIN_ADVANCE)
|
#if ENABLED(LIN_ADVANCE)
|
||||||
CONFIG_ECHO_HEADING("Linear Advance:");
|
CONFIG_ECHO_HEADING("Linear Advance:");
|
||||||
#if EXTRUDERS < 2
|
#if EXTRUDERS < 2
|
||||||
CONFIG_ECHO_START();
|
CONFIG_ECHO_MSG(" M900 K", planner.extruder_advance_K[0]);
|
||||||
SERIAL_ECHOLNPAIR(" M900 K", planner.extruder_advance_K[0]);
|
|
||||||
#else
|
#else
|
||||||
LOOP_L_N(i, EXTRUDERS) {
|
LOOP_L_N(i, EXTRUDERS)
|
||||||
CONFIG_ECHO_START();
|
CONFIG_ECHO_MSG(" M900 T", int(i), " K", planner.extruder_advance_K[i]);
|
||||||
SERIAL_ECHOLNPAIR(" M900 T", int(i), " K", planner.extruder_advance_K[i]);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -3851,8 +3840,7 @@ void MarlinSettings::reset() {
|
|||||||
|
|
||||||
#if HAS_FILAMENT_SENSOR
|
#if HAS_FILAMENT_SENSOR
|
||||||
CONFIG_ECHO_HEADING("Filament runout sensor:");
|
CONFIG_ECHO_HEADING("Filament runout sensor:");
|
||||||
CONFIG_ECHO_START();
|
CONFIG_ECHO_MSG(
|
||||||
SERIAL_ECHOLNPAIR(
|
|
||||||
" M412 S", int(runout.enabled)
|
" M412 S", int(runout.enabled)
|
||||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||||
, " D", LINEAR_UNIT(runout.runout_distance())
|
, " D", LINEAR_UNIT(runout.runout_distance())
|
||||||
|
@ -1037,8 +1037,7 @@ void Temperature::min_temp_error(const heater_id_t heater_id) {
|
|||||||
|
|
||||||
#if ENABLED(PID_BED_DEBUG)
|
#if ENABLED(PID_BED_DEBUG)
|
||||||
{
|
{
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG(
|
||||||
SERIAL_ECHOLNPAIR(
|
|
||||||
" PID_BED_DEBUG : Input ", temp_bed.celsius, " Output ", pid_output,
|
" PID_BED_DEBUG : Input ", temp_bed.celsius, " Output ", pid_output,
|
||||||
#if DISABLED(PID_OPENLOOP)
|
#if DISABLED(PID_OPENLOOP)
|
||||||
STR_PID_DEBUG_PTERM, work_pid.Kp,
|
STR_PID_DEBUG_PTERM, work_pid.Kp,
|
||||||
|
@ -1196,8 +1196,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
|||||||
gcode.process_subcommands_now_P(PSTR(EVENT_GCODE_AFTER_TOOLCHANGE));
|
gcode.process_subcommands_now_P(PSTR(EVENT_GCODE_AFTER_TOOLCHANGE));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG(STR_ACTIVE_EXTRUDER, int(active_extruder));
|
||||||
SERIAL_ECHOLNPAIR(STR_ACTIVE_EXTRUDER, int(active_extruder));
|
|
||||||
|
|
||||||
#endif // HAS_MULTI_EXTRUDER
|
#endif // HAS_MULTI_EXTRUDER
|
||||||
}
|
}
|
||||||
|
@ -270,10 +270,9 @@ void CardReader::printListing(SdFile parent, const char * const prepend/*=nullpt
|
|||||||
// Get a new directory object using the full path
|
// Get a new directory object using the full path
|
||||||
// and dive recursively into it.
|
// and dive recursively into it.
|
||||||
SdFile child;
|
SdFile child;
|
||||||
if (!child.open(&parent, dosFilename, O_READ)) {
|
if (!child.open(&parent, dosFilename, O_READ))
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG(STR_SD_CANT_OPEN_SUBDIR, dosFilename);
|
||||||
SERIAL_ECHOLNPAIR(STR_SD_CANT_OPEN_SUBDIR, dosFilename);
|
|
||||||
}
|
|
||||||
printListing(child, path);
|
printListing(child, path);
|
||||||
// close() is done automatically by destructor of SdFile
|
// close() is done automatically by destructor of SdFile
|
||||||
}
|
}
|
||||||
@ -594,8 +593,7 @@ void CardReader::openFileRead(char * const path, const uint8_t subcall_type/*=0*
|
|||||||
filespos[file_subcall_ctr] = sdpos;
|
filespos[file_subcall_ctr] = sdpos;
|
||||||
|
|
||||||
// For sub-procedures say 'SUBROUTINE CALL target: "..." parent: "..." pos12345'
|
// For sub-procedures say 'SUBROUTINE CALL target: "..." parent: "..." pos12345'
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG("SUBROUTINE CALL target:\"", path, "\" parent:\"", proc_filenames[file_subcall_ctr], "\" pos", sdpos);
|
||||||
SERIAL_ECHOLNPAIR("SUBROUTINE CALL target:\"", path, "\" parent:\"", proc_filenames[file_subcall_ctr], "\" pos", sdpos);
|
|
||||||
file_subcall_ctr++;
|
file_subcall_ctr++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -941,10 +939,8 @@ void CardReader::cd(const char * relpath) {
|
|||||||
workDirParents[workDirDepth++] = workDir;
|
workDirParents[workDirDepth++] = workDir;
|
||||||
TERN_(SDCARD_SORT_ALPHA, presort());
|
TERN_(SDCARD_SORT_ALPHA, presort());
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_MSG(STR_SD_CANT_ENTER_SUBDIR, relpath);
|
||||||
SERIAL_ECHOLNPAIR(STR_SD_CANT_ENTER_SUBDIR, relpath);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int8_t CardReader::cdup() {
|
int8_t CardReader::cdup() {
|
||||||
|
Loading…
Reference in New Issue
Block a user