Compare commits

...

5 commits

Author SHA1 Message Date
Michael Hope 2f32c5ee4d Merge commit '70cda73' into fix-tests 2015-05-29 05:29:16 +02:00
Michael Hope bb62b0fdaa Merge branch 'master' into fix-tests 2015-05-27 07:21:21 +02:00
Michael Hope 80841b0f5d tests: fix the unit tests.
In 'const foo const array[]', the second const is redundant and causes
GCC to throw a warning.

Signed-off-by: Michael Hope <mlhx@google.com>
2015-05-23 05:16:51 +02:00
Michael Hope 89127c2a06 Merge branch 'master' into fix-tests 2015-05-23 05:11:02 +02:00
Michael Hope f761af896c tests: fix the tests under DCC.
Commit #da8bb6f6fc663c568678cfe1fa743bd68fcdbbe9 added a new field in
the middle of controlRateConfig_t, which broke building the unit tests
with GCC.

Signed-off-by: Michael Hope <mlhx@google.com>
2015-05-22 05:48:30 +02:00
3 changed files with 7 additions and 4 deletions

View file

@ -53,7 +53,7 @@
static serialConfig_t *serialConfig;
static serialPortUsage_t serialPortUsageList[SERIAL_PORT_COUNT];
const serialPortIdentifier_e const serialPortIdentifiers[SERIAL_PORT_COUNT] = {
const serialPortIdentifier_e serialPortIdentifiers[SERIAL_PORT_COUNT] = {
#ifdef USE_VCP
SERIAL_PORT_USB_VCP,
#endif
@ -76,7 +76,7 @@ const serialPortIdentifier_e const serialPortIdentifiers[SERIAL_PORT_COUNT] = {
static uint8_t serialPortCount;
const uint32_t const baudRates[] = {0, 9600, 19200, 38400, 57600, 115200, 230400, 250000}; // see baudRate_e
const uint32_t baudRates[] = {0, 9600, 19200, 38400, 57600, 115200, 230400, 250000}; // see baudRate_e
#define BAUD_RATE_COUNT (sizeof(baudRates) / sizeof(baudRates[0]))

View file

@ -46,7 +46,7 @@ typedef enum {
BAUD_250000,
} baudRate_e;
extern const uint32_t const baudRates[];
extern const uint32_t baudRates[];
// serial port identifiers are now fixed, these values are used by MSP commands.
typedef enum {
@ -61,7 +61,7 @@ typedef enum {
SERIAL_PORT_IDENTIFIER_MAX = SERIAL_PORT_SOFTSERIAL2
} serialPortIdentifier_e;
extern const serialPortIdentifier_e const serialPortIdentifiers[SERIAL_PORT_COUNT];
extern const serialPortIdentifier_e serialPortIdentifiers[SERIAL_PORT_COUNT];
//
// runtime

View file

@ -242,6 +242,7 @@ TEST(RcControlsTest, processRcAdjustmentsSticksInMiddle)
.thrExpo8 = 0,
.rates = {0,0,0},
.dynThrPID = 0,
.rcYawExpo8 = 0,
.tpa_breakpoint = 0
};
@ -285,6 +286,7 @@ TEST(RcControlsTest, processRcAdjustmentsWithRcRateFunctionSwitchUp)
.thrExpo8 = 0,
.rates = {0,0,0},
.dynThrPID = 0,
.rcYawExpo8 = 0,
.tpa_breakpoint = 0
};
@ -451,6 +453,7 @@ TEST(RcControlsTest, processRcRateProfileAdjustments)
.thrExpo8 = 0,
.rates = {0,0,0},
.dynThrPID = 0,
.rcYawExpo8 = 0,
.tpa_breakpoint = 0
};