mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 03:53:33 +08:00
batt_smbus: minor format fix
This commit is contained in:
@@ -304,7 +304,7 @@ BATT_SMBUS::read_reg(uint8_t reg, uint16_t &val)
|
|||||||
uint8_t buff[2];
|
uint8_t buff[2];
|
||||||
|
|
||||||
// read from register
|
// read from register
|
||||||
int ret = transfer(®, 1, buff, 2);
|
int ret = transfer(®, 1, buff, 2);
|
||||||
if (ret == OK) {
|
if (ret == OK) {
|
||||||
val = (uint16_t)buff[1] << 8 | (uint16_t)buff[0];
|
val = (uint16_t)buff[1] << 8 | (uint16_t)buff[0];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user