src/drivers/irlock/irlock.cpp
/** read all available frames from sensor **/
read all available frames from sensor
read all available frames from sensor
int IRLOCK::read_device()
{
	if (!sync_device()) {
		return -ENOTTY;
	}
	_reports->flush();
	int num_objects = 0;
	while (sync_device() && (num_objects < IRLOCK_OBJECTS_MAX)) {
		struct irlock_s block;
		if (read_device_block(&block) != OK) {
			break;
		}
		_reports->force(&block);
	}
	return OK;
}
int IRLOCK :: read_device ( ) { if ( ! sync_device ( ) ) { return - ENOTTY ; } _reports -> flush ( ) ; int num_objects = 0 ; while ( sync_device ( ) && ( num_objects < IRLOCK_OBJECTS_MAX ) ) { struct irlock_s block ; if ( read_device_block ( & block ) != OK ) { break ; } _reports -> force ( & block ) ; } return OK ; }
read all available frames from sensor
read all available frames from sensor
/** if we sync, then we are starting a new frame, else fail **/ /** now read blocks until sync stops, first flush stale queue data **/