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

AP_BattMonitor: added a "battery" backend for liquid fuel flow #10790

Merged
merged 1 commit into from
Mar 19, 2019

Conversation

tridge
Copy link
Contributor

@tridge tridge commented Mar 12, 2019

This is for sensors that give a pulse for each fixed volume of fuel.

Output is:
- current in Amps maps to in litres/hour
- consumed mAh is in consumed millilitres
- fixed 1.0v voltage

Here is an example sensor suitable for this driver:
https://www.btflowmeter.com/en/flow-meter-products/flow-meters-lowflow-flowmeters-low-flow-turbine-flow-meter-fuel-flow-meters-diesel-fuel-flow-meter-watermeters-paddlewheel-flow-meter-oil-flow-meter-oilflowmeter-waterflowmeter-water-meters-turbineflowmeter-oilflowmeter/mini-flowmeter-fch-mini-pp-series-chemical/fch-m-pp-30-lpm-97478169-lc.html

Thanks to RFDesign for sponsoring the development of this driver!

Copy link
Contributor

@WickedShell WickedShell left a comment

Choose a reason for hiding this comment

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

Outside of the inline comments do you have a link to the actual/example sensor that this is adding support for?

libraries/AP_BattMonitor/AP_BattMonitor_FuelFlow.cpp Outdated Show resolved Hide resolved
libraries/AP_BattMonitor/AP_BattMonitor_FuelFlow.cpp Outdated Show resolved Hide resolved
libraries/AP_BattMonitor/AP_BattMonitor_FuelFlow.cpp Outdated Show resolved Hide resolved
libraries/AP_BattMonitor/AP_BattMonitor_FuelFlow.h Outdated Show resolved Hide resolved
@tridge tridge force-pushed the pr-fuel-flow branch 2 times, most recently from e4b642a to 9ded514 Compare March 12, 2019 20:42
This is for sensors that give a pulse for each fixed volume of fuel.

Output is:
    - current in Amps maps to in litres/hour
    - consumed mAh is in consumed millilitres
    - fixed 1.0v voltage
@davidbuzz
Copy link
Collaborator

looks good, but I note that there's no way to zero the "consumed" amount other than a reboot, which isn't always a practical pre-flight solution with the engine already running. Eg, many fuel-based RC planes use a "taxi tank" or "startup tank" which keeps the in-board tanks full right up to the moment of departure, so it would be helpful to be able to zero the consumed amount/s. ( ie _state.consumed_wh and _state.consumed_mah are never reset back to zero anywhere, maybe a mavlink packet to do it? )

@tridge
Copy link
Contributor Author

tridge commented Mar 17, 2019

@davidbuzz yes, it should be part of the PREFLIGHT_CALIBRATION options

@tridge tridge requested a review from WickedShell March 17, 2019 22:28
@tridge tridge merged commit 5571a84 into ArduPilot:master Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants