Skip to content
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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jordan16ellis
Copy link

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.

…t interference

Procedure emulating how ArduCopter does compassmot ported over to Plane
@mday299
Copy link
Contributor

mday299 commented Jun 25, 2021

+1


// pass through throttle to motors
SRV_Channels::cork();
SRV_Channels::set_output_scaled(SRV_Channel::k_throttle, get_throttle_input(true));
Copy link
Member

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.

ArduPlane/compassmot.cpp Outdated Show resolved Hide resolved
Co-authored-by: Peter Hall <33176108+IamPete1@users.noreply.github.com>
@davidbuzz
Copy link
Collaborator

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. :-)

@tridge
Copy link
Contributor

tridge commented Jul 7, 2021

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

@tridge tridge removed the DevCallEU label Jul 7, 2021
fix if/else statement
Copy link
Contributor

@tridge tridge left a 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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants