diff --git a/ctru-rs/examples/buttons.rs b/ctru-rs/examples/buttons.rs index e7662a1..90862bf 100644 --- a/ctru-rs/examples/buttons.rs +++ b/ctru-rs/examples/buttons.rs @@ -28,7 +28,7 @@ fn main() { // Print the status of the volume slider. println!( "\x1b[20;0HVolume slider: {} ", - hid.slider_volume() + hid.volume_slider() ); // We only want to print when the keys we're holding now are different diff --git a/ctru-rs/examples/camera-image.rs b/ctru-rs/examples/camera-image.rs index ff2339f..ecf9f65 100644 --- a/ctru-rs/examples/camera-image.rs +++ b/ctru-rs/examples/camera-image.rs @@ -76,7 +76,7 @@ fn main() { if keys_down.contains(KeyPad::R) { println!("Capturing new image"); - let mut camera = &mut cam.both_outer_cams; + let camera = &mut cam.both_outer_cams; // Take a picture and write it to the buffer. camera diff --git a/ctru-rs/examples/movement.rs b/ctru-rs/examples/movement.rs index b293c71..a0aa2c8 100644 --- a/ctru-rs/examples/movement.rs +++ b/ctru-rs/examples/movement.rs @@ -19,8 +19,8 @@ fn main() { // Activate the accelerometer and the gyroscope. // Because of the complex nature of the movement sensors, they aren't activated by default with the `Hid` service. // However, they can simply be turned on and off whenever necessary. - hid.enable_accelerometer(); - hid.enable_gyroscope(); + hid.set_accelerometer(true); + hid.set_gyroscope(true); while apt.main_loop() { // Scan all the controller inputs. @@ -35,10 +35,12 @@ fn main() { println!( "\x1b[3;0HAcceleration: {:?} ", hid.accelerometer_vector() + .expect("could not retrieve acceleration vector") ); println!( "\x1b[4;0HGyroscope angular rate: {:?} ", hid.gyroscope_rate() + .expect("could not retrieve angular rate") ); gfx.wait_for_vblank();