-
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
Autopilot refactor #2009
Autopilot refactor #2009
Conversation
With this, fixedwing and rotorcraft are mostly using the same interface for the autopilot. Some specific code and messages handling are still firmware dependent. A large part of the autopilot logic of the fixedwing is moved from main_ap to autopilot_static. More getter/setter functions are provided.
for using the refactored autopilot API
WOW thx, yeah, merge FW and rotorcraft the sooner the better. Will see how I can quickly fix just move airframes... or @gautierhattenberger you can do it you want pull request honored now |
autopilot_mode != AP_MODE_MODULE && | ||
autopilot_mode != AP_MODE_FLIP && | ||
autopilot_mode != AP_MODE_GUIDED) { | ||
autopilot_get_mode() != AP_MODE_KILL && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a chance "autopilot_get_mode()" is different between calls and would "autopilot.mode" as a value maybe be better here and in the next 6 also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand your question...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OpenUAS it will have exactly the same behavior than before, it is just a simple getter function that doesn't change the variable. The only possible inconsistency is if you start changing the mode without proper protection in multi-threaded environment or in interrupts. It is not the case at the moment (and hopefully it will never be the case!).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gautierhattenberger, yes, that was indeed my worry, mode change with unintended effect. But since you also testfly a lot we both will discover and inconsistency soon ;-) . Thanks for the code integration, really appreciated 🥇
conf/modules/actuators_dummy.xml
Outdated
</description> | ||
</doc> | ||
<header/> | ||
<makefile/> | ||
<makefile> | ||
<configure name="ACTUATORS"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should rather use <configure name="ACTUATORS" value="none"/>
?
That might be more clear and also consistent with the configure option we have for LEDs....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a nice way to test that ACTUATORS
is either null, undefined or equal to none
on this line: https://github.com/paparazzi/paparazzi/blob/master/conf/firmwares/fixedwing.makefile#L33 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hum... I guess defaulting to none
just before should be enough
tested and working on fixedwing (Apogee) and rotorcraft (elle0), using the static autopilot. |
What do we do about the functionality to get out of home mode by clicking on the strip? |
With this the firmware should be automatically detected and if not, the button is not connected. |
* [autopilot] refactor autopilot API for both firmwares With this, fixedwing and rotorcraft are mostly using the same interface for the autopilot. Some specific code and messages handling are still firmware dependent. A large part of the autopilot logic of the fixedwing is moved from main_ap to autopilot_static. More getter/setter functions are provided. * [autopilot] update the rest of the system and the conf for using the refactored autopilot API * [autopilot] fix some errors from CI servers * [actuators] use dummy actuators module to prevent autoloading * Rename Bart_heliDD_INDI.xml to tudelft_bs_helidd_indi.xml * Rename Bart_heliDD_pid.xml to tudelft_bs_helidd_pid.xml * Delete tudelft_course2016_bebop_colorfilter.xml * Delete tudelft_course2016_bebop_avoider.xml * [actuators] don't autoload actuators when set to 'none' * [gcs] autodetect firmware for strip mode button
* [autopilot] refactor autopilot API for both firmwares With this, fixedwing and rotorcraft are mostly using the same interface for the autopilot. Some specific code and messages handling are still firmware dependent. A large part of the autopilot logic of the fixedwing is moved from main_ap to autopilot_static. More getter/setter functions are provided. * [autopilot] update the rest of the system and the conf for using the refactored autopilot API * [autopilot] fix some errors from CI servers * [actuators] use dummy actuators module to prevent autoloading * Rename Bart_heliDD_INDI.xml to tudelft_bs_helidd_indi.xml * Rename Bart_heliDD_pid.xml to tudelft_bs_helidd_pid.xml * Delete tudelft_course2016_bebop_colorfilter.xml * Delete tudelft_course2016_bebop_avoider.xml * [actuators] don't autoload actuators when set to 'none' * [gcs] autodetect firmware for strip mode button
* [autopilot] refactor autopilot API for both firmwares With this, fixedwing and rotorcraft are mostly using the same interface for the autopilot. Some specific code and messages handling are still firmware dependent. A large part of the autopilot logic of the fixedwing is moved from main_ap to autopilot_static. More getter/setter functions are provided. * [autopilot] update the rest of the system and the conf for using the refactored autopilot API * [autopilot] fix some errors from CI servers * [actuators] use dummy actuators module to prevent autoloading * Rename Bart_heliDD_INDI.xml to tudelft_bs_helidd_indi.xml * Rename Bart_heliDD_pid.xml to tudelft_bs_helidd_pid.xml * Delete tudelft_course2016_bebop_colorfilter.xml * Delete tudelft_course2016_bebop_avoider.xml * [actuators] don't autoload actuators when set to 'none' * [gcs] autodetect firmware for strip mode button
With this, fixedwing and rotorcraft are mostly using the same interface for the autopilot. Some specific code and messages handling are still firmware dependent.
A large part of the autopilot logic of the fixedwing is moved from main_ap to autopilot_static.
More getter/setter functions are provided.
The rest of the systems, the simulators and the configurations are also updated. Unfortunately it does have a small impact on airframe configurations and flight plans when variables where directly used.
The functionality of the strip to go back to nav mode (when clicking on mode status) is disabled for now as FW and rotorcraft nav have different index.