mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Merge pull request #157 from ledvinap/fix-whitespace
Fixed some whitespace around operators
This commit is contained in:
commit
dc3b90c5d0
9 changed files with 40 additions and 41 deletions
|
@ -39,7 +39,7 @@ rgbColor24bpp_t* hsvToRgb24(const hsvColor_t* c)
|
||||||
r.rgb.b = val;
|
r.rgb.b = val;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
base = ((255- sat) * val) >> 8;
|
base = ((255 - sat) * val) >> 8;
|
||||||
|
|
||||||
switch (hue / 60) {
|
switch (hue / 60) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
|
@ -182,7 +182,7 @@ void i2c_OLED_clear_display(void)
|
||||||
i2c_OLED_send_cmd(0x40); // Display start line register to 0
|
i2c_OLED_send_cmd(0x40); // Display start line register to 0
|
||||||
i2c_OLED_send_cmd(0); // Set low col address to 0
|
i2c_OLED_send_cmd(0); // Set low col address to 0
|
||||||
i2c_OLED_send_cmd(0x10); // Set high col address to 0
|
i2c_OLED_send_cmd(0x10); // Set high col address to 0
|
||||||
for(uint16_t i=0; i<1024; i++) { // fill the display's RAM with graphic... 128*64 pixel picture
|
for(uint16_t i = 0; i < 1024; i++) { // fill the display's RAM with graphic... 128*64 pixel picture
|
||||||
i2c_OLED_send_byte(0x00); // clear
|
i2c_OLED_send_byte(0x00); // clear
|
||||||
}
|
}
|
||||||
i2c_OLED_send_cmd(0x81); // Setup CONTRAST CONTROL, following byte is the contrast Value... always a 2 byte instruction
|
i2c_OLED_send_cmd(0x81); // Setup CONTRAST CONTROL, following byte is the contrast Value... always a 2 byte instruction
|
||||||
|
@ -196,7 +196,7 @@ void i2c_OLED_clear_display_quick(void)
|
||||||
i2c_OLED_send_cmd(0x40); // Display start line register to 0
|
i2c_OLED_send_cmd(0x40); // Display start line register to 0
|
||||||
i2c_OLED_send_cmd(0); // Set low col address to 0
|
i2c_OLED_send_cmd(0); // Set low col address to 0
|
||||||
i2c_OLED_send_cmd(0x10); // Set high col address to 0
|
i2c_OLED_send_cmd(0x10); // Set high col address to 0
|
||||||
for(uint16_t i=0; i<1024; i++) { // fill the display's RAM with graphic... 128*64 pixel picture
|
for(uint16_t i = 0; i < 1024; i++) { // fill the display's RAM with graphic... 128*64 pixel picture
|
||||||
i2c_OLED_send_byte(0x00); // clear
|
i2c_OLED_send_byte(0x00); // clear
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ void enableGPIOPowerUsageAndNoiseReductions(void)
|
||||||
|
|
||||||
gpio.mode = Mode_AIN;
|
gpio.mode = Mode_AIN;
|
||||||
|
|
||||||
gpio.pin = Pin_All & ~(Pin_13|Pin_14|Pin_15); // Leave JTAG pins alone
|
gpio.pin = Pin_All & ~(Pin_13 | Pin_14 | Pin_15); // Leave JTAG pins alone
|
||||||
gpioInit(GPIOA, &gpio);
|
gpioInit(GPIOA, &gpio);
|
||||||
|
|
||||||
gpio.pin = Pin_All;
|
gpio.pin = Pin_All;
|
||||||
|
|
|
@ -225,7 +225,7 @@ static void sortSerialPortFunctions(serialPortFunction_t *serialPortFunctions, u
|
||||||
for (index1 = 0; index1 < (elements - 1); index1++) {
|
for (index1 = 0; index1 < (elements - 1); index1++) {
|
||||||
for (index2 = 0; index2 < elements - index1 - 1; index2++) {
|
for (index2 = 0; index2 < elements - index1 - 1; index2++) {
|
||||||
if(serialPortFunctionMostSpecificFirstComparator(&serialPortFunctions[index2], &serialPortFunctions[index2 + 1]) > 0) {
|
if(serialPortFunctionMostSpecificFirstComparator(&serialPortFunctions[index2], &serialPortFunctions[index2 + 1]) > 0) {
|
||||||
swap=serialPortFunctions[index2];
|
swap = serialPortFunctions[index2];
|
||||||
serialPortFunctions[index2] = serialPortFunctions[index2 + 1];
|
serialPortFunctions[index2] = serialPortFunctions[index2 + 1];
|
||||||
serialPortFunctions[index2 + 1] = swap;
|
serialPortFunctions[index2 + 1] = swap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,7 +159,7 @@ bool isCalibrating()
|
||||||
void annexCode(void)
|
void annexCode(void)
|
||||||
{
|
{
|
||||||
int32_t tmp, tmp2;
|
int32_t tmp, tmp2;
|
||||||
int32_t axis, prop1, prop2;
|
int32_t axis, prop1 = 0, prop2;
|
||||||
|
|
||||||
static uint8_t batteryWarningEnabled = false;
|
static uint8_t batteryWarningEnabled = false;
|
||||||
static uint8_t vbatTimer = 0;
|
static uint8_t vbatTimer = 0;
|
||||||
|
|
|
@ -215,7 +215,6 @@ void USB_Interrupts_Config(void)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
void USB_Cable_Config(FunctionalState NewState)
|
void USB_Cable_Config(FunctionalState NewState)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue