mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 14:43:33 +08:00
Simplify Battery-related Enum Naming (#24265)
* Simplify battery-related enum naming * Fix mistakenly removed string in enum names * Fix missing renamings * Update outdated file * msg: Increase battery_status version since the enum naming was changed * Revert message version increase --------- Co-authored-by: Matthias Grob <maetugr@gmail.com>
This commit is contained in:
co-authored by
Matthias Grob
parent
336d055923
commit
b5f37c9fa6
@@ -52,7 +52,7 @@ INA220::INA220(const I2CSPIDriverConfig &config, int battery_index) :
|
||||
_collection_errors(perf_alloc(PC_COUNT, "ina220_collection_err")),
|
||||
_measure_errors(perf_alloc(PC_COUNT, "ina220_measurement_err")),
|
||||
_ch_type((PM_CH_TYPE)config.custom2),
|
||||
_battery(battery_index, this, INA220_SAMPLE_INTERVAL_US, battery_status_s::BATTERY_SOURCE_POWER_MODULE)
|
||||
_battery(battery_index, this, INA220_SAMPLE_INTERVAL_US, battery_status_s::SOURCE_POWER_MODULE)
|
||||
{
|
||||
float fvalue = MAX_CURRENT;
|
||||
_max_current = fvalue;
|
||||
|
||||
@@ -49,7 +49,7 @@ INA226::INA226(const I2CSPIDriverConfig &config, int battery_index) :
|
||||
_comms_errors(perf_alloc(PC_COUNT, "ina226_com_err")),
|
||||
_collection_errors(perf_alloc(PC_COUNT, "ina226_collection_err")),
|
||||
_measure_errors(perf_alloc(PC_COUNT, "ina226_measurement_err")),
|
||||
_battery(battery_index, this, INA226_SAMPLE_INTERVAL_US, battery_status_s::BATTERY_SOURCE_POWER_MODULE)
|
||||
_battery(battery_index, this, INA226_SAMPLE_INTERVAL_US, battery_status_s::SOURCE_POWER_MODULE)
|
||||
{
|
||||
float fvalue = MAX_CURRENT;
|
||||
_max_current = fvalue;
|
||||
|
||||
@@ -49,7 +49,7 @@ INA228::INA228(const I2CSPIDriverConfig &config, int battery_index) :
|
||||
_comms_errors(perf_alloc(PC_COUNT, "ina228_com_err")),
|
||||
_collection_errors(perf_alloc(PC_COUNT, "ina228_collection_err")),
|
||||
_measure_errors(perf_alloc(PC_COUNT, "ina228_measurement_err")),
|
||||
_battery(battery_index, this, INA228_SAMPLE_INTERVAL_US, battery_status_s::BATTERY_SOURCE_POWER_MODULE)
|
||||
_battery(battery_index, this, INA228_SAMPLE_INTERVAL_US, battery_status_s::SOURCE_POWER_MODULE)
|
||||
{
|
||||
float fvalue = MAX_CURRENT;
|
||||
_max_current = fvalue;
|
||||
|
||||
@@ -45,7 +45,7 @@ INA238::INA238(const I2CSPIDriverConfig &config, int battery_index) :
|
||||
_sample_perf(perf_alloc(PC_ELAPSED, "ina238_read")),
|
||||
_comms_errors(perf_alloc(PC_COUNT, "ina238_com_err")),
|
||||
_collection_errors(perf_alloc(PC_COUNT, "ina238_collection_err")),
|
||||
_battery(battery_index, this, INA238_SAMPLE_INTERVAL_US, battery_status_s::BATTERY_SOURCE_POWER_MODULE)
|
||||
_battery(battery_index, this, INA238_SAMPLE_INTERVAL_US, battery_status_s::SOURCE_POWER_MODULE)
|
||||
{
|
||||
float fvalue = DEFAULT_MAX_CURRENT;
|
||||
_max_current = fvalue;
|
||||
|
||||
@@ -54,7 +54,7 @@ VOXLPM::VOXLPM(const I2CSPIDriverConfig &config) :
|
||||
_sample_perf(perf_alloc(PC_ELAPSED, MODULE_NAME": sample")),
|
||||
_comms_errors(perf_alloc(PC_COUNT, MODULE_NAME": comms_errors")),
|
||||
_ch_type((VOXLPM_CH_TYPE)config.custom1),
|
||||
_battery(1, this, _meas_interval_us, battery_status_s::BATTERY_SOURCE_POWER_MODULE)
|
||||
_battery(1, this, _meas_interval_us, battery_status_s::SOURCE_POWER_MODULE)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user