}
this.logger.fine("Getting device with selector " + deviceSelector);
// Obtain the proper tracking device here
EyeTrackingDeviceProvider deviceProvider = this.pluginManager.getPlugin(EyeTrackingDeviceProvider.class, new OptionCapabilities(deviceSelector));
// No device is bad ... at this stage ...
if (deviceProvider == null) {
this.logger.warning("No tracking device found for " + deviceSelector + "!");
return;
}
this.logger.info("Device found, opening connection to " + trackerConnection);
// Now open the device
this.eyeTrackingDevice = deviceProvider.openDevice(trackerConnection);
// If opening the device didn't work and we have autodetection, use the mouse
if (this.eyeTrackingDevice == null && autoDetection) {
this.logger.info("Device did not open. Trying mouse.");
deviceSelector = "eyetrackingdevice:mouse";
// Obtain the fallback device here
deviceProvider = this.pluginManager.getPlugin(EyeTrackingDeviceProvider.class, new OptionCapabilities(deviceSelector));
// No device is bad ... at this stage ...
if (deviceProvider == null) {
this.logger.warning("Still no tracking device found for " + deviceSelector + ". This is really bad.");
return;