/// Get the raw data from polling for a controller. You can use this to cooerce the data into
/// some controller that can't be safely identified by `read_input`, but you should rely on that
/// function if you can.
Get the raw data from polling for a controller. You can use this to cooerce the data into
some controller that can't be safely identified by `read_input`, but you should rely on that
function if you can.
Get the raw data from polling for a controller . You can use this to cooerce the data into some controller that can ' t be safely identified by ` read_input ` but you should rely on that function if you can .
pub fn read_raw(&mut self, command: Option<&PollCommand>) -> Result<ControllerData, Error<E>> {
        let mut buffer = [0u8; MESSAGE_MAX_LENGTH];
        let data = self.read_port(command)?;
        // Shift the controller data over because we don't need the header anymore
        buffer[0 .. MESSAGE_MAX_LENGTH - 3].copy_from_slice(&data[HEADER_LEN..]);
        // FIXME: This doesn't zero out the end so we could theoretically have
        //        repeated data
        Ok(ControllerData { data: buffer })
    }
pub fn read_raw ( & mut self , command : Option < & PollCommand > ) -> Result < ControllerData , Error < E > > { let mut buffer = [ 0u8 ; MESSAGE_MAX_LENGTH ] ; let data = self . read_port ( command ) ? ; // Shift the controller data over because we don't need the header anymore buffer [ 0 .. MESSAGE_MAX_LENGTH - 3 ] . copy_from_slice ( & data [ HEADER_LEN .. ] ) ; // FIXME: This doesn't zero out the end so we could theoretically have //        repeated data Ok ( ControllerData { data : buffer } ) }
Get the raw data from polling for a controller.
Get the raw data from polling for a controller .
&mut self
command
Option<&PollCommand>