mirror of https://github.com/ArduPilot/ardupilot
AP_BattMoniter: add reset remaining per-instance rename existing to _mask
This commit is contained in:
parent
0fe38da522
commit
9fdceeded3
|
@ -554,7 +554,7 @@ void AP_BattMonitor::checkPoweringOff(void)
|
|||
reset battery remaining percentage for batteries that integrate to
|
||||
calculate percentage remaining
|
||||
*/
|
||||
bool AP_BattMonitor::reset_remaining(uint16_t battery_mask, float percentage)
|
||||
bool AP_BattMonitor::reset_remaining_mask(uint16_t battery_mask, float percentage)
|
||||
{
|
||||
static_assert(AP_BATT_MONITOR_MAX_INSTANCES <= 16, "More batteries are enabled then can be reset");
|
||||
bool ret = true;
|
||||
|
|
|
@ -208,7 +208,8 @@ public:
|
|||
void checkPoweringOff(void);
|
||||
|
||||
// reset battery remaining percentage
|
||||
bool reset_remaining(uint16_t battery_mask, float percentage);
|
||||
bool reset_remaining_mask(uint16_t battery_mask, float percentage);
|
||||
bool reset_remaining(uint8_t instance, float percentage) { return reset_remaining_mask(1U<<instance, percentage);}
|
||||
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
||||
|
|
Loading…
Reference in New Issue