Fixed up unit tests and ROM sizes
This commit is contained in:
parent
83343e1d86
commit
4dee6b7ddd
|
@ -101,8 +101,7 @@
|
||||||
#define ACC_MPU6500_ALIGN CW0_DEG
|
#define ACC_MPU6500_ALIGN CW0_DEG
|
||||||
|
|
||||||
#define BARO
|
#define BARO
|
||||||
#define USE_BARO_MS5611
|
#define USE_BARO_MS5611 // needed for Flip32 board
|
||||||
#define USE_BARO_BMP085
|
|
||||||
#define USE_BARO_BMP280
|
#define USE_BARO_BMP280
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -22,10 +22,8 @@
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "build/debug.h"
|
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
#include "build/debug.h"
|
||||||
#include "config/parameter_group.h"
|
#include "config/parameter_group.h"
|
||||||
#include "config/parameter_group_ids.h"
|
#include "config/parameter_group_ids.h"
|
||||||
|
|
||||||
|
@ -49,7 +47,7 @@ PG_RESET_TEMPLATE(motorConfig_t, motorConfig,
|
||||||
|
|
||||||
TEST(ParameterGroupsfTest, Test_pgResetAll)
|
TEST(ParameterGroupsfTest, Test_pgResetAll)
|
||||||
{
|
{
|
||||||
memset(motorConfig(), 0, sizeof(motorConfig_t));
|
memset(motorConfigMutable(), 0, sizeof(motorConfig_t));
|
||||||
pgResetAll(0);
|
pgResetAll(0);
|
||||||
EXPECT_EQ(1150, motorConfig()->minthrottle);
|
EXPECT_EQ(1150, motorConfig()->minthrottle);
|
||||||
EXPECT_EQ(1850, motorConfig()->maxthrottle);
|
EXPECT_EQ(1850, motorConfig()->maxthrottle);
|
||||||
|
@ -59,7 +57,7 @@ TEST(ParameterGroupsfTest, Test_pgResetAll)
|
||||||
|
|
||||||
TEST(ParameterGroupsfTest, Test_pgFind)
|
TEST(ParameterGroupsfTest, Test_pgFind)
|
||||||
{
|
{
|
||||||
memset(motorConfig(), 0, sizeof(motorConfig_t));
|
memset(motorConfigMutable(), 0, sizeof(motorConfig_t));
|
||||||
const pgRegistry_t *pgRegistry = pgFind(PG_MOTOR_CONFIG);
|
const pgRegistry_t *pgRegistry = pgFind(PG_MOTOR_CONFIG);
|
||||||
pgResetCurrent(pgRegistry);
|
pgResetCurrent(pgRegistry);
|
||||||
EXPECT_EQ(1150, motorConfig()->minthrottle);
|
EXPECT_EQ(1150, motorConfig()->minthrottle);
|
||||||
|
@ -69,7 +67,7 @@ TEST(ParameterGroupsfTest, Test_pgFind)
|
||||||
|
|
||||||
motorConfig_t motorConfig2;
|
motorConfig_t motorConfig2;
|
||||||
memset(&motorConfig2, 0, sizeof(motorConfig_t));
|
memset(&motorConfig2, 0, sizeof(motorConfig_t));
|
||||||
motorConfig()->motorPwmRate = 500;
|
motorConfigMutable()->motorPwmRate = 500;
|
||||||
pgStore(pgRegistry, &motorConfig2, sizeof(motorConfig_t), 0);
|
pgStore(pgRegistry, &motorConfig2, sizeof(motorConfig_t), 0);
|
||||||
EXPECT_EQ(1150, motorConfig2.minthrottle);
|
EXPECT_EQ(1150, motorConfig2.minthrottle);
|
||||||
EXPECT_EQ(1850, motorConfig2.maxthrottle);
|
EXPECT_EQ(1850, motorConfig2.maxthrottle);
|
||||||
|
|
Loading…
Reference in New Issue