From 0efb2048a0db1f9d8b7ab81bcbf91c203510a386 Mon Sep 17 00:00:00 2001 From: RJ Nowling Date: Mon, 27 Oct 2025 22:15:09 -0500 Subject: [PATCH 1/3] Correct temperature reading method signatures The documentation for `readTemperature()` didn't match the implementation and was missing for `readTemperatureFloat()`. --- docs/api.md | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/docs/api.md b/docs/api.md index 5eaaada..d1f3cd2 100644 --- a/docs/api.md +++ b/docs/api.md @@ -346,16 +346,16 @@ Reads the temperature from the sensor (Celsius). #### Syntax ``` -IMU.readTemperature() +IMU.readTemperature(int& temperature_deg) ``` #### Parameters -None. +* _temperature_deg_: int variable where the temperature value will be stored. #### Returns -The temperature in Celsius. +None. #### Example @@ -371,6 +371,38 @@ if (IMU.temperatureAvailable()) } ``` +### `readTemperatureFloat()` + +Reads the temperature from the sensor (Celsius). + +#### Syntax + +``` +IMU.readTemperatureFloat(float& temperature_deg) +``` + +#### Parameters + +* _temperature_deg_: float variable where the temperature value will be stored. + +#### Returns + +None. + +#### Example + +``` +if (IMU.temperatureAvailable()) + { + float temperature_deg = 0.0f; + IMU.readTemperatureFloat(temperature_deg); + + Serial.print("LSM6DSOX Temperature = "); + Serial.print(temperature_deg); + Serial.println(" °C"); + } +``` + ### `temperatureAvailable()` Checks if temperature data is available. @@ -401,4 +433,4 @@ if (IMU.temperatureAvailable()) Serial.print(temperature_deg); Serial.println(" °C"); } -``` \ No newline at end of file +``` From 731522db68d8dd1e48c6ff9f6fef057c5c0cd811 Mon Sep 17 00:00:00 2001 From: RJ Nowling Date: Mon, 27 Oct 2025 23:18:45 -0500 Subject: [PATCH 2/3] Accept change Co-authored-by: Per Tillisch --- docs/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api.md b/docs/api.md index d1f3cd2..fd31f57 100644 --- a/docs/api.md +++ b/docs/api.md @@ -346,7 +346,7 @@ Reads the temperature from the sensor (Celsius). #### Syntax ``` -IMU.readTemperature(int& temperature_deg) +IMU.readTemperature(temperature_deg) ``` #### Parameters From e60fe81c3071fb13accbe736e10dd8124ac4cf0b Mon Sep 17 00:00:00 2001 From: RJ Nowling Date: Mon, 27 Oct 2025 23:18:53 -0500 Subject: [PATCH 3/3] Accept change Co-authored-by: Per Tillisch --- docs/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api.md b/docs/api.md index fd31f57..d21f06a 100644 --- a/docs/api.md +++ b/docs/api.md @@ -378,7 +378,7 @@ Reads the temperature from the sensor (Celsius). #### Syntax ``` -IMU.readTemperatureFloat(float& temperature_deg) +IMU.readTemperatureFloat(temperature_deg) ``` #### Parameters