Use macros where possible

Apply `constrain`, `NOMORE`, `NOLESS` and `CRITICAL_SECTION` macros
wherever possible.
This commit is contained in:
Scott Lahteine
2016-02-21 22:17:32 -08:00
parent c8f76bb8aa
commit 209f5f21e0
8 changed files with 21 additions and 31 deletions

View File

@ -3076,8 +3076,7 @@ inline void gcode_G28() {
apply_rotation_xyz(plan_bed_level_matrix, x_tmp, y_tmp, z_tmp);
if (eqnBVector[ind] - z_tmp < min_diff)
min_diff = eqnBVector[ind] - z_tmp;
NOMORE(min_diff, eqnBVector[ind] - z_tmp);
if (diff >= 0.0)
SERIAL_PROTOCOLPGM(" +"); // Include + for column alignment
@ -5147,7 +5146,7 @@ inline void gcode_M400() { st_synchronize(); }
*/
inline void gcode_M405() {
if (code_seen('D')) meas_delay_cm = code_value();
if (meas_delay_cm > MAX_MEASUREMENT_DELAY) meas_delay_cm = MAX_MEASUREMENT_DELAY;
NOMORE(meas_delay_cm, MAX_MEASUREMENT_DELAY);
if (delay_index2 == -1) { //initialize the ring buffer if it has not been done since startup
int temp_ratio = widthFil_to_size_ratio();