mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-06 16:03:58 -04:00
AP_BattMonitor: Fix some typos
Fixed some typos found in the code.
This commit is contained in:
parent
9d6b015a8e
commit
ff70921eca
@ -810,7 +810,7 @@ void AP_BattMonitor::check_failsafes(void)
|
||||
#endif
|
||||
state[i].failsafe = type;
|
||||
|
||||
// map the desired failsafe action to a prioritiy level
|
||||
// map the desired failsafe action to a priority level
|
||||
int8_t priority = 0;
|
||||
if (_failsafe_priorities != nullptr) {
|
||||
while (_failsafe_priorities[priority] != -1) {
|
||||
|
@ -103,7 +103,7 @@ float AP_BattMonitor_Bebop::_filter_voltage(float vbat_raw)
|
||||
_prev_vbat = vbat_raw;
|
||||
only_once = 0;
|
||||
} else if (vbat_raw > 0.0f) {
|
||||
/* 1st order fitler */
|
||||
/* 1st order filter */
|
||||
vbat = b[0] * vbat_raw +
|
||||
b[1] * _prev_vbat_raw - a[1] * _prev_vbat;
|
||||
_prev_vbat_raw = vbat_raw;
|
||||
|
@ -32,7 +32,7 @@ bool AP_BattMonitor_Generator_FuelLevel::has_current(void) const
|
||||
return has_consumed_energy();
|
||||
}
|
||||
|
||||
// This is where we tell the battery monitor 'we have consummed energy' if we want to report a fuel level remaining
|
||||
// This is where we tell the battery monitor 'we have consumed energy' if we want to report a fuel level remaining
|
||||
bool AP_BattMonitor_Generator_FuelLevel::has_consumed_energy(void) const
|
||||
{
|
||||
// Get pointer to generator singleton
|
||||
@ -149,7 +149,7 @@ AP_BattMonitor::Failsafe AP_BattMonitor_Generator_Elec::update_failsafes()
|
||||
|
||||
AP_Generator *generator = AP::generator();
|
||||
|
||||
// Only check for failsafes on the electrical moniter
|
||||
// Only check for failsafes on the electrical monitor
|
||||
// no point in having the same failsafe on two battery monitors
|
||||
if (generator != nullptr) {
|
||||
failsafe = generator->update_failsafes();
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
// This is where we tell the battery monitor 'we have current' if we want to report a fuel level remaining
|
||||
bool has_current(void) const override;
|
||||
|
||||
// This is where we tell the battery monitor 'we have consummed energy' if we want to report a fuel level remaining
|
||||
// This is where we tell the battery monitor 'we have consumed energy' if we want to report a fuel level remaining
|
||||
bool has_consumed_energy(void) const override;
|
||||
};
|
||||
#endif
|
||||
|
@ -88,7 +88,7 @@ void AP_BattMonitor_SMBus_Generic::timer()
|
||||
}
|
||||
}
|
||||
|
||||
// we loop over something limted by
|
||||
// we loop over something limited by
|
||||
// BATTMONITOR_SMBUS_NUM_CELLS_MAX but assign into something
|
||||
// limited by AP_BATT_MONITOR_CELLS_MAX - so make sure we won't
|
||||
// over-write:
|
||||
|
@ -57,7 +57,7 @@ void AP_BattMonitor_SMBus_Solo::timer()
|
||||
|
||||
// accumulate the pack voltage out of the total of the cells
|
||||
// because the Solo's I2C bus is so noisy, it's worth not spending the
|
||||
// time and bus bandwidth to request the pack voltage as a seperate
|
||||
// time and bus bandwidth to request the pack voltage as a separate
|
||||
// transaction
|
||||
_state.voltage = pack_voltage_mv * 1e-3f;
|
||||
_state.last_time_micros = tnow;
|
||||
@ -79,7 +79,7 @@ void AP_BattMonitor_SMBus_Solo::timer()
|
||||
_state.voltage = pack_voltage_mv * 1e-3f;
|
||||
_state.last_time_micros = tnow;
|
||||
_state.healthy = true;
|
||||
// stop reqesting 4-cell packets.
|
||||
// stop requesting 4-cell packets.
|
||||
_use_extended = true;
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,6 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
AP_Float _max_voltage; /// maximum battery voltage used in current caluculation
|
||||
AP_Float _max_voltage; /// maximum battery voltage used in current calculation
|
||||
};
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user