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
Plane: add compassmot functionality to Plane #17801
base: master
Are you sure you want to change the base?
Conversation
…t interference Procedure emulating how ArduCopter does compassmot ported over to Plane
+1 |
|
||
// pass through throttle to motors | ||
SRV_Channels::cork(); | ||
SRV_Channels::set_output_scaled(SRV_Channel::k_throttle, get_throttle_input(true)); |
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.
Should also output left and right throttles, we probably also want a option to do CMOT based on forward or vertical motors.
Co-authored-by: Peter Hall <33176108+IamPete1@users.noreply.github.com>
i think @tridge probably needs to take a look at this, i like the idea, so long as there's no trip-hazards that i'm not aware of. :-) |
the main reason this hasn't been done before is it is so easy to get the right compassmot based on a log and the MagFit option in MAVExplorer. I'll be interested in seeing what the flash cost of this feature is and if it is worth having |
fix if/else statement
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.
if we want this for planes then we should redo this as a common library between plane and copter, and support quadplanes. It should be async like we've done for the motortest
@@ -176,6 +176,12 @@ class Plane : public AP_Vehicle { | |||
Parameters g; | |||
ParametersG2 g2; | |||
|
|||
// main loop scheduler | |||
AP_Scheduler scheduler; |
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.
why this?
Procedure emulating how ArduCopter does compassmot ported over to Plane. Small changes had to be made between the copter version and plane to allow rc input for throttle to be passed through during calibration.
Process was verified on hardware, confirming the fail-safe procedures work as intended.