mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
force unit tests sto work
This commit is contained in:
parent
2fc85cdf85
commit
ce72f16a62
3 changed files with 65 additions and 9 deletions
|
@ -37,14 +37,19 @@ extern "C" {
|
|||
#include "flight/pid.h"
|
||||
#include "flight/position.h"
|
||||
|
||||
#include "io/gps.h"
|
||||
|
||||
#include "rx/rx.h"
|
||||
|
||||
#include "sensors/acceleration.h"
|
||||
#include "sensors/gyro.h"
|
||||
|
||||
PG_REGISTER(accelerometerConfig_t, accelerometerConfig, PG_ACCELEROMETER_CONFIG, 0);
|
||||
PG_REGISTER(positionConfig_t, positionConfig, PG_POSITION, 0);
|
||||
PG_REGISTER(autopilotConfig_t, autopilotConfig, PG_AUTOPILOT, 0);
|
||||
PG_REGISTER(altHoldConfig_t, altHoldConfig, PG_ALTHOLD_CONFIG, 0);
|
||||
PG_REGISTER(autopilotConfig_t, autopilotConfig, PG_AUTOPILOT, 0);
|
||||
PG_REGISTER(gyroConfig_t, gyroConfig, PG_GYRO_CONFIG, 0);
|
||||
PG_REGISTER(positionConfig_t, positionConfig, PG_POSITION, 0);
|
||||
PG_REGISTER(rcControlsConfig_t, rcControlsConfig, PG_RC_CONTROLS_CONFIG, 0);
|
||||
|
||||
extern altHoldState_t altHoldState;
|
||||
void altHoldInit(void);
|
||||
|
@ -103,16 +108,21 @@ extern "C" {
|
|||
float getCosTiltAngle(void) { return 0.0f; }
|
||||
float rcCommand[4];
|
||||
|
||||
void GPS_distance_cm_bearing(&gpsSol.llh, &targetLocation, false, &distanceCm, &bearing)
|
||||
void GPS_distance_cm_bearing(const gpsLocation_t *from, const gpsLocation_t *to, bool dist3d, uint32_t *dist, int32_t *bearing)
|
||||
{
|
||||
UNUSED(gpsSol.llh);
|
||||
UNUSED(targetLocation);
|
||||
UNUSED(false);
|
||||
UNUSED(distanceCm);
|
||||
UNUSED(from);
|
||||
UNUSED(to);
|
||||
UNUSED(dist3d);
|
||||
UNUSED(dist);
|
||||
UNUSED(bearing);
|
||||
|
||||
}
|
||||
|
||||
gpsSolutionData_t gpsSol;
|
||||
bool canUseGPSHeading;
|
||||
bool compassIsHealthy;
|
||||
float getGpsDataIntervalSeconds(void) { return 0.01f; }
|
||||
float getRcDeflectionAbs(void) { return 0.0f; }
|
||||
attitudeEulerAngles_t attitude;
|
||||
|
||||
void parseRcChannels(const char *input, rxConfig_t *rxConfig)
|
||||
{
|
||||
|
@ -120,6 +130,33 @@ extern "C" {
|
|||
UNUSED(rxConfig);
|
||||
}
|
||||
|
||||
float pt1FilterGain(float f_cut, float dT)
|
||||
{
|
||||
UNUSED(f_cut);
|
||||
UNUSED(dT);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
void pt1FilterInit(pt1Filter_t *filter, float k)
|
||||
{
|
||||
UNUSED(filter);
|
||||
UNUSED(k);
|
||||
}
|
||||
|
||||
void pt1FilterUpdateCutoff(pt1Filter_t *filter, float k)
|
||||
{
|
||||
UNUSED(filter);
|
||||
UNUSED(k);
|
||||
}
|
||||
|
||||
float pt1FilterApply(pt1Filter_t *filter, float input)
|
||||
{
|
||||
UNUSED(filter);
|
||||
UNUSED(input);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
int16_t debug[DEBUG16_VALUE_COUNT];
|
||||
uint8_t debugMode;
|
||||
|
||||
|
|
|
@ -1157,7 +1157,26 @@ extern "C" {
|
|||
UNUSED(velocityUpsampleLpf);
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
float sin_approx(float) {
|
||||
return 0.0f;
|
||||
}
|
||||
float cos_approx(float) {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
void getRcDeflectionAbs(void) {}
|
||||
uint32_t getCpuPercentageLate(void) { return 0; }
|
||||
bool crashFlipSuccessful(void) { return false; }
|
||||
|
||||
void GPS_distance_cm_bearing(const gpsLocation_t *from, const gpsLocation_t *to, bool dist3d, uint32_t *dist, int32_t *bearing)
|
||||
{
|
||||
UNUSED(from);
|
||||
UNUSED(to);
|
||||
UNUSED(dist3d);
|
||||
UNUSED(dist);
|
||||
UNUSED(bearing);
|
||||
}
|
||||
bool canUseGPSHeading;
|
||||
bool compassIsHealthy;
|
||||
}
|
||||
|
|
|
@ -212,5 +212,5 @@ extern "C" {
|
|||
void sbufWriteU32(sbuf_t *, uint32_t) {}
|
||||
void schedulerSetNextStateTime(timeDelta_t) {}
|
||||
bool crashFlipSuccessful(void) {return false; }
|
||||
|
||||
bool canUseGPSHeading;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue