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

[FEATURE] Prearm #6562

Merged
merged 3 commits into from
Feb 26, 2021
Merged

[FEATURE] Prearm #6562

merged 3 commits into from
Feb 26, 2021

Conversation

harryjph
Copy link
Contributor

@harryjph harryjph commented Feb 3, 2021

This PR implements a Prearm (#5595). It adds a new mode switch which will need a relevant configurator PR.

I also took the opportunity to fix this FIXME by separating out the armingFlags enum into Arming Flags (flags relating to the current arming) and Arming Disable Flags (flags that prevent arming). This forms the bulk of this PR as I gave the macros clearer names.

@DzikuVx DzikuVx requested a review from digitalentity February 3, 2021 08:24
@DzikuVx DzikuVx added this to the 2.7 milestone Feb 3, 2021
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.

LGTM @digitalentity WDYT?

Copy link
Member

@digitalentity digitalentity left a comment

Choose a reason for hiding this comment

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

Looks good in general. Just a few things:

  1. Please remove the breaking separation into armingFlags and armingDisabledFlags. Configurator and other external peripherals depend on that bitfield.
  2. I don't fully undestand the logic behind the additional ARMED_WITH_PREARM flag. Can't we process the prearm bit always?
  3. Optimization regarding checking for "prearm" mode being present. We shouldn't be evaluating the whole aux table every cycle.

src/main/fc/fc_msp.c Outdated Show resolved Hide resolved
src/main/fc/fc_core.c Outdated Show resolved Hide resolved
src/main/fc/fc_core.c Show resolved Hide resolved
@stronnag
Copy link
Collaborator

stronnag commented Feb 3, 2021

Please do not break established APIs; they are used by multiple 3rd party applications.

@harryjph
Copy link
Contributor Author

harryjph commented Feb 3, 2021

Thanks for the review! In response to the review:

  1. Done
  2. Honestly can't remember myself, I've removed it now.
  3. Done, please see second commit

Copy link
Member

@digitalentity digitalentity left a comment

Choose a reason for hiding this comment

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

A minor nit to cover for an edge-case. Otherwise - LGTM

src/main/fc/fc_core.c Show resolved Hide resolved
src/main/fc/rc_modes.c Show resolved Hide resolved
@stronnag stronnag added the Release Notes Add this when a PR needs to be mentioned in the release notes label Feb 4, 2021
@DzikuVx DzikuVx merged commit 77d03bf into iNavFlight:master Feb 26, 2021
@harryjph harryjph deleted the prearm branch February 28, 2021 16:57
@harryjph harryjph mentioned this pull request Feb 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release Notes Add this when a PR needs to be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants