golioth-firmware-sdk
golioth-firmware-sdk copied to clipboard
examples: zephyr: Fix get_temperature with temp0 DT alias
When a temp0
devicetree alias is added to the board overlay, the get_temperature
function was looping through all sensor channels, always returning the result of reading the last one, even if it was not a supported channel.
This fixes the function so that it returns after the first successful read from a temperature channel.
Visit the preview URL for this PR (updated for commit 5f5f010):
https://golioth-firmware-sdk-doxygen-dev--pr470-cdwilson-fix-z-gwtdbows.web.app
(expires Mon, 06 May 2024 15:36:41 GMT)
🔥 via Firebase Hosting GitHub Action 🌎
Sign: a9993e61697a3983f3479e468bcb0b616f9a0578
Code Coverage
Type | Coverage |
---|---|
lines | 55.6% (1035 of 1862 lines) |
functions | 57.7% (94 of 163 functions) |