Code cleanup

This commit is contained in:
Timothy Scott
2019-12-05 17:24:08 +01:00
committed by Julian Oes
parent 77cf081925
commit 11bbc8ae34
9 changed files with 25 additions and 23 deletions
@@ -58,10 +58,6 @@ AnalogBattery::updateBatteryStatusRawADC(hrt_abstime timestamp, int32_t voltage_
selected_source, priority, throttle_normalized, armed, _params.source == 0);
}
/**
* Whether the ADC channel for the voltage of this battery is valid.
* Corresponds to BOARD_BRICK_VALID_LIST
*/
bool AnalogBattery::is_valid()
{
#ifdef BOARD_BRICK_VALID_LIST
+1 -1
View File
@@ -39,7 +39,7 @@
class AnalogBattery : public Battery
{
public:
AnalogBattery(int index = 1, ModuleParams *parent = nullptr);
AnalogBattery(int index, ModuleParams *parent);
/**
* Update current battery status message.
+5 -1
View File
@@ -238,10 +238,14 @@ private:
hrt_abstime _last_sitl_timestamp{0};
hrt_abstime _last_battery_timestamp{0};
class : public Battery
class SimulatorBattery : public Battery
{
public:
SimulatorBattery() : Battery(1, nullptr) {}
virtual void updateParams() override
{
Battery::updateParams();
_params.v_empty = 3.5f;
_params.v_charged = 4.05f;
_params.n_cells = 4;