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

Mixer profile to open the posibility for vtol/mixed platform #8555

Merged
merged 69 commits into from
Sep 28, 2023

Conversation

shota3527
Copy link
Contributor

@shota3527 shota3527 commented Nov 13, 2022

I think this mixer_profile approach for VTOL requires the least amount of work for supporting VTOL. switching the PID/nav controllers between MC and FW.

how to setup

https://github.com/shota3527/inav/blob/sh_mixer_profile/docs/MixerProfile.md

known issues

  • VTOL plane in multi-rotor mode can trigger false landing detection in RTH landing in a headwind. set nav_disarm_on_landing to OFF might help
  • VTOL plane in multi-rotor mode struggles in windy conditions due to its physical limit

updates in 202030725:

https://www.youtube.com/watch?v=6_4D3aLc8G8&t=204s
INAV_7.0.0_cli_20230725_130613.txt

old post:

It is still in development.
real flight on commit id:e0db9ae4c920530d405822f186f3b90f6aaddd2b
https://www.youtube.com/watch?v=9JEAN-SsOKw&t=2s
cli diff
INAV_6.0.0_cli_20221119_095038.txt

It is very experiential and it may cause a crash or flyaway or fly a servo
It should be ok unless mixer_profile other than 1 is used. May break a lot of things when performing a hot switch between profiles. reviews from other developers are appreciated

bench test
https://studio.youtube.com/video/aomNk
diff file used in video:
INAV_6.0.0_cli_20221113_225555.txt

@shota3527
Copy link
Contributor Author

shota3527 commented Aug 28, 2023

Can you add the same functionality to the another FC board - Speedybee F405 wing?

@macgyverek
You can find it here by P-I-Engineer
https://github.com/P-I-Engineer/inav-piengr/tree/pi-shotamixer/src/main/target/SPEEDYBEEF405WING

sorry, I will not make target.c for another FC board because everyone prefers different pin mapping, I think It is better to leave the target.c to the manufacturer.

If you are not familiar with the compiling your firmware, i can send you a precompiled one

@P-I-Engineer
Copy link
Contributor

Can you add the same functionality to the another FC board - Speedybee F405 wing?

you can pull this into your build or copy or whatever
https://github.com/P-I-Engineer/inav-piengr/tree/pi-shotamixer/src/main/target/SPEEDYBEEF405WING

@P-I-Engineer
Copy link
Contributor

https://www.youtube.com/watch?v=4X8yEgraxN4

@shota3527 shota3527 marked this pull request as ready for review September 10, 2023 11:20
@DzikuVx DzikuVx added this to the 7.0 milestone Sep 19, 2023
Copy link
Member

@DzikuVx DzikuVx left a comment

Choose a reason for hiding this comment

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

@shota3527 2 comments from my side. Plus, we will have to make some adjustments to Configurator to cope with the changes. And of course the removal of MOTOR_STOP what is good :)

src/main/drivers/pwm_mapping.c Outdated Show resolved Hide resolved
src/main/flight/mixer_profile.h Outdated Show resolved Hide resolved
@shota3527
Copy link
Contributor Author

@DzikuVx
bench tested and sim tested on commit e4984a5
I have implemented the MSP to support the moved motor stop feature
Once configurator made changes on the motor stop feature, This PR should function same as master unless new feature from mixer_profie is used.

    case MSP2_INAV_MIXER:
        sbufWriteU8(dst, mixerConfig()->motorDirectionInverted);
        sbufWriteU8(dst, 0);
        sbufWriteU8(dst, mixerConfig()->motorstopOnLow);
        sbufWriteU8(dst, mixerConfig()->platformType);
        sbufWriteU8(dst, mixerConfig()->hasFlaps);
        sbufWriteU16(dst, mixerConfig()->appliedMixerPreset);
        sbufWriteU8(dst, MAX_SUPPORTED_MOTORS);
        sbufWriteU8(dst, MAX_SUPPORTED_SERVOS);
        break;

@shota3527
Copy link
Contributor Author

corresponding configurator pull request
iNavFlight/inav-configurator#1829

@DzikuVx DzikuVx merged commit 497c01e into iNavFlight:master Sep 28, 2023
15 checks passed
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.

8 participants