diff --git a/website/lab/06/index.mdx b/website/lab/06/index.mdx index 6d642eaf28ead18615f6dd5817f48eca0a245706..6cba897dd8e5dd9acf7a671f88d754d3978a222e 100644 --- a/website/lab/06/index.mdx +++ b/website/lab/06/index.mdx @@ -229,9 +229,9 @@ The `press` contains the raw pressure measurement data. The measurement output i To determine the raw pressure measurement, you need to first read the `press_msb`, `press_lsb` and `press_xlsb` register values, then compute the raw value: ```rust -// Assuming the `press_*` values are u32s. If not, additional +// Assuming the `press_*` values are i32s. If not, additional // casts will be necessary. -let raw_press: u32 = (press_msb << 12) + (press_lsb << 4) + (press_xlsb >> 4) +let raw_press: i32 = (press_msb << 12) + (press_lsb << 4) + (press_xlsb >> 4) ``` ::: @@ -249,9 +249,9 @@ The `temp` contains the raw temperature measurement data. The measurement output To determine the raw temperature measurement, you need to first read the `temp_msb`, `temp_lsb` and `temp_xlsb` register values, then compute the raw value: ```rust -// Assuming the `temp_*` values are u32s. If not, additional +// Assuming the `temp_*` values are i32s. If not, additional // casts will be necessary. -let raw_temp: u32 = (temp_msb << 12) + (temp_lsb << 4) + (temp_xlsb >> 4) +let raw_temp: i32 = (temp_msb << 12) + (temp_lsb << 4) + (temp_xlsb >> 4) ``` ::: @@ -494,7 +494,7 @@ This should be done **only once**, before reading the sensor. * Read the raw temperature value stored in the `temp` register once a second, and print it to the terminal using the `defmt` macros. Details on how this can be performed can be found in this [subsection](./index.mdx#register-temp-0xfa0xfc) of the register map and in the [Reading a register](./index.mdx#reading-a-register) subsection. (**2p**) -3. Based on the raw temperature value previously determined, compute the actual temperature value using the **mock** calibration values provided bellow and the formula described in the [sections above](./index.mdx#temperature-computation-formulae). (**1p**) +3. Based on the raw temperature value previously determined, compute the actual temperature value using the **mock** calibration values provided bellow and the formula described in the [sections above](./index.mdx#temperature-computation-formula). (**1p**) ```rust let dig_t1: u16 = 27504;