mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 16:48:52 +08:00
Helicopter mixer scale throttle to -1 .. +1
Not sure why it worked for me without this change. I cannot test it myself. Should fix https://github.com/PX4/Firmware/issues/8013
This commit is contained in:
committed by
Lorenz Meier
parent
353caec1af
commit
adba797323
@@ -252,7 +252,7 @@ HelicopterMixer::mix(float *outputs, unsigned space)
|
||||
/* Local throttle curve gradient and offset */
|
||||
float tg = (_mixer_info.throttle_curve[idx + 1] - _mixer_info.throttle_curve[idx]) / 0.25f;
|
||||
float to = (_mixer_info.throttle_curve[idx]) - (tg * idx * 0.25f);
|
||||
float throttle = constrain((tg * thrust_cmd + to), 0.0f, 1.0f);
|
||||
float throttle = constrain(2.0f * (tg * thrust_cmd + to) - 1.0f, -1.0f, 1.0f);
|
||||
|
||||
/* Local pitch curve gradient and offset */
|
||||
float pg = (_mixer_info.pitch_curve[idx + 1] - _mixer_info.pitch_curve[idx]) / 0.25f;
|
||||
|
||||
Reference in New Issue
Block a user