mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
HoTT - Apply quick workaround to allow HoTT to work on hardware serial
ports, previously only softserial was working. - See #1021
This commit is contained in:
parent
3878a7ea2c
commit
5142ff032a
1 changed files with 8 additions and 2 deletions
|
@ -426,7 +426,10 @@ static void hottCheckSerialData(uint32_t currentMicros)
|
||||||
static void hottSendTelemetryData(void) {
|
static void hottSendTelemetryData(void) {
|
||||||
if (!hottIsSending) {
|
if (!hottIsSending) {
|
||||||
hottIsSending = true;
|
hottIsSending = true;
|
||||||
serialSetMode(hottPort, MODE_TX);
|
// FIXME temorary workaround for HoTT not working on Hardware serial ports due to hardware/softserial serial port initialisation differences
|
||||||
|
//serialSetMode(hottPort, MODE_TX);
|
||||||
|
closeSerialPort(hottPort);
|
||||||
|
hottPort = openSerialPort(portConfig->identifier, FUNCTION_TELEMETRY_HOTT, NULL, HOTT_BAUDRATE, MODE_TX, SERIAL_NOT_INVERTED);
|
||||||
hottMsgCrc = 0;
|
hottMsgCrc = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -435,7 +438,10 @@ static void hottSendTelemetryData(void) {
|
||||||
hottMsg = NULL;
|
hottMsg = NULL;
|
||||||
hottIsSending = false;
|
hottIsSending = false;
|
||||||
|
|
||||||
serialSetMode(hottPort, MODE_RX);
|
// FIXME temorary workaround for HoTT not working on Hardware serial ports due to hardware/softserial serial port initialisation differences
|
||||||
|
//serialSetMode(hottPort, MODE_RX);
|
||||||
|
closeSerialPort(hottPort);
|
||||||
|
hottPort = openSerialPort(portConfig->identifier, FUNCTION_TELEMETRY_HOTT, NULL, HOTT_BAUDRATE, MODE_RX, SERIAL_NOT_INVERTED);
|
||||||
flushHottRxBuffer();
|
flushHottRxBuffer();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue