Minor Formatting Tweaks
Converted tabs to spaces Indented cases in switch
This commit is contained in:
parent
b62e91df15
commit
60231732ba
|
@ -32,7 +32,7 @@ typedef enum {
|
||||||
PROTOCOL_BLHELI = 1,
|
PROTOCOL_BLHELI = 1,
|
||||||
PROTOCOL_KISS = 2,
|
PROTOCOL_KISS = 2,
|
||||||
PROTOCOL_KISSALL = 3,
|
PROTOCOL_KISSALL = 3,
|
||||||
PROTOCOL_CASTLE = 4,
|
PROTOCOL_CASTLE = 4,
|
||||||
} escProtocol_e;
|
} escProtocol_e;
|
||||||
|
|
||||||
#if defined(USE_ESCSERIAL)
|
#if defined(USE_ESCSERIAL)
|
||||||
|
@ -335,11 +335,12 @@ serialPort_t *openEscSerial(escSerialPortIndex_e portIndex, serialReceiveCallbac
|
||||||
}
|
}
|
||||||
setTxSignalEsc(escSerial, ENABLE);
|
setTxSignalEsc(escSerial, ENABLE);
|
||||||
serialTimerTxConfigBL(escSerial->txTimerHardware, portIndex, baud);
|
serialTimerTxConfigBL(escSerial->txTimerHardware, portIndex, baud);
|
||||||
} else if(mode == PROTOCOL_CASTLE){
|
}
|
||||||
|
else if(mode == PROTOCOL_CASTLE){
|
||||||
escSerialOutputPortConfig(escSerial->rxTimerHardware);
|
escSerialOutputPortConfig(escSerial->rxTimerHardware);
|
||||||
serialTimerTxConfigBL(escSerial->txTimerHardware, portIndex, baud);
|
serialTimerTxConfigBL(escSerial->txTimerHardware, portIndex, baud);
|
||||||
serialTimerRxConfigBL(escSerial->rxTimerHardware, portIndex, options);
|
serialTimerRxConfigBL(escSerial->rxTimerHardware, portIndex, options);
|
||||||
}
|
}
|
||||||
return &escSerial->port;
|
return &escSerial->port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -929,15 +930,15 @@ void escEnablePassthrough(serialPort_t *escPassthroughPort, uint16_t output, uin
|
||||||
|
|
||||||
uint32_t escBaudrate;
|
uint32_t escBaudrate;
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case PROTOCOL_KISS:
|
case PROTOCOL_KISS:
|
||||||
escBaudrate = BAUDRATE_KISS;
|
escBaudrate = BAUDRATE_KISS;
|
||||||
break;
|
break;
|
||||||
case PROTOCOL_CASTLE:
|
case PROTOCOL_CASTLE:
|
||||||
escBaudrate = BAUDRATE_CASTLE;
|
escBaudrate = BAUDRATE_CASTLE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
escBaudrate = BAUDRATE_NORMAL;
|
escBaudrate = BAUDRATE_NORMAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((mode == PROTOCOL_KISS) && (output == 255)){
|
if((mode == PROTOCOL_KISS) && (output == 255)){
|
||||||
|
@ -999,9 +1000,9 @@ void escEnablePassthrough(serialPort_t *escPassthroughPort, uint16_t output, uin
|
||||||
}
|
}
|
||||||
LED1_OFF;
|
LED1_OFF;
|
||||||
}
|
}
|
||||||
if(mode != PROTOCOL_CASTLE){
|
if(mode != PROTOCOL_CASTLE){
|
||||||
delay(5);
|
delay(5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue