Skip to content

Commit d0c256a

Browse files
author
Cameron Murphy
committed
Cast temperature as float to enable auto si->customary conversion
1 parent 8bb9e2d commit d0c256a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/devices/bm5.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static int bm5_decode(r_device *decoder, bitbuffer_t *bitbuffer)
112112
"cranking_error", "Cranking System Error", DATA_INT, cranking_error,
113113
"charge_pct", "State of Charge", DATA_FORMAT, "%d %%", DATA_INT, soc,
114114
"charging_error", "Charging System Error", DATA_INT, charging_error,
115-
"temperature_C", "Temperature", DATA_FORMAT, "%d C", DATA_INT, temp,
115+
"temperature_C", "Temperature", DATA_FORMAT, "%.1f C", DATA_DOUBLE, (float) temp,
116116
"battery_V", "Current Battery Voltage",DATA_FORMAT, "%.2f V", DATA_DOUBLE, battery_volt,
117117
"starting_V", "Starting Voltage", DATA_FORMAT, "%.2f V", DATA_DOUBLE, starting_volt,
118118
"mic", "Integrity", DATA_STRING, "CHECKSUM",

0 commit comments

Comments
 (0)