Skip to content
Snippets Groups Projects
Commit adba7973 authored by Bart Slinger's avatar Bart Slinger Committed by Lorenz Meier
Browse files

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
parent 353caec1
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment