Commit Graph

72 Commits

Author SHA1 Message Date
Patrick José Pereira d190fff887 AP_BattMonitor: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Peter Barker 00a8a8fe8e AP_BattMonitor: use enum class For Battery Failsafe 2020-12-07 15:20:14 +11:00
Tom Pittenger 171a10e117 AP_BattMonitor: Add support for multiple UAVCAN batteries from a single node 2020-11-25 14:20:53 +11:00
Gone4Dirt 836717c0af AP_BattMonitor: Add support for AP_Generator frontend-backend 2020-11-24 12:54:52 +11:00
Nick Belanger dbe5b90398 AP_BattMonitor: Adding driver for Rotoye Batmon equipped smart batteries 2020-11-11 14:24:13 +11:00
Peter Barker 2e3ba2a4d2 AP_BattMonitor: move battery type enumeration out of parameters object 2020-08-11 13:21:52 +10:00
Peter Barker 8e708a0a32 AP_BattMonitor: add backend for generator supply 2020-07-03 08:21:42 +09:00
Randy Mackay 3e519b25a4 AP_BattMonitor: fix comments re voltage scaling 2020-06-24 10:19:15 +09:00
Randy Mackay cc6298e7ac AP_BattMonitor: SMBus Generic reads up to 12 cell voltages
Checks for the highest cell for 15 seconds and then reduces the cell voltage calls to cover only those cells that actually exist

