mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_BattMonitor: fixups from peer review
This commit is contained in:
parent
37dbbc7ed3
commit
1bdfe8ad55
@ -65,7 +65,6 @@ void AP_BattMonitor_Torqeedo::read(void)
|
||||
}
|
||||
|
||||
// capacity_remaining_pct - returns true if the battery % is available and writes to the percentage argument
|
||||
// returns false if the battery is unhealthy, does not have current monitoring, or the pack_capacity is too small
|
||||
bool AP_BattMonitor_Torqeedo::capacity_remaining_pct(uint8_t &percentage) const
|
||||
{
|
||||
if (have_info) {
|
||||
|
@ -14,20 +14,19 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <AP_Common/AP_Common.h>
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
#include <AP_Torqeedo/AP_Torqeedo.h>
|
||||
#include "AP_BattMonitor_Backend.h"
|
||||
|
||||
#if HAL_TORQEEDO_ENABLED
|
||||
#include <AP_Common/AP_Common.h>
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
#include "AP_BattMonitor_Backend.h"
|
||||
|
||||
class AP_BattMonitor_Torqeedo: public AP_BattMonitor_Backend
|
||||
{
|
||||
public:
|
||||
// constructor. This incorporates initialisation as well.
|
||||
AP_BattMonitor_Torqeedo(AP_BattMonitor &mon, AP_BattMonitor::BattMonitor_State &mon_state, AP_BattMonitor_Params ¶ms):
|
||||
AP_BattMonitor_Backend(mon, mon_state, params)
|
||||
{};
|
||||
|
||||
// inherit constructor
|
||||
using AP_BattMonitor_Backend::AP_BattMonitor_Backend;
|
||||
|
||||
// read the latest battery voltage
|
||||
void read() override;
|
||||
@ -39,7 +38,6 @@ public:
|
||||
bool has_temperature() const override { return have_info; };
|
||||
|
||||
// capacity_remaining_pct - returns true if the battery % is available and writes to the percentage argument
|
||||
// returns false if the battery is unhealthy, does not have current monitoring, or the pack_capacity is too small
|
||||
bool capacity_remaining_pct(uint8_t &percentage) const override WARN_IF_UNUSED;
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user