2 * This file is part of INAV
4 * INAV free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
10 * INAV distributed in the hope that it
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
26 #include <common/time.h>
30 #include "config/parameter_group.h"
32 #if defined(USE_POWER_LIMITS)
38 float attnFilterCutoff
; // Hz
39 } powerLimitsConfig_t
;
41 PG_DECLARE(powerLimitsConfig_t
, powerLimitsConfig
);
43 void powerLimiterInit(void);
44 void currentLimiterUpdate(timeDelta_t timeDelta
);
45 void powerLimiterUpdate(timeDelta_t timeDelta
);
46 void powerLimiterApply(int16_t *throttleCommand
);
47 bool powerLimiterIsLimiting(void);
48 bool powerLimiterIsLimitingCurrent(void);
49 float powerLimiterGetRemainingBurstTime(void); // returns seconds
50 uint16_t powerLimiterGetActiveCurrentLimit(void); // returns cA
52 uint16_t powerLimiterGetActivePowerLimit(void); // returns cW
53 bool powerLimiterIsLimitingPower(void);