CloseEscSerial no longer sets down incorrect serial timer when escaping ESC passthrough
This commit is contained in:
parent
bc82de8e57
commit
a780c3acf4
|
@ -345,19 +345,20 @@ void escSerialInputPortDeConfig(const timerHardware_t *timerHardwarePtr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void closeEscSerial(escSerialPortIndex_e portIndex, uint16_t output)
|
void closeEscSerial(escSerialPortIndex_e portIndex, uint8_t mode)
|
||||||
{
|
{
|
||||||
escSerial_t *escSerial = &(escSerialPorts[portIndex]);
|
escSerial_t *escSerial = &(escSerialPorts[portIndex]);
|
||||||
|
|
||||||
escSerial->rxTimerHardware = &(timerHardware[output]);
|
if(mode != PROTOCOL_KISSALL){
|
||||||
escSerial->txTimerHardware = &(timerHardware[ESCSERIAL_TIMER_TX_HARDWARE]);
|
|
||||||
escSerialInputPortDeConfig(escSerial->rxTimerHardware);
|
escSerialInputPortDeConfig(escSerial->rxTimerHardware);
|
||||||
timerChConfigCallbacks(escSerial->txTimerHardware,NULL,NULL);
|
|
||||||
timerChConfigCallbacks(escSerial->rxTimerHardware,NULL,NULL);
|
timerChConfigCallbacks(escSerial->rxTimerHardware,NULL,NULL);
|
||||||
TIM_DeInit(escSerial->txTimerHardware->tim);
|
|
||||||
TIM_DeInit(escSerial->rxTimerHardware->tim);
|
TIM_DeInit(escSerial->rxTimerHardware->tim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
timerChConfigCallbacks(escSerial->txTimerHardware,NULL,NULL);
|
||||||
|
TIM_DeInit(escSerial->txTimerHardware->tim);
|
||||||
|
}
|
||||||
|
|
||||||
/*********************************************/
|
/*********************************************/
|
||||||
|
|
||||||
void processTxStateEsc(escSerial_t *escSerial)
|
void processTxStateEsc(escSerial_t *escSerial)
|
||||||
|
@ -982,7 +983,7 @@ void escEnablePassthrough(serialPort_t *escPassthroughPort, uint16_t output, uin
|
||||||
serialWrite(escPassthroughPort, 0x00);
|
serialWrite(escPassthroughPort, 0x00);
|
||||||
serialWrite(escPassthroughPort, 0xF4);
|
serialWrite(escPassthroughPort, 0xF4);
|
||||||
serialWrite(escPassthroughPort, 0xF4);
|
serialWrite(escPassthroughPort, 0xF4);
|
||||||
closeEscSerial(ESCSERIAL1, output);
|
closeEscSerial(ESCSERIAL1, mode);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(mode==PROTOCOL_BLHELI){
|
if(mode==PROTOCOL_BLHELI){
|
||||||
|
|
Loading…
Reference in New Issue