Skip to content

Add support for Loweheiser generator #29587

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

Merged
merged 7 commits into from
Apr 9, 2025

Conversation

Georacer
Copy link
Contributor

@Georacer Georacer commented Mar 21, 2025

Summary

This PR adds support for Loweheiser-brand on-board generators.

Details

Simulation files for this generator already existed in ArduPilot (and some autotests). This PR adds the actual driver.

The bulk of the logic was written by @peterbarker, for ArduPilot 4.2. I did the rebasing to master.

Many thanks to Harris Aerial who sponsored this work.

I do not have hands-on experience with the hardware, so any and all reviews are welcome.

Testing

New autotests have been added to explore some of the functionality.

Harris Aerial have tested their rebased branch (along with other commits) and report that their aircraft carrying the generator works as before.

Loweheiser's people tested Harris' branch and report that their system works as expected.

Known issues

EFI - Generator interdependency

This driver has a common backend for the EFI and the generator, which belongs to AP_Generator. That means that the AP_EFI_Loweheiser define needs to take into account that the generator part is also defined. Otherwise, there are builds that include EFI, don't include Generator, and thus fail due to include dependency failures.
This seems to do the job:

#ifndef AP_EFI_LOWEHEISER_ENABLED
#define AP_EFI_LOWEHEISER_ENABLED AP_EFI_BACKEND_DEFAULT_ENABLED && AP_GENERATOR_LOWEHEISER_ENABLED
#endif

although AP_EFI now has a dependency on AP_Generator.

Prearm behaviour

Harris Aerial reports that if the generator is hot (from a previous run), and is set in "run mode", then the UA will arm even though the generator is not actually running.

Miscellaneous

The branch that @peterbarker worked on also contained some small improvements for the Intelligent Energy 2.4kW fuel cell. These were sneaked in this PR as well.

@Georacer Georacer requested a review from peterbarker March 21, 2025 13:23
@Georacer
Copy link
Contributor Author

The build fails seemingly due to .h include issues. I'm investigating.

@Georacer Georacer force-pushed the pr/loweheiser_generator branch 3 times, most recently from 279cd36 to 70c9083 Compare March 21, 2025 14:32
@Georacer Georacer force-pushed the pr/loweheiser_generator branch 3 times, most recently from 08f48e9 to e4d038d Compare March 22, 2025 20:56
@@ -25,3 +25,7 @@
#ifndef AP_GENERATOR_RICHENPOWER_ENABLED
#define AP_GENERATOR_RICHENPOWER_ENABLED AP_GENERATOR_BACKEND_DEFAULT_ENABLED && HAL_PROGRAM_SIZE_LIMIT_KB > 1024
#endif

#ifndef AP_GENERATOR_LOWEHEISER_ENABLED
#define AP_GENERATOR_LOWEHEISER_ENABLED AP_GENERATOR_BACKEND_DEFAULT_ENABLED
Copy link
Contributor

Choose a reason for hiding this comment

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

&& HAL_PROGRAM_SIZE_LIMIT_KB > 1024

Copy link
Contributor

Choose a reason for hiding this comment

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

for custom build only use HAL_PROGRAM_SIZE_LIMIT_KB > 2048
that would be my preference

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@tridge
Copy link
Contributor

tridge commented Apr 2, 2025

@peterbarker I think you better review this one

@tridge tridge removed the DevCallEU label Apr 2, 2025
@tridge
Copy link
Contributor

tridge commented Apr 2, 2025

needs to be added into Tools/scripts/build_options.py

@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label Apr 2, 2025
Copy link
Collaborator

@Hwurzburg Hwurzburg left a comment

Choose a reason for hiding this comment

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

This needs IFDEF additions to make it an optional addition(defaulted as not being included since its a rare application) as well as entries in build_options and extract_features

@Georacer Georacer force-pushed the pr/loweheiser_generator branch from e4d038d to a912087 Compare April 8, 2025 13:08
@Georacer
Copy link
Contributor Author

Georacer commented Apr 8, 2025

needs to be added into Tools/scripts/build_options.py

Done. Please check my work, that's the first time I edit this file.

@Georacer
Copy link
Contributor Author

Georacer commented Apr 8, 2025

This needs IFDEF additions to make it an optional addition(defaulted as not being included since its a rare application) as well as entries in build_options and extract_features

This has now been marked with HAL_PROGRAM_SIZE_LIMIT_KB > 2048, which means it will only get build in SITL by default (or at least on boards with woads of space).

@Georacer Georacer force-pushed the pr/loweheiser_generator branch from a912087 to beabafa Compare April 8, 2025 13:12
@tridge tridge merged commit a63ce3a into ArduPilot:master Apr 9, 2025
102 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevCallEU WikiNeeded needs wiki update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants