From 43d3463d5d612a300789bdc7a845eb2e8a37786d Mon Sep 17 00:00:00 2001
From: Scott Lahteine <github@thinkyhead.com>
Date: Sat, 1 Feb 2020 03:50:26 -0600
Subject: [PATCH] Misc cleanup, whitespace

---
 Marlin/src/feature/baricuda.cpp           | 2 +-
 Marlin/src/module/stepper.cpp             | 6 +++---
 Marlin/src/module/temperature.cpp         | 5 ++---
 Marlin/src/pins/sam/pins_CNCONTROLS_15D.h | 6 +++---
 Marlin/src/sd/SdVolume.cpp                | 2 +-
 5 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/Marlin/src/feature/baricuda.cpp b/Marlin/src/feature/baricuda.cpp
index 82e0a5f14f..354e8482a5 100644
--- a/Marlin/src/feature/baricuda.cpp
+++ b/Marlin/src/feature/baricuda.cpp
@@ -20,7 +20,7 @@
  *
  */
 
-#include "../inc/MarlinConfig.h"
+#include "../inc/MarlinConfigPre.h"
 
 #if ENABLED(BARICUDA)
 
diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp
index 4e46ea56cd..90848c99d1 100644
--- a/Marlin/src/module/stepper.cpp
+++ b/Marlin/src/module/stepper.cpp
@@ -2460,10 +2460,10 @@ void Stepper::report_positions() {
 
   #define BABYSTEP_AXIS(AXIS, INVERT, DIR) {            \
       const uint8_t old_dir = _READ_DIR(AXIS);          \
-      _ENABLE_AXIS(AXIS);                                    \
-      DELAY_NS(MINIMUM_STEPPER_PRE_DIR_DELAY);              \
+      _ENABLE_AXIS(AXIS);                               \
+      DELAY_NS(MINIMUM_STEPPER_PRE_DIR_DELAY);          \
       _APPLY_DIR(AXIS, _INVERT_DIR(AXIS)^DIR^INVERT);   \
-      DELAY_NS(MINIMUM_STEPPER_POST_DIR_DELAY);              \
+      DELAY_NS(MINIMUM_STEPPER_POST_DIR_DELAY);         \
       _SAVE_START;                                      \
       _APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS), true); \
       _PULSE_WAIT;                                      \
diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp
index 702f82e770..d90a2123d1 100644
--- a/Marlin/src/module/temperature.cpp
+++ b/Marlin/src/module/temperature.cpp
@@ -2608,9 +2608,8 @@ void Temperature::tick() {
 
       #if ENABLED(FAN_SOFT_PWM)
         #define _FAN_PWM(N) do{ \
-          uint8_t &spcf = soft_pwm_count_fan[N]; \
-          spcf = (spcf & pwm_mask) + (soft_pwm_amount_fan[N] >> 1); \
-          WRITE_FAN(N, spcf > pwm_mask ? HIGH : LOW); \
+          const uint8_t spcf = (soft_pwm_count_fan[N] & pwm_mask) + (soft_pwm_amount_fan[N] >> 1); \
+          WRITE_FAN(N, (spcf > pwm_mask)); \
         }while(0)
         #if HAS_FAN0
           _FAN_PWM(0);
diff --git a/Marlin/src/pins/sam/pins_CNCONTROLS_15D.h b/Marlin/src/pins/sam/pins_CNCONTROLS_15D.h
index fe9bfb9afd..6238b82588 100644
--- a/Marlin/src/pins/sam/pins_CNCONTROLS_15D.h
+++ b/Marlin/src/pins/sam/pins_CNCONTROLS_15D.h
@@ -52,11 +52,11 @@
 // Analog Inputs
 //
 #define TEMP_0_PIN          1
-#define TEMP_1_PIN          2  
-#define TEMP_BED_PIN        4   
+#define TEMP_1_PIN          2
+#define TEMP_BED_PIN        4
 
 #ifndef TEMP_CHAMBER_PIN
-  #define TEMP_CHAMBER_PIN  5   
+  #define TEMP_CHAMBER_PIN  5
 #endif
 
 //
diff --git a/Marlin/src/sd/SdVolume.cpp b/Marlin/src/sd/SdVolume.cpp
index 70dfa52e30..1db562a80a 100644
--- a/Marlin/src/sd/SdVolume.cpp
+++ b/Marlin/src/sd/SdVolume.cpp
@@ -292,7 +292,7 @@ int32_t SdVolume::freeClusterCount() {
         if (cacheBuffer_.fat32[i] == 0) free++;
     }
     #ifdef ESP32
-      // Needed to reset the idle task watchdog timer on ESP32 as reading the complete FAT may easily 
+      // Needed to reset the idle task watchdog timer on ESP32 as reading the complete FAT may easily
       // block for 10+ seconds. yield() is insufficient since it blocks lower prio tasks (e.g., idle).
       static millis_t nextTaskTime = 0;
       const millis_t ms = millis();
-- 
GitLab