diff options
author | Emanuele Caruso <emanuele.caruso@gmail.com> | 2011-05-11 04:30:41 +0200 |
---|---|---|
committer | Emanuele Caruso <emanuele.caruso@gmail.com> | 2011-05-11 04:30:41 +0200 |
commit | 61cc2ef42ccdcc6edc21a0795c62bd02bd6aa4ca (patch) | |
tree | ad966d1da776cc98cf0d7c431766509c6625da57 | |
parent | f2f0ebe09c10475fe30de1113e7c8fae0dab7da5 (diff) |
Added M201 and M202 to set max acceleration for respectively print and travel moves
-rw-r--r-- | Tonokip_Firmware/Tonokip_Firmware.pde | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Tonokip_Firmware/Tonokip_Firmware.pde b/Tonokip_Firmware/Tonokip_Firmware.pde index fa8c861..4c645a5 100644 --- a/Tonokip_Firmware/Tonokip_Firmware.pde +++ b/Tonokip_Firmware/Tonokip_Firmware.pde @@ -84,7 +84,8 @@ void kill(byte debug); // M115 - Capabilities string // M140 - Set bed target temp // M190 - Wait for bed current temp to reach target temp. - +// M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000) +// M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) //Stepper Movement Variables @@ -813,6 +814,16 @@ inline void process_commands() Serial.print("E:"); Serial.println(current_e); break; + #ifdef RAMP_ACCELERATION + case 201: // M201 + if(code_seen('X')) x_steps_per_sqr_second = code_value() * x_steps_per_unit; + if(code_seen('Y')) x_steps_per_sqr_second = code_value() * y_steps_per_unit; + break; + case 202: // M202 + if(code_seen('X')) x_travel_steps_per_sqr_second = code_value() * x_steps_per_unit; + if(code_seen('Y')) x_travel_steps_per_sqr_second = code_value() * y_steps_per_unit; + break; + #endif } } |