From ff70921ecaa342a6783d823e0f3d2576ed35a06c Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Wed, 11 Oct 2023 18:41:51 +1100 Subject: [PATCH] AP_BattMonitor: Fix some typos Fixed some typos found in the code. --- libraries/AP_BattMonitor/AP_BattMonitor.cpp | 2 +- libraries/AP_BattMonitor/AP_BattMonitor_Bebop.cpp | 2 +- libraries/AP_BattMonitor/AP_BattMonitor_Generator.cpp | 4 ++-- libraries/AP_BattMonitor/AP_BattMonitor_Generator.h | 2 +- libraries/AP_BattMonitor/AP_BattMonitor_SMBus_Generic.cpp | 2 +- libraries/AP_BattMonitor/AP_BattMonitor_SMBus_Solo.cpp | 4 ++-- libraries/AP_BattMonitor/AP_BattMonitor_Synthetic_Current.h | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libraries/AP_BattMonitor/AP_BattMonitor.cpp b/libraries/AP_BattMonitor/AP_BattMonitor.cpp index b53fb55465..ca73aab478 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor.cpp +++ b/libraries/AP_BattMonitor/AP_BattMonitor.cpp @@ -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) { diff --git a/libraries/AP_BattMonitor/AP_BattMonitor_Bebop.cpp b/libraries/AP_BattMonitor/AP_BattMonitor_Bebop.cpp index 75bbebcae6..9907a798af 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor_Bebop.cpp +++ b/libraries/AP_BattMonitor/AP_BattMonitor_Bebop.cpp @@ -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; diff --git a/libraries/AP_BattMonitor/AP_BattMonitor_Generator.cpp b/libraries/AP_BattMonitor/AP_BattMonitor_Generator.cpp index f9ee6d2bbf..eb292ea6de 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor_Generator.cpp +++ b/libraries/AP_BattMonitor/AP_BattMonitor_Generator.cpp @@ -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(); diff --git a/libraries/AP_BattMonitor/AP_BattMonitor_Generator.h b/libraries/AP_BattMonitor/AP_BattMonitor_Generator.h index bacd1e399a..db7d17c4b2 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor_Generator.h +++ b/libraries/AP_BattMonitor/AP_BattMonitor_Generator.h @@ -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 diff --git a/libraries/AP_BattMonitor/AP_BattMonitor_SMBus_Generic.cpp b/libraries/AP_BattMonitor/AP_BattMonitor_SMBus_Generic.cpp index 9fc708a974..2cd58b765b 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor_SMBus_Generic.cpp +++ b/libraries/AP_BattMonitor/AP_BattMonitor_SMBus_Generic.cpp @@ -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: diff --git a/libraries/AP_BattMonitor/AP_BattMonitor_SMBus_Solo.cpp b/libraries/AP_BattMonitor/AP_BattMonitor_SMBus_Solo.cpp index 591c8fe521..4b4af9c593 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor_SMBus_Solo.cpp +++ b/libraries/AP_BattMonitor/AP_BattMonitor_SMBus_Solo.cpp @@ -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; } diff --git a/libraries/AP_BattMonitor/AP_BattMonitor_Synthetic_Current.h b/libraries/AP_BattMonitor/AP_BattMonitor_Synthetic_Current.h index 212ae607be..0a49d0b405 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor_Synthetic_Current.h +++ b/libraries/AP_BattMonitor/AP_BattMonitor_Synthetic_Current.h @@ -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