Browse Source

Fix some trailing whitespace, macros

Scott Lahteine 6 years ago
parent
commit
c5e5cc5e9f

+ 3
- 3
Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp View File

397
 
397
 
398
     #if IS_KINEMATIC
398
     #if IS_KINEMATIC
399
       const float seconds = cartesian_xy_mm / feedrate;                                  // seconds to move xy distance at requested rate
399
       const float seconds = cartesian_xy_mm / feedrate;                                  // seconds to move xy distance at requested rate
400
-      uint16_t segments = lroundf(delta_segments_per_second * seconds),                  // preferred number of segments for distance @ feedrate
401
-               seglimit = lroundf(cartesian_xy_mm * (1.0f / (DELTA_SEGMENT_MIN_LENGTH))); // number of segments at minimum segment length
400
+      uint16_t segments = LROUND(delta_segments_per_second * seconds),                  // preferred number of segments for distance @ feedrate
401
+               seglimit = LROUND(cartesian_xy_mm * (1.0f / (DELTA_SEGMENT_MIN_LENGTH))); // number of segments at minimum segment length
402
       NOMORE(segments, seglimit);                                                        // limit to minimum segment length (fewer segments)
402
       NOMORE(segments, seglimit);                                                        // limit to minimum segment length (fewer segments)
403
     #else
403
     #else
404
-      uint16_t segments = lroundf(cartesian_xy_mm * (1.0f / (DELTA_SEGMENT_MIN_LENGTH))); // cartesian fixed segment length
404
+      uint16_t segments = LROUND(cartesian_xy_mm * (1.0f / (DELTA_SEGMENT_MIN_LENGTH))); // cartesian fixed segment length
405
     #endif
405
     #endif
406
 
406
 
407
     NOLESS(segments, 1U);                        // must have at least one segment
407
     NOLESS(segments, 1U);                        // must have at least one segment

+ 1
- 1
Marlin/src/gcode/calibrate/G33.cpp View File

273
         for (int8_t circle = 0; circle <= offset; circle++) {
273
         for (int8_t circle = 0; circle <= offset; circle++) {
274
           const float a = RADIANS(210 + (360 / NPP) *  (rad - 1)),
274
           const float a = RADIANS(210 + (360 / NPP) *  (rad - 1)),
275
                       r = delta_calibration_radius * (1 - 0.1 * (zig_zag ? offset - circle : circle)),
275
                       r = delta_calibration_radius * (1 - 0.1 * (zig_zag ? offset - circle : circle)),
276
-                      interpol = fmod(rad, 1);
276
+                      interpol = FMOD(rad, 1);
277
           const float z_temp = calibration_probe(cos(a) * r, sin(a) * r, stow_after_each, set_up);
277
           const float z_temp = calibration_probe(cos(a) * r, sin(a) * r, stow_after_each, set_up);
278
           if (isnan(z_temp)) return false;
278
           if (isnan(z_temp)) return false;
279
           // split probe point to neighbouring calibration points
279
           // split probe point to neighbouring calibration points

+ 4
- 4
Marlin/src/lcd/ultralcd.cpp View File

1056
         ? PSTR("M605 S1\nT0\nG28\nM605 S2 X200\nG28 X\nG1 X100")                // If Y or Z is not homed, do a full G28 first
1056
         ? PSTR("M605 S1\nT0\nG28\nM605 S2 X200\nG28 X\nG1 X100")                // If Y or Z is not homed, do a full G28 first
1057
         : PSTR("M605 S1\nT0\nM605 S2 X200\nG28 X\nG1 X100")
1057
         : PSTR("M605 S1\nT0\nM605 S2 X200\nG28 X\nG1 X100")
1058
       );
1058
       );
1059
-//    MENU_ITEM(gcode, MSG_IDEX_MODE_SCALED_COPY, need_g28
1060
-//      ? PSTR("M605 S1\nT0\nG28\nM605 S2 X200\nG28 X\nG1 X100\nM605 S3 X200")  // If Y or Z is not homed, do a full G28 first
1061
-//      : PSTR("M605 S1\nT0\nM605 S2 X200\nG28 X\nG1 X100\nM605 S3 X200")
1062
-//    );
1059
+      //MENU_ITEM(gcode, MSG_IDEX_MODE_SCALED_COPY, need_g28
1060
+      //  ? PSTR("M605 S1\nT0\nG28\nM605 S2 X200\nG28 X\nG1 X100\nM605 S3 X200")  // If Y or Z is not homed, do a full G28 first
1061
+      //  : PSTR("M605 S1\nT0\nM605 S2 X200\nG28 X\nG1 X100\nM605 S3 X200")
1062
+      //);
1063
       MENU_ITEM(gcode, MSG_IDEX_MODE_FULL_CTRL, PSTR("M605 S0\nG28 X"));
1063
       MENU_ITEM(gcode, MSG_IDEX_MODE_FULL_CTRL, PSTR("M605 S0\nG28 X"));
1064
       MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_IDEX_X_OFFSET , &hotend_offset[X_AXIS][1], MIN(X2_HOME_POS, X2_MAX_POS) - 25.0, MAX(X2_HOME_POS, X2_MAX_POS) + 25.0, _recalc_IDEX_settings);
1064
       MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_IDEX_X_OFFSET , &hotend_offset[X_AXIS][1], MIN(X2_HOME_POS, X2_MAX_POS) - 25.0, MAX(X2_HOME_POS, X2_MAX_POS) + 25.0, _recalc_IDEX_settings);
