Browse Source

Spacing, defined(), #include tweaks

pull/1/head
Scott Lahteine 5 years ago
parent
commit
d25231aea8
  1. 2
      Marlin/src/HAL/HAL_AVR/fast_pwm.cpp
  2. 3
      Marlin/src/HAL/HAL_ESP32/HAL_spi_ESP32.cpp
  3. 1
      Marlin/src/HAL/HAL_ESP32/web.cpp
  4. 6
      Marlin/src/HAL/HAL_STM32_F4_F7/STM32F7/TMC2660.cpp
  5. 3
      Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/screen_types.h
  6. 6
      buildroot/share/PlatformIO/variants/BIGTREE_GENERIC_STM32F407_5X/variant.h

2
Marlin/src/HAL/HAL_AVR/fast_pwm.cpp

@ -65,7 +65,7 @@ Timer get_pwm_timer(const pin_t pin) {
/*n, q*/ 2, 0 /*n, q*/ 2, 0
}; };
} }
#elif defined TCCR2A #elif defined(TCCR2A)
#if ENABLED(USE_OCR2A_AS_TOP) #if ENABLED(USE_OCR2A_AS_TOP)
case TIMER2A: break; // protect TIMER2A case TIMER2A: break; // protect TIMER2A
case TIMER2B: { case TIMER2B: {

3
Marlin/src/HAL/HAL_ESP32/HAL_spi_ESP32.cpp

@ -27,9 +27,10 @@
#include "../shared/HAL_SPI.h" #include "../shared/HAL_SPI.h"
#include <pins_arduino.h> #include <pins_arduino.h>
#include "spi_pins.h" #include "spi_pins.h"
#include "../../core/macros.h"
#include <SPI.h> #include <SPI.h>
#include "../../core/macros.h"
// ------------------------ // ------------------------
// Public Variables // Public Variables
// ------------------------ // ------------------------

1
Marlin/src/HAL/HAL_ESP32/web.cpp

@ -27,6 +27,7 @@
#if ENABLED(WEBSUPPORT) #if ENABLED(WEBSUPPORT)
#include <SPIFFS.h> #include <SPIFFS.h>
#include "wifi.h" #include "wifi.h"
AsyncEventSource events("/events"); // event source (Server-Sent events) AsyncEventSource events("/events"); // event source (Server-Sent events)

6
Marlin/src/HAL/HAL_STM32_F4_F7/STM32F7/TMC2660.cpp

@ -313,10 +313,12 @@ void TMC26XStepper::setCurrent(uint16_t current) {
current_scaling = (byte)((resistor_value * mASetting * 32.0 / (0.165 * sq(1000.0))) - 0.5); //theoretically - 1.0 for better rounding it is 0.5 current_scaling = (byte)((resistor_value * mASetting * 32.0 / (0.165 * sq(1000.0))) - 0.5); //theoretically - 1.0 for better rounding it is 0.5
#ifdef TMC_DEBUG0 // crashes #ifdef TMC_DEBUG0 // crashes
SERIAL_ECHOPAIR("\nCS (Vsense=1): ",current_scaling); SERIAL_ECHOPAIR("\nCS (Vsense=1): ",current_scaling);
} else {
SERIAL_ECHOPAIR("\nCS: ", current_scaling);
#endif #endif
} }
#ifdef TMC_DEBUG0 // crashes
else
SERIAL_ECHOPAIR("\nCS: ", current_scaling);
#endif
// do some sanity checks // do some sanity checks
NOMORE(current_scaling, 31); NOMORE(current_scaling, 31);

3
Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/screen_types.h

@ -201,7 +201,8 @@ class CachedScreen {
if (dlcache.has_data()) { if (dlcache.has_data()) {
dlcache.append(); dlcache.append();
} else { }
else {
current_screen.onRedraw(BACKGROUND); current_screen.onRedraw(BACKGROUND);
dlcache.store(DL_SIZE); dlcache.store(DL_SIZE);
} }

6
buildroot/share/PlatformIO/variants/BIGTREE_GENERIC_STM32F407_5X/variant.h

@ -47,15 +47,15 @@ extern const PinName digitalPin[];
#define STM32F4X_PIN_NUM 64 //64 pins mcu, 51 gpio #define STM32F4X_PIN_NUM 64 //64 pins mcu, 51 gpio
#define STM32F4X_GPIO_NUM 51 #define STM32F4X_GPIO_NUM 51
#define STM32F4X_ADC_NUM 16 #define STM32F4X_ADC_NUM 16
#elif defined STM32F407_5VX #elif defined(STM32F407_5VX)
#define STM32F4X_PIN_NUM 100 //100 pins mcu, 82 gpio #define STM32F4X_PIN_NUM 100 //100 pins mcu, 82 gpio
#define STM32F4X_GPIO_NUM 82 #define STM32F4X_GPIO_NUM 82
#define STM32F4X_ADC_NUM 16 #define STM32F4X_ADC_NUM 16
#elif defined STM32F407_5ZX #elif defined(STM32F407_5ZX)
#define STM32F4X_PIN_NUM 144 //144 pins mcu, 114 gpio #define STM32F4X_PIN_NUM 144 //144 pins mcu, 114 gpio
#define STM32F4X_GPIO_NUM 114 #define STM32F4X_GPIO_NUM 114
#define STM32F4X_ADC_NUM 24 #define STM32F4X_ADC_NUM 24
#elif defined STM32F407IX #elif defined(STM32F407IX)
#define STM32F4X_PIN_NUM 176 //176 pins mcu, 140 gpio #define STM32F4X_PIN_NUM 176 //176 pins mcu, 140 gpio
#define STM32F4X_GPIO_NUM 140 #define STM32F4X_GPIO_NUM 140
#define STM32F4X_ADC_NUM 24 #define STM32F4X_ADC_NUM 24

Loading…
Cancel
Save