Whitespace cleanup

This commit is contained in:
Scott Lahteine
2020-09-20 18:24:05 -05:00
parent 584a8cd1a8
commit 5a35595a3a
14 changed files with 40 additions and 41 deletions

View File

@ -194,7 +194,7 @@ ENCODER_DiffState Encoder_ReceiveAnalyze(void) {
unsigned char temp_Counter;
for (temp_Counter = 0; temp_Counter < LED_NUM; temp_Counter++) {
LED_DataArray[temp_Counter] = 0;
switch(RGB_Scale) {
switch (RGB_Scale) {
case RGB_SCALE_R10_G7_B5: LED_DataArray[temp_Counter] = (luminance*10/10) << 8 | (luminance*7/10) << 16 | luminance*5/10; break;
case RGB_SCALE_R10_G7_B4: LED_DataArray[temp_Counter] = (luminance*10/10) << 8 | (luminance*7/10) << 16 | luminance*4/10; break;
case RGB_SCALE_R10_G8_B7: LED_DataArray[temp_Counter] = (luminance*10/10) << 8 | (luminance*8/10) << 16 | luminance*7/10; break;
@ -213,7 +213,7 @@ ENCODER_DiffState Encoder_ReceiveAnalyze(void) {
bool LED_R_Flag = 0, LED_G_Flag = 0, LED_B_Flag = 0;
for (temp_Counter = 0; temp_Counter < LED_NUM; temp_Counter++) {
switch(RGB_Scale) {
switch (RGB_Scale) {
case RGB_SCALE_R10_G7_B5: {
LED_R_Data[temp_Counter] = luminance*10/10;
LED_G_Data[temp_Counter] = luminance*7/10;

View File

@ -27,8 +27,8 @@
#include "../../../../inc/MarlinConfig.h"
#include "../../ui_api.h"
#include "../../../../MarlinCore.h" // for quickstop_stepper and disable_steppers
#include "../../../../module/motion.h" // for A20 read printing speed feedrate_percentage
#include "../../../../MarlinCore.h" // for quickstop_stepper and disable_steppers
#include "../../../../module/motion.h" // for A20 read printing speed feedrate_percentage
// command sending macro's with debugging capability
#define SEND_PGM(x) send_P(PSTR(x))

View File

@ -161,7 +161,7 @@ typedef struct {
uint8_t waitEndMoves;
uint16_t moveSpeed;
float move_dist;
uint8_t F[4];
uint8_t F[4];
} UI_CFG;
typedef enum {

View File

@ -33,10 +33,10 @@
#define ILI9341_MADCTL_RGB 0x00
#define ILI9341_MADCTL_MH 0x04 // Horizontal Refresh Order
#define ILI9341_ORIENTATION_UP ILI9341_MADCTL_MY // 240x320 ; Cable on the upper side
#define ILI9341_ORIENTATION_UP ILI9341_MADCTL_MY // 240x320 ; Cable on the upper side
#define ILI9341_ORIENTATION_RIGHT ILI9341_MADCTL_MV // 320x240 ; Cable on the right side
#define ILI9341_ORIENTATION_LEFT ILI9341_MADCTL_MY | ILI9341_MADCTL_MX | ILI9341_MADCTL_MV // 320x240 ; Cable on the left side
#define ILI9341_ORIENTATION_DOWN ILI9341_MADCTL_MX // 240x320 ; Cable on the upper side
#define ILI9341_ORIENTATION_DOWN ILI9341_MADCTL_MX // 240x320 ; Cable on the upper side
#ifndef ILI9341_COLOR_RGB
#define ILI9341_COLOR_BGR

View File

@ -33,7 +33,7 @@
#define ST7735_MADCTL_RGB 0x00
#define ST7735_MADCTL_MH 0x04 // Horizontal Refresh Order
#define ST7735_ORIENTATION_UP 0x00 // 128x160 ; Cable on the upper side
#define ST7735_ORIENTATION_UP 0x00 // 128x160 ; Cable on the upper side
#define ST7735_ORIENTATION_RIGHT ST7735_MADCTL_MV | ST7735_MADCTL_MY // 160x128 ; Cable on the right side
#define ST7735_ORIENTATION_LEFT ST7735_MADCTL_MV | ST7735_MADCTL_MX // 160x128 ; Cable on the left side
#define ST7735_ORIENTATION_DOWN ST7735_MADCTL_MX | ST7735_MADCTL_MY // 128x160 ; Cable on the lower side
@ -71,7 +71,7 @@
#define ST7735_IDMOFF 0x38 // Idle Mode Off
#define ST7735_IDMON 0x39 // Idle Mode On
#define ST7735_COLMOD 0x3A // Interface Pixel Format
#define ST7735_RDID1 0xDA // Read ID1 Value
#define ST7735_RDID1 0xDA // Read ID1 Value
#define ST7735_RDID2 0xDB // Read ID2 Value
#define ST7735_RDID3 0xDC // Read ID3 Value

View File

@ -89,7 +89,7 @@
#define ST7789V_WRCABCMB 0x5E // Write CABC Minimum Brightness
#define ST7789V_RDCABCMB 0x5F // Read CABC Minimum Brightness
#define ST7789V_RDABCSDR 0x68 // Read Automatic Brightness Control Self-Diagnostic Result
#define ST7789V_RDID1 0xDA // Read ID1 Value
#define ST7789V_RDID1 0xDA // Read ID1 Value
#define ST7789V_RDID2 0xDB // Read ID2 Value
#define ST7789V_RDID3 0xDC // Read ID3 Value

View File

@ -133,8 +133,8 @@ static const uint16_t st7796s_init[] = {
ESC_REG(ST7796S_DOCA), 0x0040, 0x008A, 0x0000, 0x0000, 0x0029, 0x0019, 0x00A5, 0x0033,
/* Gamma Correction. */
ESC_REG(ST7796S_PGC), 0x00F0, 0x0004, 0x0008, 0x0009, 0x0008, 0x0015, 0x002F, 0x0042, 0x0046, 0x0028, 0x0015, 0x0016, 0x0029, 0x002D,
ESC_REG(ST7796S_NGC), 0x00F0, 0x0004, 0x0009, 0x0009, 0x0008, 0x0015, 0x002E, 0x0046, 0x0046, 0x0028, 0x0015, 0x0015, 0x0029, 0x002D,
ESC_REG(ST7796S_PGC), 0x00F0, 0x0004, 0x0008, 0x0009, 0x0008, 0x0015, 0x002F, 0x0042, 0x0046, 0x0028, 0x0015, 0x0016, 0x0029, 0x002D,
ESC_REG(ST7796S_NGC), 0x00F0, 0x0004, 0x0009, 0x0009, 0x0008, 0x0015, 0x002E, 0x0046, 0x0046, 0x0028, 0x0015, 0x0015, 0x0029, 0x002D,
ESC_REG(ST7796S_NORON),
ESC_REG(ST7796S_WRCTRLD), 0x0024,
@ -146,30 +146,30 @@ static const uint16_t st7796s_init[] = {
static const uint16_t lerdge_st7796s_init[] = {
DATASIZE_8BIT,
ESC_REG(ST7796S_CSCON), 0x00C3, // enable command 2 part I
ESC_REG(ST7796S_CSCON), 0x0096, // enable command 2 part II
ESC_REG(ST7796S_CSCON), 0x00C3, // enable command 2 part I
ESC_REG(ST7796S_CSCON), 0x0096, // enable command 2 part II
ESC_REG(ST7796S_MADCTL), ST7796S_MADCTL_DATA,
ESC_REG(ST7796S_MADCTL), ST7796S_MADCTL_DATA,
ESC_REG(ST7796S_COLMOD), 0x0055,
ESC_REG(ST7796S_DIC), 0x0001, // 1-dot inversion
ESC_REG(ST7796S_EM), 0x00C6,
ESC_REG(ST7796S_DIC), 0x0001, // 1-dot inversion
ESC_REG(ST7796S_EM), 0x00C6,
ESC_REG(ST7796S_PWR2), 0x0015,
ESC_REG(ST7796S_PWR3), 0x00AF,
ESC_REG(0xC3), 0x0009, // Register not documented in datasheet
ESC_REG(ST7796S_VCMPCTL), 0x0022,
ESC_REG(ST7796S_VCMOST), 0x0000,
ESC_REG(ST7796S_DOCA), 0x0040, 0x008A, 0x0000, 0x0000, 0x0029, 0x0019, 0x00A5, 0x0033,
ESC_REG(ST7796S_PWR2), 0x0015,
ESC_REG(ST7796S_PWR3), 0x00AF,
ESC_REG(0xC3), 0x0009, // Register not documented in datasheet
ESC_REG(ST7796S_VCMPCTL), 0x0022,
ESC_REG(ST7796S_VCMOST), 0x0000,
ESC_REG(ST7796S_DOCA), 0x0040, 0x008A, 0x0000, 0x0000, 0x0029, 0x0019, 0x00A5, 0x0033,
/* Gamma Correction. */
ESC_REG(ST7796S_PGC), 0x00F0, 0x0004, 0x0008, 0x0009, 0x0008, 0x0015, 0x002F, 0x0042, 0x0046, 0x0028, 0x0015, 0x0016, 0x0029, 0x002D,
ESC_REG(ST7796S_NGC), 0x00F0, 0x0004, 0x0009, 0x0009, 0x0008, 0x0015, 0x002E, 0x0046, 0x0046, 0x0028, 0x0015, 0x0015, 0x0029, 0x002D,
ESC_REG(ST7796S_PGC), 0x00F0, 0x0004, 0x0008, 0x0009, 0x0008, 0x0015, 0x002F, 0x0042, 0x0046, 0x0028, 0x0015, 0x0016, 0x0029, 0x002D,
ESC_REG(ST7796S_NGC), 0x00F0, 0x0004, 0x0009, 0x0009, 0x0008, 0x0015, 0x002E, 0x0046, 0x0046, 0x0028, 0x0015, 0x0015, 0x0029, 0x002D,
ESC_REG(ST7796S_INVON), // Display inversion ON
ESC_REG(ST7796S_WRCTRLD), 0x0024,
ESC_REG(ST7796S_CSCON), 0x003C, // disable command 2 part I
ESC_REG(ST7796S_CSCON), 0x0069, // disable command 2 part II
ESC_REG(ST7796S_DISPON),
ESC_REG(ST7796S_INVON), // Display inversion ON
ESC_REG(ST7796S_WRCTRLD), 0x0024,
ESC_REG(ST7796S_CSCON), 0x003C, // disable command 2 part I
ESC_REG(ST7796S_CSCON), 0x0069, // disable command 2 part II
ESC_REG(ST7796S_DISPON),
ESC_END
};

View File

@ -603,7 +603,7 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const
touch.clear();
if (calibration_stage < CALIBRATION_SUCCESS) {
switch(calibration_stage) {
switch (calibration_stage) {
case CALIBRATION_POINT_1: tft_string.set("Top Left"); break;
case CALIBRATION_POINT_2: y = TFT_HEIGHT - 21; tft_string.set("Bottom Left"); break;
case CALIBRATION_POINT_3: x = TFT_WIDTH - 21; tft_string.set("Top Right"); break;

View File

@ -608,7 +608,7 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const
touch.clear();
if (calibration_stage < CALIBRATION_SUCCESS) {
switch(calibration_stage) {
switch (calibration_stage) {
case CALIBRATION_POINT_1: tft_string.set("Top Left"); break;
case CALIBRATION_POINT_2: y = TFT_HEIGHT - 21; tft_string.set("Bottom Left"); break;
case CALIBRATION_POINT_3: x = TFT_WIDTH - 21; tft_string.set("Top Right"); break;