Skip to content

Commit 2b4265b

Browse files
fix(temp-sens): return temperature_sensor function
The description says the function should return ESP_FAIL when parsing the sensor data fails
1 parent 465b159 commit 2b4265b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/esp_driver_tsens/src/temperature_sensor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ esp_err_t temperature_sensor_get_celsius(temperature_sensor_handle_t tsens, floa
301301

302302
if (*out_celsius < TEMPERATURE_SENSOR_LL_MEASURE_MIN || *out_celsius > TEMPERATURE_SENSOR_LL_MEASURE_MAX) {
303303
ESP_LOGE(TAG, "Exceeding temperature measure range.");
304-
return ESP_ERR_INVALID_STATE;
304+
return ESP_FAIL;
305305
}
306306
if (range_changed) {
307307
s_update_tsens_attribute(tsens);

0 commit comments

Comments
 (0)