From 18ff17779ed4da0f74826e83d581cb141ed22571 Mon Sep 17 00:00:00 2001 From: blckmn Date: Wed, 28 Dec 2016 14:00:20 +1100 Subject: [PATCH] Minor whitespace cleanup --- src/main/rx/xbus.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/rx/xbus.c b/src/main/rx/xbus.c index 2ff06c575a..8bcae2cb28 100644 --- a/src/main/rx/xbus.c +++ b/src/main/rx/xbus.c @@ -65,8 +65,8 @@ // However, the JR XG14 that is used for test at the moment // does only use 0xA1 as its output. This is why the implementation // is based on these numbers only. Maybe update this in the future? -#define XBUS_START_OF_FRAME_BYTE_A1 (0xA1) //12 channels -#define XBUS_START_OF_FRAME_BYTE_A2 (0xA2) //16 channels transfare, but only 12 channels use for +#define XBUS_START_OF_FRAME_BYTE_A1 (0xA1) //12 channels +#define XBUS_START_OF_FRAME_BYTE_A2 (0xA2) //16 channels transfare, but only 12 channels use for // Pulse length convertion from [0...4095] to µs: // 800µs -> 0x000 @@ -85,7 +85,7 @@ static uint8_t xBusProvider; // Use max values for ram areas -static volatile uint8_t xBusFrame[XBUS_FRAME_SIZE_A2]; //siz 35 for 16 channels in xbus_Mode_B +static volatile uint8_t xBusFrame[XBUS_FRAME_SIZE_A2]; //siz 35 for 16 channels in xbus_Mode_B static uint16_t xBusChannelData[XBUS_RJ01_CHANNEL_COUNT]; // The xbus mode B CRC calculations @@ -227,14 +227,14 @@ static void xBusDataReceive(uint16_t c) } // Check if we shall start a frame? - if (xBusFramePosition == 0) { - if (c == XBUS_START_OF_FRAME_BYTE_A1) { - xBusDataIncoming = true; - xBusFrameLength = XBUS_FRAME_SIZE_A1; //decrease framesize (when receiver change, otherwise board must reboot) - } else if (c == XBUS_START_OF_FRAME_BYTE_A2) {//16channel packet - xBusDataIncoming = true; - xBusFrameLength = XBUS_FRAME_SIZE_A2; //increase framesize - } + if (xBusFramePosition == 0) { + if (c == XBUS_START_OF_FRAME_BYTE_A1) { + xBusDataIncoming = true; + xBusFrameLength = XBUS_FRAME_SIZE_A1; //decrease framesize (when receiver change, otherwise board must reboot) + } else if (c == XBUS_START_OF_FRAME_BYTE_A2) {//16channel packet + xBusDataIncoming = true; + xBusFrameLength = XBUS_FRAME_SIZE_A2; //increase framesize + } } // Only do this if we are receiving to a frame @@ -294,7 +294,7 @@ bool xBusInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig) xBusDataIncoming = false; xBusFramePosition = 0; baudRate = XBUS_BAUDRATE; - xBusFrameLength = XBUS_FRAME_SIZE_A1; + xBusFrameLength = XBUS_FRAME_SIZE_A1; xBusChannelCount = XBUS_CHANNEL_COUNT; xBusProvider = SERIALRX_XBUS_MODE_B; break;