Skip to content

Commit

Permalink
sensors: rainfall: Convert to um insted of mm
Browse files Browse the repository at this point in the history
Signed-off-by: Alistair Francis <alistair@alistair23.me>
  • Loading branch information
alistair23 committed Nov 28, 2024
1 parent d41459e commit c1c92fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion capsules/extra/src/dfrobot_rainfall_sensor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl<'a, A: Alarm<'a>, I: I2CDevice> I2CClient for DFRobotRainFall<'a, A, I> {
| (buffer[1] as u32) << 8
| (buffer[2] as u32) << 16
| (buffer[3] as u32) << 24)
/ 10000;
/ 10;

self.state.set(DeviceState::Normal);
self.buffer.replace(buffer);
Expand Down
2 changes: 1 addition & 1 deletion kernel/src/hil/sensors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ pub trait RainFallDriver<'a> {
pub trait RainFallClient {
/// Called when a moisture reading has completed.
///
/// - `value`: the number of mm of rain in the time period specified,
/// - `value`: the number of um of rain in the time period specified,
/// or Err on failure.
///
/// This function might return the following errors:
Expand Down

0 comments on commit c1c92fb

Please sign in to comment.