diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 8723d8b06d..eddf70bfc2 100755 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -5318,7 +5318,7 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) { /*! - ### M0, M1 - Stop the printer G32: Undock Z Probe sled + ### M0, M1 - Stop the printer M0: Stop or Unconditional stop */ --------------------------------------------------------------- case 0: // M0 - Unconditional stop - Wait for user button press on LCD case 1: // M1 - Conditional stop - Wait for user button press on LCD @@ -5368,7 +5368,7 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) } break; - //! ### M17 - Enable axes G32: Undock Z Probe sled + //! ### M17 - Enable axes M17: Enable/Power all stepper motors // --------------------------------- case 17: LCD_MESSAGERPGM(_i("No move."));////MSG_NO_MOVE @@ -5382,28 +5382,32 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) #ifdef SDSUPPORT - //! ### M20 - SD Card file list G32: Undock Z Probe sled - // ----------------------------------- + /*! + ### M20 - SD Card file list M20: List SD card + */ ----------------------------------- case 20: SERIAL_PROTOCOLLNRPGM(_N("Begin file list"));////MSG_BEGIN_FILE_LIST card.ls(); SERIAL_PROTOCOLLNRPGM(_N("End file list"));////MSG_END_FILE_LIST break; - //! ### M21 - Init SD card G32: Undock Z Probe sled - // ------------------------------------ + /*! + ### M21 - Init SD card M21: Initialize SD card + */ ------------------------------------ case 21: card.initsd(); break; - //! ### M22 - Release SD card G32: Undock Z Probe sled - // ----------------------------------- + /*! + ### M22 - Release SD card M22: Release SD card + */ ----------------------------------- case 22: card.release(); break; - //! ### M23 - Select file G32: Undock Z Probe sled - // ----------------------------------- + /*! + ### M23 - Select file M23: Select SD file + */ ----------------------------------- case 23: starpos = (strchr(strchr_pointer + 4,'*')); if(starpos!=NULL) @@ -5411,8 +5415,9 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) card.openFile(strchr_pointer + 4,true); break; - //! ### M24 - Start SD print G32: Undock Z Probe sled - // ---------------------------------- + /*! + ### M24 - Start SD print M24: Start/resume SD print + */ ---------------------------------- case 24: if (!card.paused) failstats_reset_print(); @@ -5420,17 +5425,19 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) starttime=_millis(); break; - //! ### M25 - Pause SD print G32: Undock Z Probe sled - // ---------------------------------- + /*! + ### M25 - Pause SD print M25: Pause SD print + */ ---------------------------------- case 25: card.pauseSDPrint(); break; - //! ### M26 S\ - Set SD index G32: Undock Z Probe sled - //! Set position in SD card file to index in bytes. - //! This command is expected to be called after M23 and before M24. - //! Otherwise effect of this command is undefined. - // ---------------------------------- + /*! + ### M26 S\ - Set SD index M26: Set SD position + Set position in SD card file to index in bytes. + This command is expected to be called after M23 and before M24. + Otherwise effect of this command is undefined. + */ ---------------------------------- case 26: if(card.cardOK && code_seen('S')) { long index = code_value_long(); @@ -5441,14 +5448,16 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) } break; - //! ### M27 - Get SD status G32: Undock Z Probe sled - // ---------------------------------- + /*! + ### M27 - Get SD status M27: Report SD print status + */ ---------------------------------- case 27: card.getStatus(); break; - //! ### M28 - Start SD write G32: Undock Z Probe sled - // --------------------------------- + /*! + ### M28 - Start SD write M28: Begin write to SD card + */ --------------------------------- case 28: starpos = (strchr(strchr_pointer + 4,'*')); if(starpos != NULL){ @@ -5459,16 +5468,17 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) card.openFile(strchr_pointer+4,false); break; - //! ### M29 - Stop SD write G32: Undock Z Probe sled - // ------------------------------------- - //! Currently has no effect. + /*! ### M29 - Stop SD write M29: Stop writing to SD card + Currently has no effect. + */ ------------------------------------- case 29: //processed in write to file routine above //card,saving = false; break; - //! ### M30 - Delete file G32: Undock Z Probe sled - // ---------------------------------- + /*! + ### M30 - Delete file M30: Delete a file on the SD card + */ ---------------------------------- case 30: if (card.cardOK){ card.closefile(); @@ -5482,8 +5492,10 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) } break; - //! ### M32 - Select file and start SD print G32: Undock Z Probe sled - // ------------------------------------ + /*! + ### M32 - Select file and start SD print M32: Select file and start SD print + @todo What are the parameters P and S for in M32? + */ ------------------------------------ case 32: { if(card.sdprinting) { @@ -5520,8 +5532,8 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) } } break; - //! ### M982 - Start SD write G32: Undock Z Probe sled - // --------------------------------- + /*! ### M982 - Start SD logging M928: Start SD logging + */ --------------------------------- case 928: starpos = (strchr(strchr_pointer + 5,'*')); if(starpos != NULL){ @@ -5534,8 +5546,9 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) #endif //SDSUPPORT - //! ### M31 - Report current print time G32: Undock Z Probe sled - // -------------------------------------------------- + /*! + ### M31 - Report current print time M31: Output time since last M109 or SD card start to serial + */ -------------------------------------------------- case 31: //M31 take time since the start of the SD print or an M109 command { stoptime=_millis(); @@ -5552,8 +5565,9 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) } break; - //! ### M42 - Set pin state G32: Undock Z Probe sled - // ----------------------------- + /*! + ### M42 - Set pin state M42: Switch I/O pin + */ ----------------------------- case 42: if (code_seen('S')) { @@ -5583,8 +5597,9 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) break; - //! ### M44 - Reset the bed skew and offset calibration (Prusa specific) G32: Undock Z Probe sled - // -------------------------------------------------------------------- + /*! + ### M44 - Reset the bed skew and offset calibration (Prusa specific) M44: Reset the bed skew and offset calibration + */ -------------------------------------------------------------------- case 44: // M44: Prusa3D: Reset the bed skew and offset calibration. // Reset the baby step value and the baby step applied flag. @@ -5599,8 +5614,12 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) world2machine_revert_to_uncorrected(); break; - //! ### M45 - Bed skew and offset with manual Z up (Prusa specific) G32: Undock Z Probe sled - // ------------------------------------------------------ + /*! + ### M45 - Bed skew and offset with manual Z up (Prusa specific) M45: Bed skew and offset with manual Z up + + G80 [ V ] + - V Verbosity level 1, 10 and 20 (low, mid, high). Only when SUPPORT_VERBOSITY is defined. + */ ------------------------------------------------------ case 45: // M45: Prusa3D: bed skew and offset with manual Z up { int8_t verbosity_level = 0; @@ -5640,8 +5659,9 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) } */ - //! ### M47 - Show end stops dialog on the display (Prusa specific) G32: Undock Z Probe sled - // ---------------------------------------------------- + /*! + ### M47 - Show end stops dialog on the displayM47: Show end stops dialog on the display + */ ---------------------------------------------------- case 47: KEEPALIVE_STATE(PAUSED_FOR_USER); @@ -5689,22 +5709,22 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) #ifdef ENABLE_AUTO_BED_LEVELING #ifdef Z_PROBE_REPEATABILITY_TEST - //! ### M48 - Z-Probe repeatability measurement function. G32: Undock Z Probe sled - // ------------------------------------------------------ - //! - //! _Usage:_ - //! - //! M48 - //! - //! This function assumes the bed has been homed. Specifically, that a G28 command - //! as been issued prior to invoking the M48 Z-Probe repeatability measurement function. - //! Any information generated by a prior G29 Bed leveling command will be lost and need to be - //! regenerated. - //! - //! The number of samples will default to 10 if not specified. You can use upper or lower case - //! letters for any of the options EXCEPT n. n must be in lower case because Marlin uses a capital - //! N for its communication protocol and will get horribly confused if you send it a capital N. - //! + /*! + ### M48 - Z-Probe repeatability measurement function. M48: Measure Z-Probe repeatability + + This function assumes the bed has been homed. Specifically, that a G28 command as been issued prior to invoking the M48 Z-Probe repeatability measurement function. Any information generated by a prior G29 Bed leveling command will be lost and need to be regenerated. + + The number of samples will default to 10 if not specified. You can use upper or lower case letters for any of the options EXCEPT n. n must be in lower case because Marlin uses a capital N for its communication protocol and will get horribly confused if you send it a capital N. + + M48 [ n | X | Y | V | L ] + - n - Number of samples. Valid values 4-50 + - X - X position for samples + - Y - Y position for samples + - V - Verbose level. Valid values 1-4 + - L - Legs of movementprior to doing probe. Valid values 1-15 + + + */ case 48: // M48 Z-Probe repeatability { #if Z_MIN_PIN == -1 @@ -5943,12 +5963,17 @@ SERIAL_PROTOCOLPGM("\n\n"); #endif // Z_PROBE_REPEATABILITY_TEST #endif // ENABLE_AUTO_BED_LEVELING - //! ### M73 - Set/get print progress G32: Undock Z Probe sled - // ------------------------------------- - //! _Usage:_ - //! - //! M73 P R Q S - //! + /*! + ### M73 - Set/get print progress M73: Set/Get build percentage + Prusa firmware just shows percent done and time remaining. + + M73 [ P | R | Q | S ] + + - P - Percent in normal mode + - R - Time remaining in normal mode + - Q - Percent in silent mode + - S - Time in silent mode + */ case 73: //M73 show percent done and time remaining if(code_seen('P')) print_percent_done_normal = code_value(); if(code_seen('R')) print_time_remaining_normal = code_value(); @@ -5962,8 +5987,13 @@ SERIAL_PROTOCOLPGM("\n\n"); } break; - //! ### M104 - Set hotend temperature G32: Undock Z Probe sled - // ----------------------------------------- + /*! + ### M104 - Set hotend temperature M104: Set Extruder Temperature + + M104 [ S ] + + - S - Target temperature + */ ----------------------------------------- case 104: // M104 { uint8_t extruder; @@ -5977,20 +6007,37 @@ SERIAL_PROTOCOLPGM("\n\n"); break; } - //! ### M112 - Emergency stop G32: Undock Z Probe sled - // ----------------------------------------- + /*! + ### M112 - Emergency stop M112: Full (Emergency) Stop + */ ----------------------------------------- case 112: kill(_n(""), 3); break; - //! ### M140 - Set bed temperature G32: Undock Z Probe sled - // ----------------------------------------- + /*! + ### M140 - Set bed temperature M140: Set Bed Temperature (Fast) + */ ----------------------------------------- case 140: if (code_seen('S')) setTargetBed(code_value()); break; - //! ### M105 - Report temperatures G32: Undock Z Probe sled - // ----------------------------------------- + /*! + ### M105 - Report temperatures M105: Get Extruder Temperature + Prints temperatures: + + - T: - Hotend (actual / target) + - B: - Bed (actual / target) + - Tx: - x Tool (actual / target) + - @: - Hotend power + - B@: - Bed power + - P: - PINDAv2 actual (only MK2.5/s and MK3.5/s) + - A: - Ambient actual (only MK3/s) + + _Example:_ + + ok T:20.2 /0.0 B:19.1 /0.0 T0:20.2 /0.0 @:0 B@:0 P:19.8 A:26.4 + + */ ----------------------------------------- case 105: { uint8_t extruder;