mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 09:45:37 +03:00
Added 'esc_sensor_halfduplex' setting to enable KISSFC owners to use 'TLM' pads for ESC stelemetry lines.
This commit is contained in:
parent
b069e011fe
commit
6165ef6f9c
4 changed files with 20 additions and 2 deletions
|
@ -64,6 +64,12 @@ Byte 9: 8-bit CRC
|
|||
|
||||
*/
|
||||
|
||||
PG_REGISTER_WITH_RESET_TEMPLATE(escSensorConfig_t, escSensorConfig, PG_ESC_SENSOR_CONFIG, 0);
|
||||
|
||||
PG_RESET_TEMPLATE(escSensorConfig_t, escSensorConfig,
|
||||
.halfDuplex = 0
|
||||
);
|
||||
|
||||
/*
|
||||
DEBUG INFORMATION
|
||||
-----------------
|
||||
|
@ -183,7 +189,7 @@ bool escSensorInit(void)
|
|||
return false;
|
||||
}
|
||||
|
||||
portOptions_t options = (SERIAL_NOT_INVERTED);
|
||||
portOptions_t options = SERIAL_NOT_INVERTED | (escSensorConfig()->halfDuplex ? SERIAL_BIDIR : 0);
|
||||
|
||||
// Initialize serial port
|
||||
escSensorPort = openSerialPort(portConfig->identifier, FUNCTION_ESC_SENSOR, escSensorDataReceive, ESC_SENSOR_BAUDRATE, MODE_RX, options);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue