Disable saving / loading eye tracker calibrations so can use old SDK

This commit is contained in:
David Rowe 2015-08-12 15:21:06 -07:00
parent 8f376247f0
commit 9fe1aaf182

View file

@ -151,20 +151,21 @@ void EyeTracker::onStreamStarted() {
} }
} }
if (_isStreaming) { // TODO: Re-enable once saving / loading calibrations is working
// Automatically load calibration if one has been saved. //if (_isStreaming) {
QString availableCalibrations = QString(smi_getAvailableCalibrations()); // // Automatically load calibration if one has been saved.
if (availableCalibrations.contains(HIGH_FIDELITY_EYE_TRACKER_CALIBRATION)) { // QString availableCalibrations = QString(smi_getAvailableCalibrations());
result = smi_loadCalibration(HIGH_FIDELITY_EYE_TRACKER_CALIBRATION); // if (availableCalibrations.contains(HIGH_FIDELITY_EYE_TRACKER_CALIBRATION)) {
if (result != SMI_RET_SUCCESS) { // result = smi_loadCalibration(HIGH_FIDELITY_EYE_TRACKER_CALIBRATION);
qCWarning(interfaceapp) << "Eye Tracker: Error loading calibration:" << smiReturnValueToString(result); // if (result != SMI_RET_SUCCESS) {
QMessageBox::warning(nullptr, "Eye Tracker Error", "Error loading calibration" // qCWarning(interfaceapp) << "Eye Tracker: Error loading calibration:" << smiReturnValueToString(result);
+ smiReturnValueToString(result)); // QMessageBox::warning(nullptr, "Eye Tracker Error", "Error loading calibration"
} else { // + smiReturnValueToString(result));
qCDebug(interfaceapp) << "Eye Tracker: Loaded calibration"; // } else {
} // qCDebug(interfaceapp) << "Eye Tracker: Loaded calibration";
} // }
} // }
//}
} }
#endif #endif
@ -257,10 +258,11 @@ void EyeTracker::calibrate(int points) {
if (result != SMI_RET_SUCCESS) { if (result != SMI_RET_SUCCESS) {
qCWarning(interfaceapp) << "Eye Tracker: Error performing calibration:" << smiReturnValueToString(result); qCWarning(interfaceapp) << "Eye Tracker: Error performing calibration:" << smiReturnValueToString(result);
} else { } else {
result = smi_saveCalibration(HIGH_FIDELITY_EYE_TRACKER_CALIBRATION); // TODO: Re - enable once saving / loading calibrations is working
if (result != SMI_RET_SUCCESS) { //result = smi_saveCalibration(HIGH_FIDELITY_EYE_TRACKER_CALIBRATION);
qCWarning(interfaceapp) << "Eye Tracker: Error saving calibration:" << smiReturnValueToString(result); //if (result != SMI_RET_SUCCESS) {
} // qCWarning(interfaceapp) << "Eye Tracker: Error saving calibration:" << smiReturnValueToString(result);
//}
} }
} }
@ -288,10 +290,11 @@ QString EyeTracker::smiReturnValueToString(int value) {
return "Eye cameras not available"; return "Eye cameras not available";
case smi_ErrorReturnValue::SMI_ERROR_OCULUS_RUNTIME_NOT_SUPPORTED: case smi_ErrorReturnValue::SMI_ERROR_OCULUS_RUNTIME_NOT_SUPPORTED:
return "Oculus runtime not supported"; return "Oculus runtime not supported";
case smi_ErrorReturnValue::SMI_ERROR_FILE_NOT_FOUND: // TODO: Re-enable once saving / loading calibrations is working
return "File not found"; //case smi_ErrorReturnValue::SMI_ERROR_FILE_NOT_FOUND:
case smi_ErrorReturnValue::SMI_ERROR_FILE_EMPTY: // return "File not found";
return "File empty"; //case smi_ErrorReturnValue::SMI_ERROR_FILE_EMPTY:
// return "File empty";
case smi_ErrorReturnValue::SMI_ERROR_UNKNOWN: case smi_ErrorReturnValue::SMI_ERROR_UNKNOWN:
return "Unknown error"; return "Unknown error";
default: default: