1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

OP-1837 Uncrustify

This commit is contained in:
m_thread 2015-04-26 21:08:54 +02:00
parent b0b1a42aec
commit 8d4fe80388
3 changed files with 51 additions and 51 deletions

View File

@ -34,7 +34,7 @@
#include "pios_srxl_priv.h" #include "pios_srxl_priv.h"
//#define PIOS_INSTRUMENT_MODULE // #define PIOS_INSTRUMENT_MODULE
#include <pios_instrumentation_helper.h> #include <pios_instrumentation_helper.h>
PERF_DEFINE_COUNTER(crcFailureCount); PERF_DEFINE_COUNTER(crcFailureCount);
@ -222,6 +222,7 @@ static bool PIOS_SRXL_Validate_Checksum(struct pios_srxl_state *state)
// All data including start byte and version byte is included in crc calculation. // All data including start byte and version byte is included in crc calculation.
uint8_t i = 0; uint8_t i = 0;
uint16_t crc = 0; uint16_t crc = 0;
for (i = 0; i < SRXL_HEADER_LENGTH + state->data_bytes; i++) { for (i = 0; i < SRXL_HEADER_LENGTH + state->data_bytes; i++) {
crc = crc ^ (int16_t)state->received_data[i] << 8; crc = crc ^ (int16_t)state->received_data[i] << 8;
uint8_t j = 0; uint8_t j = 0;
@ -264,8 +265,7 @@ static void PIOS_SRXL_UpdateState(struct pios_srxl_state *state, uint8_t b)
/* store next byte */ /* store next byte */
state->received_data[state->byte_count] = b; state->received_data[state->byte_count] = b;
state->byte_count++; state->byte_count++;
if (state->byte_count == (SRXL_HEADER_LENGTH + state->data_bytes + SRXL_CHECKSUM_LENGTH)) if (state->byte_count == (SRXL_HEADER_LENGTH + state->data_bytes + SRXL_CHECKSUM_LENGTH)) {
{
PERF_INCREMENT_VALUE(completeMessageCount); PERF_INCREMENT_VALUE(completeMessageCount);
// We have a complete message, lets decode it // We have a complete message, lets decode it
if (PIOS_SRXL_Validate_Checksum(state)) { if (PIOS_SRXL_Validate_Checksum(state)) {