Hi @williangalvani, @Elliott , we are opening this forum again.
We were able to make the code executable, and test it but we are having some issues at the moment.
I modified just a little the code, previously the code will spin in one direction (certain degrees per second), wait, and then come back to same position.
At the moment, the code just make the ROV spin 180 degrees and stay there, just that.
But we are seeing that the spin instead of being on the roll axis (or pitch axis), it is spining on the yaw axis, in other words, is never reaching the upside-down position.
We have calibrate and re-calibrate orientation, sensor, compass, etc.
QGround is showing the correct orientations and positions, thus we believe the issue is not on that side.
Something worth saying is that when running on Manual mode, some joystick signals are mixed, ex. Forwards is backwards, sometimes the throttle is yaw, forward is left, etc.
We have run several times joystick calibration, sensor calibrations, it corrects, but when disarmed and arm again, this MAY happen again. On joystick calibration sometimes we faced issues as the throttle not behaving as expecting, jiterring or stickin in place.
I think these two problems are related, but not so sure how to correct them.
We are thinking on changing the controller, but still, even if the controller is bad, shouldnt the code work as expected, as it relies on the sensors signals?
Thanks in advance.