Skip to content

Commit

Permalink
🎨 Misc. cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed May 23, 2021
1 parent 2e3ee6c commit 35da461
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 27 deletions.
4 changes: 0 additions & 4 deletions Marlin/src/feature/caselight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ bool CaseLight::on = CASE_LIGHT_DEFAULT_ON;
LEDColor CaseLight::color = { init_case_light[0], init_case_light[1], init_case_light[2], TERN_(HAS_WHITE_LED, init_case_light[3]) };
#endif

#ifndef INVERT_CASE_LIGHT
#define INVERT_CASE_LIGHT false
#endif

void CaseLight::update(const bool sflag) {
#if CASELIGHT_USES_BRIGHTNESS
/**
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/feature/dac/stepper_dac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int StepperDAC::init() {
mcp4728.setVref_all(DAC_STEPPER_VREF);
mcp4728.setGain_all(DAC_STEPPER_GAIN);

if (mcp4728.getDrvPct(0) < 1 || mcp4728.getDrvPct(1) < 1 || mcp4728.getDrvPct(2) < 1 || mcp4728.getDrvPct(3) < 1 ) {
if (mcp4728.getDrvPct(0) < 1 || mcp4728.getDrvPct(1) < 1 || mcp4728.getDrvPct(2) < 1 || mcp4728.getDrvPct(3) < 1) {
mcp4728.setDrvPct(dac_channel_pct);
mcp4728.eepromWrite();
}
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/gcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
#endif

#if ENABLED(AUTO_REPORT_POSITION)
case 154: M154(); break; // M155: Set position auto-report interval
case 154: M154(); break; // M154: Set position auto-report interval
#endif

#if BOTH(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR)
Expand Down
21 changes: 3 additions & 18 deletions Marlin/src/libs/L64XX/L64XX_Marlin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,12 +445,7 @@ uint8_t L64XX_Marlin::get_user_input(uint8_t &driver_count, L64XX_axis_t axis_in
position_min = X_center - displacement;
position_max = X_center + displacement;
echo_min_max('X', position_min, position_max);
if (false
#if HAS_ENDSTOPS
|| position_min < (X_MIN_POS)
|| position_max > (X_MAX_POS)
#endif
) {
if (TERN0(HAS_ENDSTOPS, position_min < (X_MIN_POS) || position_max > (X_MAX_POS))) {
err_out_of_bounds();
return true;
}
Expand All @@ -460,12 +455,7 @@ uint8_t L64XX_Marlin::get_user_input(uint8_t &driver_count, L64XX_axis_t axis_in
position_min = Y_center - displacement;
position_max = Y_center + displacement;
echo_min_max('Y', position_min, position_max);
if (false
#if HAS_ENDSTOPS
|| position_min < (Y_MIN_POS)
|| position_max > (Y_MAX_POS)
#endif
) {
if (TERN0(HAS_ENDSTOPS, position_min < (Y_MIN_POS) || position_max > (Y_MAX_POS))) {
err_out_of_bounds();
return true;
}
Expand All @@ -475,12 +465,7 @@ uint8_t L64XX_Marlin::get_user_input(uint8_t &driver_count, L64XX_axis_t axis_in
position_min = Z_center - displacement;
position_max = Z_center + displacement;
echo_min_max('Z', position_min, position_max);
if (false
#if HAS_ENDSTOPS
|| position_min < (Z_MIN_POS)
|| position_max > (Z_MAX_POS)
#endif
) {
if (TERN0(HAS_ENDSTOPS, position_min < (Z_MIN_POS) || position_max > (Z_MAX_POS))) {
err_out_of_bounds();
return true;
}
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/module/planner.h
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ class Planner {
#if HAS_CLASSIC_JERK
static void set_max_jerk(const AxisEnum axis, float inMaxJerkMMS);
#else
static inline void set_max_jerk(const AxisEnum, const_float_t ) {}
static inline void set_max_jerk(const AxisEnum, const_float_t) {}
#endif

#if HAS_EXTRUDERS
Expand Down Expand Up @@ -592,9 +592,9 @@ class Planner {

#else

FORCE_INLINE static float fade_scaling_factor_for_z(const_float_t ) { return 1; }
FORCE_INLINE static float fade_scaling_factor_for_z(const_float_t) { return 1; }

FORCE_INLINE static bool leveling_active_at_z(const_float_t ) { return true; }
FORCE_INLINE static bool leveling_active_at_z(const_float_t) { return true; }

#endif

Expand Down

0 comments on commit 35da461

Please sign in to comment.