mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-03 12:30:35 +08:00
batteryCheck: refactor to consistent parameter variable naming
This commit is contained in:
@@ -211,8 +211,8 @@ void BatteryChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
mavlink_log_emergency(reporter.mavlink_log_pub(), "Low battery level\t");
|
||||
}
|
||||
|
||||
} else if (!context.isArmed() && _param_arm_battery_level_min.get() > FLT_EPSILON
|
||||
&& worst_battery_remaining < _param_arm_battery_level_min.get()) {
|
||||
} else if (!context.isArmed() && _param_com_arm_bat_min.get() > FLT_EPSILON
|
||||
&& worst_battery_remaining < _param_com_arm_bat_min.get()) {
|
||||
// if not armed, additionally check if the battery is below the separately configurable preflight threshold
|
||||
/* EVENT
|
||||
* @description
|
||||
|
||||
@@ -57,7 +57,7 @@ private:
|
||||
bool _battery_connected_at_arming[battery_status_s::MAX_INSTANCES] {};
|
||||
|
||||
DEFINE_PARAMETERS_CUSTOM_PARENT(HealthAndArmingCheckBase,
|
||||
(ParamFloat<px4::params::COM_ARM_BAT_MIN>) _param_arm_battery_level_min,
|
||||
(ParamFloat<px4::params::COM_ARM_BAT_MIN>) _param_com_arm_bat_min,
|
||||
(ParamInt<px4::params::CBRK_SUPPLY_CHK>) _param_cbrk_supply_chk
|
||||
)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user