1065
       MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_IDEX_Y_OFFSET , &hotend_offset[Y_AXIS][1], -10.0, 10.0, _recalc_IDEX_settings);
1065
       MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_IDEX_Y_OFFSET , &hotend_offset[Y_AXIS][1], -10.0, 10.0, _recalc_IDEX_settings);

+ 1
- 1
Marlin/src/module/motion.cpp View File

582
                   ediff * inv_segments
582
                   ediff * inv_segments
583
                 },
583
                 },
584
                 cartesian_segment_mm = cartesian_mm * inv_segments;
584
                 cartesian_segment_mm = cartesian_mm * inv_segments;
585
-    
585
+
586
     #if ENABLED(SCARA_FEEDRATE_SCALING)
586
     #if ENABLED(SCARA_FEEDRATE_SCALING)
587
       const float inv_duration = _feedrate_mm_s / cartesian_segment_mm;
587
       const float inv_duration = _feedrate_mm_s / cartesian_segment_mm;
588
     #endif
588
     #endif

+ 2
- 2
Marlin/src/module/planner.cpp View File

2642
  *  fr_mm_s      - (target) speed of the move (mm/s)
2642
  *  fr_mm_s      - (target) speed of the move (mm/s)
2643
  *  extruder     - target extruder
2643
  *  extruder     - target extruder
2644
  *  millimeters  - the length of the movement, if known
2644
  *  millimeters  - the length of the movement, if known
2645
- *  inv_duration - the reciprocal if the duration of the movement, if known (kinematic only if feeedrate scaling is enabled) 
2645
+ *  inv_duration - the reciprocal if the duration of the movement, if known (kinematic only if feeedrate scaling is enabled)
2646
  */
2646
  */
2647
 bool Planner::buffer_line(const float &rx, const float &ry, const float &rz, const float &e, const float &fr_mm_s, const uint8_t extruder, const float millimeters
2647
 bool Planner::buffer_line(const float &rx, const float &ry, const float &rz, const float &e, const float &fr_mm_s, const uint8_t extruder, const float millimeters
2648
   #if ENABLED(SCARA_FEEDRATE_SCALING)
2648
   #if ENABLED(SCARA_FEEDRATE_SCALING)
2666
 
2666
 
2667
     float mm = millimeters;
2667
     float mm = millimeters;
2668
     if (mm == 0.0)
2668
     if (mm == 0.0)
2669
-      mm = (delta_mm_cart[X_AXIS] != 0.0 || delta_mm_cart[Y_AXIS] != 0.0) ? SQRT(sq(delta_mm_cart[X_AXIS]) + sq(delta_mm_cart[Y_AXIS]) + sq(delta_mm_cart[Z_AXIS])) : fabs(delta_mm_cart[Z_AXIS]);
2669
+      mm = (delta_mm_cart[X_AXIS] != 0.0 || delta_mm_cart[Y_AXIS] != 0.0) ? SQRT(sq(delta_mm_cart[X_AXIS]) + sq(delta_mm_cart[Y_AXIS]) + sq(delta_mm_cart[Z_AXIS])) : ABS(delta_mm_cart[Z_AXIS]);
2670
 
2670
 
2671
     inverse_kinematics(raw);
2671
     inverse_kinematics(raw);
2672
 
2672
 

+ 3
- 3
Marlin/src/module/planner.h View File

642
      *  fr_mm_s      - (target) speed of the move (mm/s)
642
      *  fr_mm_s      - (target) speed of the move (mm/s)
643
      *  extruder     - target extruder
643
      *  extruder     - target extruder
644
      *  millimeters  - the length of the movement, if known
644
      *  millimeters  - the length of the movement, if known
645
-     *  inv_duration - the reciprocal if the duration of the movement, if known (kinematic only if feeedrate scaling is enabled) 
645
+     *  inv_duration - the reciprocal if the duration of the movement, if known (kinematic only if feeedrate scaling is enabled)
646
      */
646
      */
647
     static bool buffer_line(const float &rx, const float &ry, const float &rz, const float &e, const float &fr_mm_s, const uint8_t extruder, const float millimeters=0.0
647
     static bool buffer_line(const float &rx, const float &ry, const float &rz, const float &e, const float &fr_mm_s, const uint8_t extruder, const float millimeters=0.0
648
       #if ENABLED(SCARA_FEEDRATE_SCALING)
648
       #if ENABLED(SCARA_FEEDRATE_SCALING)
665
     /**
665
     /**
666
      * Set the planner.position and individual stepper positions.
666
      * Set the planner.position and individual stepper positions.
667
      * Used by G92, G28, G29, and other procedures.
667
      * Used by G92, G28, G29, and other procedures.
668
-     * 
668
+     *
669
      * The supplied position is in the cartesian coordinate space and is
669
      * The supplied position is in the cartesian coordinate space and is
670
      * translated in to machine space as needed. Modifiers such as leveling
670
      * translated in to machine space as needed. Modifiers such as leveling
671
      * and skew are also applied.
671
      * and skew are also applied.
681
 
681
 
682
     /**
682
     /**
683
      * Set the planner.position and individual stepper positions.
683
      * Set the planner.position and individual stepper positions.
684
-     * 
684
+     *
685
      * The supplied position is in machine space, and no additional
685
      * The supplied position is in machine space, and no additional
686
      * conversions are applied.
686
      * conversions are applied.
687
      */
687
      */

Loading…
Cancel
Save