Skip to content

Commit

Permalink
Misc cleanup, whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Feb 1, 2020
1 parent e64b7a3 commit 43d3463
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/feature/baricuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
*/

#include "../inc/MarlinConfig.h"
#include "../inc/MarlinConfigPre.h"

#if ENABLED(BARICUDA)

Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/module/stepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
5 changes: 2 additions & 3 deletions Marlin/src/module/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/pins/sam/pins_CNCONTROLS_15D.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

//
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/sd/SdVolume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

2 comments on commit 43d3463

@GeminiServer
Copy link
Contributor

@GeminiServer GeminiServer commented on 43d3463 Feb 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

          #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)); \

This change breaks the functionality. Please revert or fix.

@thinkyhead
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ach, of course! Thank you. ee6003b

Please sign in to comment.