Skip to content

Commit

Permalink
Merge pull request #3988 from tyler-potyondy/dev/temperature
Browse files Browse the repository at this point in the history
Update nrf5x temperature calculation
  • Loading branch information
brghena committed May 12, 2024
2 parents af8b6fc + 02be112 commit ae86c83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chips/nrf5x/src/temperature.rs
Expand Up @@ -128,8 +128,8 @@ impl<'a> Temp<'a> {
self.disable_interrupts();

// get temperature
// Result of temperature measurement in °C, 2's complement format, 0.25 °C
let temp = (self.registers.temp.get() as i32 / 4) * 100;
// Result of temperature measurement in °C, 2's complement format, 0.25 °C steps
let temp = (self.registers.temp.get() as i32 * 100) / 4;

// stop measurement
self.registers.task_stop.write(Task::ENABLE::SET);
Expand Down

0 comments on commit ae86c83

Please sign in to comment.