🎨 Fix comments, formatting

This commit is contained in:
Scott Lahteine 2022-06-20 21:15:57 -05:00 committed by Scott Lahteine
parent 6f51f19257
commit bf084254da
3 changed files with 12 additions and 19 deletions

View file

@ -489,13 +489,10 @@ void MarlinUI::init() {
ui.manual_move.menu_scale = REPRAPWORLD_KEYPAD_MOVE_STEP;
ui.encoderPosition = dir;
switch (axis) {
case X_AXIS: { void lcd_move_x(); lcd_move_x(); } break;
#if HAS_Y_AXIS
case Y_AXIS: { void lcd_move_y(); lcd_move_y(); } break;
#endif
#if HAS_Z_AXIS
case Z_AXIS: { void lcd_move_z(); lcd_move_z(); } break;
#endif
case X_AXIS:
TERN_(HAS_Y_AXIS, case Y_AXIS:)
TERN_(HAS_Z_AXIS, case Z_AXIS:)
lcd_move_axis(axis);
default: break;
}
}

View file

@ -2073,9 +2073,9 @@ bool Planner::_populate_block(
TERN_(HAS_K_AXIS, steps_dist_mm.k = dk * mm_per_step[K_AXIS]);
#elif ENABLED(MARKFORGED_XY)
steps_dist_mm.a = (da - db) * mm_per_step[A_AXIS];
steps_dist_mm.b = db * mm_per_step[B_AXIS];
steps_dist_mm.b = db * mm_per_step[B_AXIS];
#elif ENABLED(MARKFORGED_YX)
steps_dist_mm.a = da * mm_per_step[A_AXIS];
steps_dist_mm.a = da * mm_per_step[A_AXIS];
steps_dist_mm.b = (db - da) * mm_per_step[B_AXIS];
#else
XYZ_CODE(
@ -2134,16 +2134,16 @@ bool Planner::_populate_block(
sq(steps_dist_mm.x) + sq(steps_dist_mm.y)
#endif
#else
XYZ_GANG(sq(steps_dist_mm.x), + sq(steps_dist_mm.y), + sq(steps_dist_mm.z))
XYZ_GANG(sq(steps_dist_mm.x), + sq(steps_dist_mm.y), + sq(steps_dist_mm.z))
#endif
);
}
/**
* At this point at least one of the axes has more steps than
* MIN_STEPS_PER_SEGMENT, ensuring the segment won't get dropped as
* zero-length. It's important to not apply corrections
* to blocks that would get dropped!
* MIN_STEPS_PER_SEGMENT, ensuring the segment won't get dropped
* as zero-length. It's important to not apply corrections to blocks
* that would get dropped!
*
* A correction function is permitted to add steps to an axis, it
* should *never* remove steps!

View file

@ -942,9 +942,7 @@ void reset_trinamic_drivers() {
struct SanityHwSerialDetails { const char port[20]; uint32_t address; };
#define TMC_HW_DETAIL_ARGS(A) TERN(A##_HAS_HW_SERIAL, STRINGIFY(A##_HARDWARE_SERIAL), ""), TERN0(A##_HAS_HW_SERIAL, A##_SLAVE_ADDRESS)
#define TMC_HW_DETAIL(A) { TMC_HW_DETAIL_ARGS(A) }
constexpr SanityHwSerialDetails sanity_tmc_hw_details[] = {
MAPLIST(TMC_HW_DETAIL, ALL_AXIS_NAMES)
};
constexpr SanityHwSerialDetails sanity_tmc_hw_details[] = { MAPLIST(TMC_HW_DETAIL, ALL_AXIS_NAMES) };
// constexpr compatible string comparison
constexpr bool str_eq_ce(const char * a, const char * b) {
@ -969,9 +967,7 @@ void reset_trinamic_drivers() {
struct SanitySwSerialDetails { int32_t txpin; int32_t rxpin; uint32_t address; };
#define TMC_SW_DETAIL_ARGS(A) TERN(A##_HAS_SW_SERIAL, A##_SERIAL_TX_PIN, -1), TERN(A##_HAS_SW_SERIAL, A##_SERIAL_RX_PIN, -1), TERN0(A##_HAS_SW_SERIAL, A##_SLAVE_ADDRESS)
#define TMC_SW_DETAIL(A) { TMC_SW_DETAIL_ARGS(A) }
constexpr SanitySwSerialDetails sanity_tmc_sw_details[] = {
MAPLIST(TMC_SW_DETAIL, ALL_AXIS_NAMES)
};
constexpr SanitySwSerialDetails sanity_tmc_sw_details[] = { MAPLIST(TMC_SW_DETAIL, ALL_AXIS_NAMES) };
constexpr bool sc_sw_done(size_t start, size_t end) { return start == end; }
constexpr bool sc_sw_skip(int32_t txpin) { return txpin < 0; }