/// Configure the controller to set it to DualShock2 mode. This will also
/// enable analog mode on DualShock1 controllers.
Configure the controller to set it to DualShock2 mode. This will also
enable analog mode on DualShock1 controllers.
Configure the controller to set it to DualShock2 mode . This will also enable analog mode on DualShock1 controllers .
pub fn enable_pressure(&mut self) -> Result<(), E> {
        // TODO: Redefine this to allow input parameters. Right now they're are hard coded
        // TODO: Detect and return actual protocol errors
        let mut buffer = [0u8; MESSAGE_MAX_LENGTH];
        // Wake up the controller if needed
        self.send_command(CMD_POLL, &mut buffer)?;
        self.send_command(CMD_ENTER_ESCAPE_MODE, &mut buffer)?;
        self.send_command(CMD_SET_MODE, &mut buffer)?;
        self.send_command(CMD_MOTOR_DUALSHOCK, &mut buffer)?;
        self.send_command(CMD_INIT_PRESSURE, &mut buffer)?;
        self.send_command(CMD_RESPONSE_FORMAT, &mut buffer)?;
        self.send_command(CMD_EXIT_ESCAPE_MODE, &mut buffer)?;
        Ok(())
    }
pub fn enable_pressure ( & mut self ) -> Result < ( ) , E > { // TODO: Redefine this to allow input parameters. Right now they're are hard coded // TODO: Detect and return actual protocol errors let mut buffer = [ 0u8 ; MESSAGE_MAX_LENGTH ] ; // Wake up the controller if needed self . send_command ( CMD_POLL , & mut buffer ) ? ; self . send_command ( CMD_ENTER_ESCAPE_MODE , & mut buffer ) ? ; self . send_command ( CMD_SET_MODE , & mut buffer ) ? ; self . send_command ( CMD_MOTOR_DUALSHOCK , & mut buffer ) ? ; self . send_command ( CMD_INIT_PRESSURE , & mut buffer ) ? ; self . send_command ( CMD_RESPONSE_FORMAT , & mut buffer ) ? ; self . send_command ( CMD_EXIT_ESCAPE_MODE , & mut buffer ) ? ; Ok ( ( ) ) }
Configure the controller to set it to DualShock2 mode.
Configure the controller to set it to DualShock2 mode .
&mut self