diff --git a/src/main/flight/imu.c b/src/main/flight/imu.c index 984ec4f09b..74a4af8aec 100644 --- a/src/main/flight/imu.c +++ b/src/main/flight/imu.c @@ -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; diff --git a/src/main/telemetry/frsky.c b/src/main/telemetry/frsky.c index acac1ea7f1..fcf07cd686 100644 --- a/src/main/telemetry/frsky.c +++ b/src/main/telemetry/frsky.c @@ -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;