1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 01:35:41 +03:00

On second thought, no need to make inverter configurable. only sbus will use it, and the driver can set inversion automatically.

This commit is contained in:
dongie 2014-06-11 14:13:45 +09:00
parent 84729747b0
commit ab87a99238
4 changed files with 3 additions and 9 deletions

View file

@ -28,11 +28,7 @@ void sbusInit(rcReadRawDataPtr *callback)
for (b = 0; b < SBUS_MAX_CHANNEL; b++)
sbusChannelData[b] = 2 * (mcfg.midrc - SBUS_OFFSET);
// Configure hardware inverter on PB2. If not available, this has no effect.
if (mcfg.serial2_rx_inverted) {
INV_ON;
} else {
INV_OFF;
}
INV_ON;
core.rcvrport = uartOpen(USART2, sbusDataReceive, 100000, (portMode_t)(MODE_RX | MODE_SBUS));
if (callback)
*callback = sbusReadRawRC;