mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
driver/lc709203f: remove unnecessary use of float
This commit is contained in:
parent
e93d597510
commit
2c3920ab62
@ -152,7 +152,9 @@ int16_t lc709203f_get_cell_temp(const lc709203f_t *dev)
|
|||||||
DEBUG("CRC Error \n");
|
DEBUG("CRC Error \n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return ((((unsigned int)rec_buf[1] << 8) | rec_buf[0]) - 2731.5);
|
/* sensor temperature is given in 0.1K -> -2731.5 would be the correct value
|
||||||
|
* returning in 0.1°C int16_t -> using rounded 2732 */
|
||||||
|
return ((((int16_t)rec_buf[1] << 8) | rec_buf[0]) - 2732);
|
||||||
}
|
}
|
||||||
|
|
||||||
lc709203f_temp_obtaining_mode_t lc709203f_get_status_bit(const lc709203f_t *dev)
|
lc709203f_temp_obtaining_mode_t lc709203f_get_status_bit(const lc709203f_t *dev)
|
||||||
|
Loading…
Reference in New Issue
Block a user