mirror of https://github.com/ArduPilot/ardupilot
AP_BattMonitor_SMBus_Generic: style fixes
This commit is contained in:
parent
62726105f9
commit
0119d7a874
|
@ -163,16 +163,10 @@ bool AP_BattMonitor_SMBus_Generic::read_specification_info()
|
|||
uint8_t version = (data & 0xF0) >> 4;
|
||||
|
||||
// version less than 0011b (i.e. 3) do not support PEC
|
||||
if (version < 3) {
|
||||
_pec_supported = false;
|
||||
}
|
||||
else {
|
||||
_pec_supported = true;
|
||||
}
|
||||
|
||||
_pec_supported = version >= 3;
|
||||
|
||||
// extract and update voltage multiplier
|
||||
switch ((data & 0xF00) >> 8)
|
||||
{
|
||||
switch ((data & 0xF00) >> 8) {
|
||||
case 1:
|
||||
_v_multiplier = 10;
|
||||
break;
|
||||
|
@ -188,8 +182,7 @@ bool AP_BattMonitor_SMBus_Generic::read_specification_info()
|
|||
}
|
||||
|
||||
// extract and update current multiplier
|
||||
switch ((data & 0xF000) >> 12)
|
||||
{
|
||||
switch ((data & 0xF000) >> 12) {
|
||||
case 1:
|
||||
_i_multiplier = 10;
|
||||
break;
|
||||
|
@ -208,5 +201,4 @@ bool AP_BattMonitor_SMBus_Generic::read_specification_info()
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
#endif // AP_BATTERY_SMBUS_GENERIC_ENABLED
|
||||
|
|
Loading…
Reference in New Issue