It is bugging me a little bit how rcCommand[THROTTLE] is used both for the RC input and for the throttle output. To the point that correction on the throttle are done like rcCommand[THROTTLE]+= throttleAngleCorrection;
Wouldn't it be more coherent with the rest of the code to have a value axisPID[THROTTLE] and use that in mixTable().
It will require a little work here and there in the code, but will make future coding more neat.
What about axisPID[THROTTLE]
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: What about axisPID[THROTTLE]
iosonologio wrote:It is bugging me a little bit how rcCommand[THROTTLE] is used both for the RC input and for the throttle output. To the point that correction on the throttle are done like rcCommand[THROTTLE]+= throttleAngleCorrection;
Wouldn't it be more coherent with the rest of the code to have a value axisPID[THROTTLE] and use that in mixTable().
I'm not sure. Global trust due to THROTTLE is something which is constant whatever axisPID values.
-
- Posts: 13
- Joined: Sun Sep 22, 2013 5:46 pm
Re: What about axisPID[THROTTLE]
Alexinparis wrote: Global trust due to THROTTLE is something which is constant whatever axisPID values.
Well, that's only partially true, with the new THROTTLE_ANGLE_CORRECTION the trust depend on the angle. and even more, throttle angle correction and althold work on rcCommand[THROTTLE] directly, in separate part of the code. it seems to me that having a dedicated "output thrust" parameter would clean up the code, and an axisPID[THROTTLE] seems to me the most logical implementation.