Merge pull request #161 from se5a/master

Added M93 command - sends current steps per unit for all axis
This commit is contained in:
kliment 2012-04-01 23:32:04 -07:00
commit 4eeeaed9fc

View file

@ -28,6 +28,9 @@
https://github.com/ErikZalm/Marlin-non-gen6 https://github.com/ErikZalm/Marlin-non-gen6
Sprinter Changelog Sprinter Changelog
- Added M93 command. Sends current steps for all axis.
- Look forward function --> calculate 16 Steps forward, get from Firmaware Marlin and Grbl - Look forward function --> calculate 16 Steps forward, get from Firmaware Marlin and Grbl
- Stepper control with Timer 1 (Interrupt) - Stepper control with Timer 1 (Interrupt)
- Extruder heating with PID use a Softpwm (Timer 2) with 500 hz to free Timer1 für Steppercontrol - Extruder heating with PID use a Softpwm (Timer 2) with 500 hz to free Timer1 für Steppercontrol
@ -176,6 +179,7 @@ void __cxa_pure_virtual(){};
// or use S<seconds> to specify an inactivity timeout, after which the steppers will be disabled. S0 to disable the timeout. // or use S<seconds> to specify an inactivity timeout, after which the steppers will be disabled. S0 to disable the timeout.
// M85 - Set inactivity shutdown timer with parameter S<seconds>. To disable set zero (default) // M85 - Set inactivity shutdown timer with parameter S<seconds>. To disable set zero (default)
// M92 - Set axis_steps_per_unit - same syntax as G92 // M92 - Set axis_steps_per_unit - same syntax as G92
// M93 - Send axis_steps_per_unit
// M115 - Capabilities string // M115 - Capabilities string
// M119 - Show Endstopper State // M119 - Show Endstopper State
// M140 - Set bed target temp // M140 - Set bed target temp
@ -1595,6 +1599,17 @@ FORCE_INLINE void process_commands()
// all steps_per_unit related variables // all steps_per_unit related variables
// } // }
break; break;
case 93: // M93 show current axis steps.
showString(PSTR("ok "));
showString(PSTR("X:"));
Serial.print(axis_steps_per_unit[0]);
showString(PSTR("Y:"));
Serial.print(axis_steps_per_unit[1]);
showString(PSTR("Z:"));
Serial.print(axis_steps_per_unit[2]);
showString(PSTR("E:"));
Serial.println(axis_steps_per_unit[3]);
break;
case 115: // M115 case 115: // M115
showString(PSTR("FIRMWARE_NAME: Sprinter Experimental PROTOCOL_VERSION:1.0 MACHINE_TYPE:Mendel EXTRUDER_COUNT:1\r\n")); showString(PSTR("FIRMWARE_NAME: Sprinter Experimental PROTOCOL_VERSION:1.0 MACHINE_TYPE:Mendel EXTRUDER_COUNT:1\r\n"));
//Serial.println(uuid); //Serial.println(uuid);