Skip to content

Commit

Permalink
Fix code style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
WilstonOreo committed May 27, 2024
1 parent 4d21129 commit d4dce69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/dht22.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,9 @@ impl DHT22 {
// Checksum is the sum of Data 8 bits masked out 0xFF

if dht_data[4] == ((dht_data[0] + dht_data[1] + dht_data[2] + dht_data[3]) & 0xFF) {

return Ok((temperature, humidity));
Ok((temperature, humidity))
} else {
return Err(DHT22Error::ChecksumError);
Err(DHT22Error::ChecksumError)
}
}
}
2 changes: 1 addition & 1 deletion src/esp32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl slint::platform::Platform for EspPlatform {
// Draw the scene if something needs to be drawn.
self.window.draw_if_needed(|renderer| {
// Do the rendering!
let region = renderer.render(&mut buffer, Self::DISPLAY_WIDTH as usize);
let region = renderer.render(&mut buffer, Self::DISPLAY_WIDTH);

// Iterate each region to be updated
for (o, s) in region.iter() {
Expand Down

0 comments on commit d4dce69

Please sign in to comment.