More IntelliSense-friendly declarations

This commit is contained in:
Scott Lahteine
2021-03-24 05:40:28 -05:00
committed by Scott Lahteine
parent da4b6896f7
commit 2d2291d00e
32 changed files with 562 additions and 203 deletions

View File

@ -46,7 +46,9 @@ Nozzle nozzle;
* @param strokes number of strokes to execute
*/
void Nozzle::stroke(const xyz_pos_t &start, const xyz_pos_t &end, const uint8_t &strokes) {
TERN_(NOZZLE_CLEAN_GOBACK, const xyz_pos_t oldpos = current_position);
#if ENABLED(NOZZLE_CLEAN_GOBACK)
const xyz_pos_t oldpos = current_position;
#endif
// Move to the starting point
#if ENABLED(NOZZLE_CLEAN_NO_Z)
@ -86,7 +88,9 @@ Nozzle nozzle;
const xy_pos_t diff = end - start;
if (!diff.x || !diff.y) return;
TERN_(NOZZLE_CLEAN_GOBACK, const xyz_pos_t back = current_position);
#if ENABLED(NOZZLE_CLEAN_GOBACK)
const xyz_pos_t back = current_position;
#endif
#if ENABLED(NOZZLE_CLEAN_NO_Z)
do_blocking_move_to_xy(start);
@ -129,7 +133,9 @@ Nozzle nozzle;
void Nozzle::circle(const xyz_pos_t &start, const xyz_pos_t &middle, const uint8_t &strokes, const float &radius) {
if (strokes == 0) return;
TERN_(NOZZLE_CLEAN_GOBACK, const xyz_pos_t back = current_position);
#if ENABLED(NOZZLE_CLEAN_GOBACK)
const xyz_pos_t back = current_position;
#endif
TERN(NOZZLE_CLEAN_NO_Z, do_blocking_move_to_xy, do_blocking_move_to)(start);
LOOP_L_N(s, strokes)