also renames SMBus _last_cell_update_us
2020-06-24 10:19:15 +09:00
Randy Mackay 4ea565e4ed AP_BattMonitor: Maxell driver inherits from SMBus_Generic 2020-06-05 16:57:39 -07:00
Randy Mackay f869cd9aa6 AP_BattMonitor: complete rename of SMBus_Maxell to Generic 2020-06-05 16:57:39 -07:00
Randy Mackay 300c0aafb1 AP_BattMonitor: add cycle count for smbus batteries 2019-12-18 15:54:42 +11:00
Andrew Tridgell fbe69ba9ab AP_BattMonitor: support selective enable of SMBUS and fuel battery monitors 2019-12-09 21:35:00 +11:00
James e474b7dcfe AP_BattMonitor: add PWM Fuel Level Sensor
this sensor produces PWM between 1100 and 1900, giving fuel level as a
percentage
2019-08-05 11:35:16 +10:00
Michael du Breuil 0a4e3a77b3 AP_BattMonitor: Refactor interface for fetching current related data 2019-07-14 00:28:00 -07:00
Andrew Tridgell 11518857b6 AP_BattMonitor: added reset_remaining() API
used to allow battery swap before takeoff
2019-06-25 09:56:25 +10:00
Michael du Breuil e177db7dcd AP_BattMonitor: Remove unused method, make some public functions private 2019-04-26 08:07:19 +10:00
Andrew Tridgell 5571a84a49 AP_BattMonitor: added a "battery" backend for liquid fuel flow
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
2019-03-19 11:35:59 +11:00
Michael du Breuil d96aad86a5 AP_BattMonitor: Make type() const 2019-03-11 22:42:59 +00:00
Tom Pittenger 8ef4616bc2 AP_BattMonitor: unify singleton naming to _singleton and get_singleton() 2019-02-10 19:09:58 -07:00
Matt 134e7fb81c AP_BattMonitor: Add powering off mavlink broadcast 2019-01-28 15:35:04 -07:00
Andrew Tridgell 25247433dc AP_BattMonitor: added Sum backend type
this is used to combine battery monitors into a single reporting
unit. It operates on all instances beyond itself
2018-11-30 13:02:35 +11:00
Michael du Breuil 8b3d993b1e AP_BattMonitor: Enable 9 battery monitors 2018-10-09 00:44:46 +01:00
Michael du Breuil 0137d6543f AP_BattMonitor: Allow AP_BattMonitor to run arming checks 2018-10-09 00:44:46 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas 24c1b0890d AP_BattMonitor: NFC improve coments 2018-03-28 17:01:33 +09:00
Michael du Breuil 4a11093ebb AP_BattMonitor: Support critical and low battery failsafes
Also removes the example script, as it was broken, and causing more
headaches then it was worth
2018-03-27 22:12:21 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas 6cbeb73d1b AP_BattMonitor: NFC rename functions and variables to match their functionality 2018-03-03 17:16:34 +00:00
DOMINATOR\Eugene fcccc0174b AP_BattMonitor: UAVCAN battery information added 2018-03-02 11:48:00 +12:00
Holger Steinhaus 7383552ebc AP_BatteryMonitor: count mWh spent since powerup 2018-02-06 20:00:16 -07:00
Michael du Breuil 03bf247d36 AP_BattMonitor: Create a battery singleton
Also logs battery data from the read function directly
2018-02-06 00:11:32 +00:00
Michael du Breuil 8712fbd55d AP_BattMonitor: Move per battery params into a containing class 2018-01-17 22:21:55 +00:00
Michael du Breuil bb0d43d03c AP_BattMonitor: Remove unneeded memebers
is_powering_off was only used for solo, and was just an intermediate
copy before updating notify
2018-01-17 22:21:55 +00:00
Andrew Tridgell a4c56fcb82 AP_BattMonitor: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Lucas De Marchi bd8f0a9e93 AP_BattMonitor: add static create method 2017-09-26 03:01:21 +01:00
Randy Mackay 7a2d8fd5fd AP_BattMonitor: add has_cell_voltages method 2017-06-06 14:57:04 +09:00
Leonard Hall d5e898156f AP_BattMonitor: allow using resting voltage for failsafe 2017-06-06 14:57:04 +09:00
Leonard Hall 8709fe58ec AP_BattMonitor: resistance learning 2017-06-06 14:57:04 +09:00
Randy Mackay f64777849f AP_BattMonitor: rename VOLT_TIMER to LOW_TIMER 2017-06-06 14:57:04 +09:00
Andrew Tridgell d4e6720b01 AP_BattMonitor: added BATT_VOLT_TIMEO
this is useful for aircraft with very low C batteries, to prevent a low
voltage failsafe on takeoff. For long endurance aircraft low C batteries
are often used, and the voltage sags a lot on takeoff, but it fine for
the rest of the flight
2017-04-28 17:40:18 +10:00
Michael du Breuil 3ab3face9b AP_BattMonitor: SMBus: Read serial number 2017-04-28 00:36:10 +01:00
Michael du Breuil 121ebebfef AP_BattMonitor: Add temperature interface 2017-04-19 14:17:24 +01:00
Michael du Breuil e39ae6d48c AP_BattMonitor: Add cell monitoring 2017-04-19 14:17:24 +01:00
Randy Mackay ebb60e8d2f AP_BattMonitor: remove PX4 driver 2017-02-09 10:45:01 +09:00
Tatsuya Yamaguchi 3e445fd4b8 AP_BattMonitor: add Maxell Battery support 2017-02-09 10:45:00 +09:00
Tatsuya Yamaguchi d30350276c AP_BattMonitor: I2C driver becomes Solo driver
Rename class to Solo
Use internal I2C bus
Add capacity, current, button press checking
Only check continuously for voltage if reading fails for more than 5 seconds
2017-02-09 10:44:50 +09:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
floaledm ec157bd4c2 AP_BattMonitor: Get pack_capacity_mah function 2016-08-25 10:16:18 +10:00
Tom Pittenger 5108b4cbb6 AP_BattMonitor: move vehicle dependant code to be c-file only, not header 2016-07-25 18:10:57 -07:00
Tom Pittenger d2c9b02ca5 AP_BattMonitor: remove voltage2() since we have voltage(x) available 2016-06-02 16:59:26 -07:00
Tom Pittenger 0e775f595d AP_BattMonitor: make param BATT_WATT_MAX plane only 2016-04-21 13:59:45 -07:00