-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rot mech fix pr #3180
Rot mech fix pr #3180
Conversation
@tmldeponti Thanks for the proposed update. This is indeed a problem! I think that the existing code is writing outside the array (fortunately only in simulation, but still)! Why can the simulator not simply use the same actuator IDX as the autopilot code? This way it would first of all not be outside the array (crucial), be similar to the flight code, but also not require extra defines. |
@dewagter Indeed manually specifying an index without any checks can result in out of bounds. I also agree that the ap can be coded to use actuator_pprz[whatever_index_the_rot_mech_is] instead of wing_rotation_controller.servo_pprz_cmd as currently coded in the 3b airframe. I could though see some problems with that:
ANDI can of course be removed from the name. |
f970f02
to
b6c4a5b
Compare
Addresses #3179 |
I agree there must be a way to have any combination of
To me, in paparazzi, this list is called I just think that adding defines about which element of the array to use is so terribly error prone it should not be the way to go. Here the index must match the first place after the actuators set by control, but should still fit in the array. This is all not checked and will lead to bugs. One possible alternative is suggested in #3203 ... and if that is not working out we will need another way. |
This is to fix the depndency of the rot controller servo module (NPS) from INDI related variables. The IDX of the servo of the rotation mechanism can (and has) to be defined in the airframe, not dependent on assumptions regarding the number of INDI actuators.