diff --git a/Cargo.toml b/Cargo.toml index 61815ed..ee6096a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "joycon-rs" -version = "0.5.5" +version = "0.5.6" authors = ["Kaisei Yokoyama "] repository = "https://github.com/KaiseiYokoyama/joycon-rs" edition = "2018" diff --git a/src/joycon/driver/mod.rs b/src/joycon/driver/mod.rs index f0b4e4e..92c54f2 100644 --- a/src/joycon/driver/mod.rs +++ b/src/joycon/driver/mod.rs @@ -258,9 +258,9 @@ pub trait JoyConDriver { /// Initialize Joy-Con's status fn reset(&mut self) -> JoyConResult<()> { // disable IMU (6-Axis sensor) - self.send_sub_command(SubCommand::EnableIMU, &[0x00])?; + self.send_sub_command(SubCommand::EnableIMU, &[0x01])?; // disable vibration - self.send_sub_command(SubCommand::EnableVibration, &[0x00])?; + self.send_sub_command(SubCommand::EnableVibration, &[0x01])?; Ok(()) } diff --git a/src/joycon/driver/simple_joycon_driver.rs b/src/joycon/driver/simple_joycon_driver.rs index 8493b09..99db906 100644 --- a/src/joycon/driver/simple_joycon_driver.rs +++ b/src/joycon/driver/simple_joycon_driver.rs @@ -48,11 +48,15 @@ impl SimpleJoyConDriver { // joycon.set_blocking_mode(true); // joycon.set_blocking_mode(false); + let mut enabled_features = HashSet::new(); + enabled_features.insert(JoyConFeature::IMUFeature(IMUConfig::default())); + enabled_features.insert(JoyConFeature::Vibration); + let mut driver = Self { joycon: Arc::clone(joycon), rotation: Rotation::Portrait, rumble: (None, None), - enabled_features: HashSet::new(), + enabled_features, valid_reply: { let device = match joycon.lock() { Ok(j) => j,