Skip to content

Commit

Permalink
AP_Motors:explain PMWRange/Angle PWM types in metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Hwurzburg committed Apr 30, 2024
1 parent 484ce40 commit 182d259
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/AP_Motors/AP_MotorsMulticopter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const AP_Param::GroupInfo AP_MotorsMulticopter::var_info[] = {

// @Param: PWM_TYPE
// @DisplayName: Output PWM type
// @Description: This selects the output PWM type, allowing for normal PWM continuous output, OneShot, brushed or DShot motor output
// @Description: This selects the output PWM type, allowing for normal PWM continuous output, OneShot, brushed or DShot motor output. PWMRange and PWMAngle are PWM special/rare cases for ESCs that dont calibrate normally (some Sub motors) or where each ESC must have its PWM range set individually using the Servo params instead of PWM_MIN/MAX parameters.
// @Values: 0:Normal,1:OneShot,2:OneShot125,3:Brushed,4:DShot150,5:DShot300,6:DShot600,7:DShot1200,8:PWMRange,9:PWMAngle
// @User: Advanced
// @RebootRequired: True
Expand Down Expand Up @@ -375,7 +375,7 @@ float AP_MotorsMulticopter::get_current_limit_max_throttle()
_throttle_limit += (_dt / (_dt + _batt_current_time_constant)) * (1.0f - batt_current_ratio);

// throttle limit drops to 20% between hover and full throttle
_throttle_limit = constrain_float(_throttle_limit, 0.2f, 1.0f);
_throttle_limit = constrain_float(_throttle_limit, 0.2f, 1.0fPWMRange and PWMAngle are PWM special/rare cases for ESCs that dont calibrate normally (some Sub motors) or where each ESC must have its PWM range set individually using the Servo params instead of PWM_MIN/MAX parameters.);

// limit max throttle
return get_throttle_hover() + ((1.0 - get_throttle_hover()) * _throttle_limit);
Expand Down

0 comments on commit 182d259

Please sign in to comment.