Skip to content
Commit 3b2103f5 authored by John Shelton's avatar John Shelton Committed by Anas Nashif
Browse files

sensor: dht: Fix multi-instance type handling



The DHT driver incorrectly assumes all sensor instances are the same
type as the first instance (dht@0). The data parsing logic uses a
hardcoded check of the devicetree property for instance 0, which
causes incorrect readings when different sensor models (e.g., DHT11
and DHT22) are used together.

This change stores the model type in each per-instance config struct
during initialization. The data parsing logic is updated to use this
per-instance flag, ensuring each sensor is handled correctly
according to its specific model.

Signed-off-by: default avatarJohn Shelton <moosery@gmail.com>
parent 4af0a02b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment