From dff2904c0f125b806ee63b21a4b27215b389152f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 27 Sep 2017 04:57:14 -0500 Subject: [PATCH] Marlin code whitespace cleanup --- .../gCreate/gMax1.5+/Configuration_adv.h | 6 +++--- Marlin/src/feature/caselight.cpp | 2 +- Marlin/src/feature/dac/dac_dac084s085.cpp | 2 +- Marlin/src/gcode/calibrate/G33.cpp | 2 +- .../src/lcd/dogm/ultralcd_st7565_u8glib_VIKI.h | 16 ++++++++-------- Marlin/src/lcd/ultralcd_impl_DOGM.h | 6 +++--- Marlin/src/module/stepper.h | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h index 7c9dd69589..26e8b4e9d5 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -1392,9 +1392,9 @@ #define MAX7219_DEBUG #if ENABLED(MAX7219_DEBUG) - #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display - #define MAX7219_DIN_PIN 57 // 78 on Re-ARM - #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM + #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display + #define MAX7219_DIN_PIN 57 // 78 on Re-ARM + #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM /** * Sample debug features diff --git a/Marlin/src/feature/caselight.cpp b/Marlin/src/feature/caselight.cpp index 22ace5871b..74a6efdd89 100644 --- a/Marlin/src/feature/caselight.cpp +++ b/Marlin/src/feature/caselight.cpp @@ -26,7 +26,7 @@ uint8_t case_light_brightness = CASE_LIGHT_DEFAULT_BRIGHTNESS; bool case_light_on = CASE_LIGHT_DEFAULT_ON; - + #ifndef INVERT_CASE_LIGHT #define INVERT_CASE_LIGHT false #endif diff --git a/Marlin/src/feature/dac/dac_dac084s085.cpp b/Marlin/src/feature/dac/dac_dac084s085.cpp index c90bf79d72..09ab08b3a8 100644 --- a/Marlin/src/feature/dac/dac_dac084s085.cpp +++ b/Marlin/src/feature/dac/dac_dac084s085.cpp @@ -74,7 +74,7 @@ void dac084s085::setValue(uint8_t channel, uint8_t value) { externalDac_buf[0] |= (value >> 4); externalDac_buf[1] |= (value << 4); - + // All SPI chip-select HIGH digitalWrite( DAC0_SYNC , HIGH ); #if EXTRUDERS > 1 diff --git a/Marlin/src/gcode/calibrate/G33.cpp b/Marlin/src/gcode/calibrate/G33.cpp index abf86d49d2..2fd07806cd 100644 --- a/Marlin/src/gcode/calibrate/G33.cpp +++ b/Marlin/src/gcode/calibrate/G33.cpp @@ -375,7 +375,7 @@ void GcodeSuite::G33() { float a_sum = 0.0; LOOP_XYZ(axis) a_sum += delta_tower_angle_trim[axis]; LOOP_XYZ(axis) delta_tower_angle_trim[axis] -= a_sum / 3.0; - + // adjust delta_height and endstops by the max amount const float z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]); home_offset[Z_AXIS] -= z_temp; diff --git a/Marlin/src/lcd/dogm/ultralcd_st7565_u8glib_VIKI.h b/Marlin/src/lcd/dogm/ultralcd_st7565_u8glib_VIKI.h index 2dc33e0ac5..2f021d9c3e 100644 --- a/Marlin/src/lcd/dogm/ultralcd_st7565_u8glib_VIKI.h +++ b/Marlin/src/lcd/dogm/ultralcd_st7565_u8glib_VIKI.h @@ -142,13 +142,13 @@ uint8_t u8g_dev_st7565_64128n_2x_VIKI_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg ST7565_WRITE_BYTE(0x40); // Display start line for Displaytech 64128N ST7565_WRITE_BYTE(0x28 | 0x04); // power control: turn on voltage converter - //U8G_ESC_DLY(50); // delay 50 ms - hangs after a reset if used + //U8G_ESC_DLY(50); // delay 50 ms - hangs after a reset if used ST7565_WRITE_BYTE(0x28 | 0x06); // power control: turn on voltage regulator - //U8G_ESC_DLY(50); // delay 50 ms - hangs after a reset if used + //U8G_ESC_DLY(50); // delay 50 ms - hangs after a reset if used ST7565_WRITE_BYTE(0x28 | 0x07); // power control: turn on voltage follower - //U8G_ESC_DLY(50); // delay 50 ms - hangs after a reset if used + //U8G_ESC_DLY(50); // delay 50 ms - hangs after a reset if used ST7565_WRITE_BYTE(0x10); // Set V0 voltage resistor ratio. Setting for controlling brightness of Displaytech 64128N @@ -228,12 +228,12 @@ u8g_dev_t u8g_dev_st7565_64128n_2x_VIKI_sw_spi = { u8g_dev_st7565_64128n_2x_VIKI class U8GLIB_ST7565_64128n_2x_VIKI : public U8GLIB { public: - U8GLIB_ST7565_64128n_2x_VIKI(uint8_t dummy) - : U8GLIB(&u8g_dev_st7565_64128n_2x_VIKI_sw_spi) + U8GLIB_ST7565_64128n_2x_VIKI(uint8_t dummy) + : U8GLIB(&u8g_dev_st7565_64128n_2x_VIKI_sw_spi) + { } + U8GLIB_ST7565_64128n_2x_VIKI(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) + : U8GLIB(&u8g_dev_st7565_64128n_2x_VIKI_sw_spi) { } - U8GLIB_ST7565_64128n_2x_VIKI(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) - : U8GLIB(&u8g_dev_st7565_64128n_2x_VIKI_sw_spi) - { } }; #pragma GCC reset_options diff --git a/Marlin/src/lcd/ultralcd_impl_DOGM.h b/Marlin/src/lcd/ultralcd_impl_DOGM.h index 7de8296dad..b9590531a6 100644 --- a/Marlin/src/lcd/ultralcd_impl_DOGM.h +++ b/Marlin/src/lcd/ultralcd_impl_DOGM.h @@ -176,9 +176,9 @@ //U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0); // 8 stripes U8GLIB_LM6059_2X u8g(DOGLCD_CS, DOGLCD_A0); // 4 stripes #elif ENABLED(U8GLIB_ST7565_64128N) - // The MaKrPanel, Mini Viki, and Viki 2.0, ST7565 controller - //U8GLIB_ST7565_64128n_2x_VIKI u8g(0); // using SW-SPI DOGLCD_MOSI != -1 && DOGLCD_SCK - U8GLIB_ST7565_64128n_2x_VIKI u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // using SW-SPI + // The MaKrPanel, Mini Viki, and Viki 2.0, ST7565 controller + //U8GLIB_ST7565_64128n_2x_VIKI u8g(0); // using SW-SPI DOGLCD_MOSI != -1 && DOGLCD_SCK + U8GLIB_ST7565_64128n_2x_VIKI u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // using SW-SPI //U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0); // 8 stripes //U8GLIB_NHD_C12864_2X u8g(DOGLCD_CS, DOGLCD_A0); // 4 stripes HWSPI #elif ENABLED(U8GLIB_SSD1306) diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 01c979b567..d4f198c18f 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -302,7 +302,7 @@ class Stepper { #endif #ifdef CPU_32_BIT - // In case of high-performance processor, it is able to calculate in real-time + // In case of high-performance processor, it is able to calculate in real-time timer = (uint32_t)(HAL_STEPPER_TIMER_RATE) / step_rate; if (timer < (HAL_STEPPER_TIMER_RATE / (STEP_DOUBLER_FREQUENCY * 2))) { // (STEP_DOUBLER_FREQUENCY * 2 kHz - this should never happen) timer = (HAL_STEPPER_TIMER_RATE / (STEP_DOUBLER_FREQUENCY * 2));