diff --git a/guest_rust/src/lib.rs b/guest_rust/src/lib.rs index 0ad481c..8830848 100644 --- a/guest_rust/src/lib.rs +++ b/guest_rust/src/lib.rs @@ -186,7 +186,7 @@ fn main2() -> Result<()> { denominator: *ratio.denom() as u32, }); println!("setting sampling rate to {:?}", value); - sensor.set_property(wasi::sensor::property::PropertyKey::SamplingRate, &value)?; + sensor.set_property(wasi::sensor::property::PropertyKey::SamplingRate, value)?; // confirm the result let value = sensor.get_property(wasi::sensor::property::PropertyKey::SamplingRate)?; println!("sensor sampling rate {:?}", value); diff --git a/sensing.md b/sensing.md index a27be68..7bb987f 100644 --- a/sensing.md +++ b/sensing.md @@ -112,12 +112,6 @@
  • numerator: u32
  • denominator: u32
  • -

    record exposure

    -
    Record Fields
    -

    enum property-key

    Enum Cases

    variant property-value

    Variant Cases

    Import interface wasi:sensor/sensor


    diff --git a/wit/property.wit b/wit/property.wit index 39bec04..15d30f7 100644 --- a/wit/property.wit +++ b/wit/property.wit @@ -7,29 +7,16 @@ interface property { denominator: u32 } - - - record exposure { - /// Mode of exposure. - mode: string, - /// More parameters for exposure. - } - - enum property-key { /// The number of samples in a second. (fraction) /// Eg. frame rate for image sensors. sampling-rate, - dimension, - exposure, } variant property-value { fraction(fraction), - dimension(dimension), - exposure(exposure), } }