Skip to content
Commit e661a550 authored by Jordan Yates's avatar Jordan Yates Committed by Benjamin Cabé
Browse files

sensor: bme280: clamp humidity to non-negative



Clamp the returned humidity to a non-negative value. This ensure that
the return value is always within the expected range, even if the
calibration parameters are read out incorrectly or corrupted.

This check is applied in the example Bosch driver for the float
conversion case, so there are situations that warrant it.

Signed-off-by: default avatarJordan Yates <jordan@embeint.com>
parent 29597501
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment