mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 14:55:21 +03:00
Remove Some WTF's
This commit is contained in:
parent
9a5a73ade9
commit
350bae1ae9
2 changed files with 2 additions and 2 deletions
|
@ -109,7 +109,7 @@ void setGyroSamplingSpeed(uint16_t looptime) {
|
|||
if (looptime != targetLooptime) {
|
||||
#ifdef STM32F303xC
|
||||
if (looptime < 1000) {
|
||||
masterConfig.gyro_lpf = 1;
|
||||
masterConfig.gyro_lpf = 0;
|
||||
gyroSampleRate = 125;
|
||||
maxDivider = 8;
|
||||
} else {
|
||||
|
|
|
@ -208,7 +208,7 @@ void updateCurrentMeter(int32_t lastUpdateAt, rxConfig_t *rxConfig, uint16_t dea
|
|||
float calculateVbatPidCompensation(void) {
|
||||
float batteryScaler = 1.0f;
|
||||
if (batteryConfig->vbatPidCompensation && feature(FEATURE_VBAT) && batteryCellCount > 1) {
|
||||
batteryScaler = 1.0f + constrainf(1.0f - (batteryWarningVoltage / vbat), 0.75f, 1.0f); // Up to 25% increment. Should be fine for 3,3 to 4,2 difference
|
||||
batteryScaler = (constrainf(batteryWarningVoltage / vbat, 0.75f, 1.0f)) / 0.75f; // Should be fine for 3,3 to 4,2 difference
|
||||
}
|
||||
|
||||
return batteryScaler;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue