mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 22:05:17 +03:00
Fix some compile warnings
This commit is contained in:
parent
054868e0a4
commit
e3b77b2ee5
2 changed files with 13 additions and 13 deletions
|
@ -215,7 +215,7 @@ static bool imuUseFastGains(void)
|
|||
return !ARMING_FLAG(ARMED) && millis() < 20000;
|
||||
}
|
||||
|
||||
static float imuGetPGainScaleFactor(float spin_rate)
|
||||
static float imuGetPGainScaleFactor(void)
|
||||
{
|
||||
if (imuUseFastGains()) {
|
||||
return 10.0f;
|
||||
|
@ -306,7 +306,7 @@ static void imuMahonyAHRSupdate(float dt, float gx, float gy, float gz,
|
|||
}
|
||||
|
||||
// Calculate kP gain. If we are acquiring initial attitude (not armed and within 20 sec from powerup) scale the kP to converge faster
|
||||
float dcmKpGain = imuRuntimeConfig->dcm_kp * imuGetPGainScaleFactor(spin_rate);
|
||||
float dcmKpGain = imuRuntimeConfig->dcm_kp * imuGetPGainScaleFactor();
|
||||
|
||||
// Apply proportional and integral feedback
|
||||
gx += dcmKpGain * ex + integralFBx;
|
||||
|
|
|
@ -302,17 +302,6 @@ static void sendLatLong(int32_t coord[2])
|
|||
serialize16(coord[LON] < 0 ? 'W' : 'E');
|
||||
}
|
||||
|
||||
static void sendFakeLatLong(void)
|
||||
{
|
||||
// Heading is only displayed on OpenTX if non-zero lat/long is also sent
|
||||
int32_t coord[2] = {0,0};
|
||||
|
||||
coord[LAT] = (telemetryConfig->gpsNoFixLatitude * GPS_DEGREES_DIVIDER);
|
||||
coord[LON] = (telemetryConfig->gpsNoFixLongitude * GPS_DEGREES_DIVIDER);
|
||||
|
||||
sendLatLong(coord);
|
||||
}
|
||||
|
||||
static void sendFakeLatLongThatAllowsHeadingDisplay(void)
|
||||
{
|
||||
// Heading is only displayed on OpenTX if non-zero lat/long is also sent
|
||||
|
@ -325,6 +314,17 @@ static void sendFakeLatLongThatAllowsHeadingDisplay(void)
|
|||
}
|
||||
|
||||
#ifdef GPS
|
||||
static void sendFakeLatLong(void)
|
||||
{
|
||||
// Heading is only displayed on OpenTX if non-zero lat/long is also sent
|
||||
int32_t coord[2] = {0,0};
|
||||
|
||||
coord[LAT] = (telemetryConfig->gpsNoFixLatitude * GPS_DEGREES_DIVIDER);
|
||||
coord[LON] = (telemetryConfig->gpsNoFixLongitude * GPS_DEGREES_DIVIDER);
|
||||
|
||||
sendLatLong(coord);
|
||||
}
|
||||
|
||||
static void sendGPSLatLong(void)
|
||||
{
|
||||
static uint8_t gpsFixOccured = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue