mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-28 19:21:03 +08:00
feat(failure_detector): unite motorfailure offsets (#26990)
* feat(failure_detector): unite motorfailure offsets * docs: update docs/en/config/safety.md * docs: Update src/modules/commander/HealthAndArmingChecks/esc_check_params.yaml --------- Co-authored-by: Hamish Willee <hamishwillee@gmail.com> Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
4 files changed
+11
-23
No files matched your search
@@ -250,8 +250,8 @@ uint16_t EscChecks::checkMotorStatus(const Context &context, Report &reporter, c
|
||||
thrust = fabsf(actuator_motors.control[actuator_function_index]);
|
||||
}
|
||||
|
||||
bool current_too_low = current < (thrust * _param_motfail_c2t.get()) - _param_motfail_low_off.get();
|
||||
bool current_too_high = current > (thrust * _param_motfail_c2t.get()) + _param_motfail_high_off.get();
|
||||
bool current_too_low = current < (thrust * _param_motfail_c2t.get()) - _param_motfail_off.get();
|
||||
bool current_too_high = current > (thrust * _param_motfail_c2t.get()) + _param_motfail_off.get();
|
||||
|
||||
_esc_undercurrent_hysteresis[i].set_hysteresis_time_from(false, _param_motfail_time.get() * 1_s);
|
||||
_esc_overcurrent_hysteresis[i].set_hysteresis_time_from(false, _param_motfail_time.get() * 1_s);
|
||||
|
||||
@@ -76,6 +76,5 @@ private:
|
||||
(ParamBool<px4::params::FD_ACT_EN>) _param_fd_act_en,
|
||||
(ParamFloat<px4::params::MOTFAIL_C2T>) _param_motfail_c2t,
|
||||
(ParamFloat<px4::params::MOTFAIL_TIME>) _param_motfail_time,
|
||||
(ParamFloat<px4::params::MOTFAIL_LOW_OFF>) _param_motfail_low_off,
|
||||
(ParamFloat<px4::params::MOTFAIL_HIGH_OFF>) _param_motfail_high_off);
|
||||
(ParamFloat<px4::params::MOTFAIL_OFF>) _param_motfail_off);
|
||||
};
|
||||
@@ -26,21 +26,10 @@ parameters:
|
||||
unit: A/%
|
||||
decimal: 2
|
||||
increment: 1
|
||||
MOTFAIL_LOW_OFF:
|
||||
MOTFAIL_OFF:
|
||||
description:
|
||||
short: Undercurrent motor failure limit offset
|
||||
long: threshold = FD_ACT_MOT_C2T * thrust - FD_ACT_LOW_OFF
|
||||
type: float
|
||||
default: 10.0
|
||||
min: 0
|
||||
max: 30
|
||||
unit: A
|
||||
decimal: 2
|
||||
increment: 1
|
||||
MOTFAIL_HIGH_OFF:
|
||||
description:
|
||||
short: Overcurrent motor failure limit offset
|
||||
long: threshold = FD_ACT_MOT_C2T * thrust + FD_ACT_HIGH_OFF
|
||||
short: Under/over-current motor failure limit offset
|
||||
long: Check is triggered if `abs(FD_ACT_MOT_C2T * thrust - FD_ACT_OFF)` is above this value.
|
||||
type: float
|
||||
default: 10.0
|
||||
min: 0
|
||||
|
||||
Reference in new issue
Block a user