ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

Disable autostart for Loweheiser generator

Open Georacer opened this issue 4 months ago • 7 comments

Summary

This PR removes support for auto-starting the Loweheiser generator. Now the user has to assign a starter switch channel and start the engine during IDLE state.

Details

The reason is that, according to the manufacturer and a commercial user, it's not 100% reliable to use the starter (which is optional, as an alternative to a ripcord) so it's preferable for the user to trigger it intentionally.

Note: This PR has been re-written and re-coded from scratch.

This is a follow-up to https://github.com/ArduPilot/ardupilot/pull/29587.

Known issues

After this PR, the engine won't auto-start any longer if the engine stalls mid-flight. Also the user can't re-start it in-flight either, as starting is allowed only in IDLE state, and state changes are not allowed while armed.

Georacer avatar Oct 22 '25 16:10 Georacer

@alfmh after the discussions between Ben Harris and yourself, I have made it so that by default the starter is operated manually. Also, instructions for use have been PRed in the wiki.

Could you please review and test the instructions and tell us whether the driver works as intended and you are happy with the result?

Georacer avatar Oct 22 '25 23:10 Georacer

@peterbarker now all user inputs are gated by an rc().is_valid().

The user is indeed now able to run the starter in all states except STOP, this is intentional. Scenario: You don't have an auto-starter and you're flying. The engine stops and you want to be able to re-start it on the spot, without going through the COOLDOWN->IDLE transition, which involves waiting and input on another channel.

I've also done a (major) refactoring of command_generator(). In my opinion it's now much cleaner to see which input is controlled when.

Georacer avatar Oct 23 '25 22:10 Georacer

I notice that I can't build locally for CubeOrangePlus with ./waf configure --board CubeOrangePlus --define=AP_GENERATOR_LOWEHEISER_ENABLED, unless I also add --define=HAL_GENERATOR_ENABLED=1, which I didn't expect to have to. Isn't this enabled by default in CubeOrangePlus?

Georacer avatar Oct 23 '25 23:10 Georacer

Hi @Georacer ,

In our case we can build the code for Cube Orange, pixhawk4 and pixhawk5x, but we can't get telemetry or send commands to the generator. Also we can't configure all params than in the old version that was working.

Could share the repository where you are fixing the code for testing generator?

Best regards, Alfonso

alfmh avatar Oct 24 '25 04:10 alfmh

@alfmh , this here is the repository that is working for me: Georacer:pr/loweheiser_disable_autostart.

Did you check out this branch, or were you still attempting to make it work with ArduPilot/master? How are you building the firmware?

Can you share a flight log with your attempt? Please set LOG_DISARMED=1, so that messages are logged even when you are not armed.

Georacer avatar Oct 24 '25 10:10 Georacer

I notice that I can't build locally for CubeOrangePlus with ./waf configure --board CubeOrangePlus --define=AP_GENERATOR_LOWEHEISER_ENABLED, unless I also add --define=HAL_GENERATOR_ENABLED=1, which I didn't expect to have to. Isn't this enabled by default in CubeOrangePlus?

We don't build any generator in by default on master.

https://github.com/ArduPilot/ardupilot/pull/30335 is supposed to resolve the need to add dependencies yourself on the command-line. I rarely actually use the command-line, I create a small extra.hwdef file to build more things in (you still need to add the deps yourself ;-) )

peterbarker avatar Oct 24 '25 23:10 peterbarker

I find it surprising that we might go through cooldown if we detect 0 rpm (this is distinct from "no data")

peterbarker avatar Oct 29 '25 07:10 peterbarker