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

Make camera mount and solo gimbal board configured features #14899

Merged
merged 8 commits into from
Aug 3, 2020

Conversation

andyp1per
Copy link
Collaborator

This PR saves a ton of flash:

  • Turn the camera mount into a board level feature controlled by HAL_MOUNT_ENABLED
  • Turn the solo gimbal into a board feature controlled by HAL_SOLO_GIMBAL_ENABLED (props for the name!)
  • disable the camera mount on mini boards - the intersection of mini board builds and gimbals has got to be close to zero
  • disable the solo gimbal on kakute and omnibus 1mB boards - against users close to zero (could do this for all 1mb boards)

Saves 18k flash on the 1mB boards
Saves 24k flash on the mini boards

libraries/AP_Camera/AP_Camera.cpp Show resolved Hide resolved
libraries/AP_Mount/AP_Mount.h Show resolved Hide resolved
libraries/AP_Mount/AP_Mount.h Outdated Show resolved Hide resolved
@khancyr
Copy link
Contributor

khancyr commented Jul 24, 2020

I love this !

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.

just a small change to make solo gimbal off by default, and enabled on 2M boards

libraries/AP_HAL_ChibiOS/hwdef/KakuteF4/hwdef.dat Outdated Show resolved Hide resolved
@Pedals2Paddles
Copy link
Contributor

So this looks like it is enabled by default and disabled in hwdef where specifically not wanted? Would it be even better to disable the solo gimbal by default, requiring it to be enabled in the hwdef? That can be enabled for the solo's build target hwdef files only. And not exist in all the rest that don't need it.

@andyp1per
Copy link
Collaborator Author

@Pedals2Paddles it's disabled by default on all 1Mb boards - see AP_Mount.h

@Pedals2Paddles
Copy link
Contributor

I see where it's disabled on the 1MB boards. I'm not seeing where it is actually defined as enabled to begin with? I'm actually suggesting we save the flash space on all boards by only enabling the Solo gimbal in the hwdef files for the build targets for the Solo.

@andyp1per
Copy link
Collaborator Author

It's enabled on 2MB boards in AP_Mount.h. But happy to disable everywhere if you can give me the list where it should be enabled?

@tridge tridge merged commit baf92a1 into ArduPilot:master Aug 3, 2020
@hdtechk
Copy link
Contributor

hdtechk commented Aug 3, 2020

Just a comment here I have a copter that is not a solo that has a solo gimbal installed. I personally would like to see it stay on 2M boards

@andyp1per andyp1per deleted the pr-mount-feature branch August 4, 2020 08:09
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.

6 participants