mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Fix unit tests - the tests cannot use a common library of production
since when compiling some test code the idea is to stub out production functionality rather than call production code.
This commit is contained in:
parent
4737f33b19
commit
0070573420
4 changed files with 11 additions and 6 deletions
|
@ -182,8 +182,8 @@ TEST(baroBmp085Test, TestBmp085CalculateOss3Hot)
|
|||
|
||||
extern "C" {
|
||||
|
||||
void gpioInit(){}
|
||||
void RCC_APB2PeriphClockCmd(){}
|
||||
void gpioInit() {}
|
||||
void RCC_APB2PeriphClockCmd() {}
|
||||
void delay(uint32_t) {}
|
||||
void delayMicroseconds(uint32_t) {}
|
||||
bool i2cWrite(uint8_t, uint8_t, uint8_t) {
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#define MAG
|
||||
#define BARO
|
||||
#define GPS
|
||||
#define DISPLAY
|
||||
#define TELEMETRY
|
||||
#define LED_STRIP
|
||||
#define USE_SERVOS
|
||||
|
|
|
@ -693,9 +693,9 @@ void accSetCalibrationCycles(uint16_t) {}
|
|||
void gyroSetCalibrationCycles(uint16_t) {}
|
||||
void applyAndSaveAccelerometerTrimsDelta(rollAndPitchTrims_t*) {}
|
||||
void handleInflightCalibrationStickPosition(void) {}
|
||||
bool feature(uint32_t) { return false;}
|
||||
bool sensors(uint32_t) { return false;}
|
||||
void mwArm(void) {}
|
||||
void feature(uint32_t) {}
|
||||
void sensors(uint32_t) {}
|
||||
void mwDisarm(void) {}
|
||||
void displayDisablePageCycling() {}
|
||||
void displayEnablePageCycling() {}
|
||||
|
|
|
@ -139,6 +139,12 @@ extern "C" {
|
|||
void failsafeOnValidDataFailed() {}
|
||||
void failsafeOnValidDataReceived() {}
|
||||
|
||||
void failsafeOnRxSuspend(uint32_t ) {}
|
||||
void failsafeOnRxResume(void) {}
|
||||
|
||||
uint32_t micros(void) { return 0; }
|
||||
uint32_t millis(void) { return 0; }
|
||||
|
||||
bool feature(uint32_t mask) {
|
||||
UNUSED(mask);
|
||||
return false;
|
||||
|
@ -159,6 +165,4 @@ extern "C" {
|
|||
void rxMspInit(rxConfig_t *, rxRuntimeConfig_t *, rcReadRawDataPtr *) {}
|
||||
|
||||
void rxPwmInit(rxRuntimeConfig_t *, rcReadRawDataPtr *) {}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue