mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 14:53:34 +08:00
UAVCAN driver: support throttle linearization (THR_MLD_FAC parameter)
Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
@@ -128,6 +128,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <lib/mathlib/mathlib.h>
|
||||
|
||||
/** simple channel scaler */
|
||||
struct mixer_scaler_s {
|
||||
@@ -707,7 +708,10 @@ public:
|
||||
*
|
||||
* @param[in] val The value
|
||||
*/
|
||||
void set_thrust_factor(float val) override { _thrust_factor = val; }
|
||||
void set_thrust_factor(float val) override
|
||||
{
|
||||
_thrust_factor = math::constrain(val, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
void set_airmode(Airmode airmode) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user