mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
re-enabled ctrlaltdavid's eye calibration code
This commit is contained in:
parent
169bb9f3d9
commit
296a6b1cb8
1 changed files with 22 additions and 25 deletions
|
@ -153,21 +153,20 @@ void EyeTracker::onStreamStarted() {
|
|||
qCDebug(interfaceapp) << "Eye Tracker: Started streaming";
|
||||
}
|
||||
|
||||
// TODO: Re-enable once saving / loading calibrations is working
|
||||
//if (_isStreaming) {
|
||||
// // Automatically load calibration if one has been saved.
|
||||
// QString availableCalibrations = QString(smi_getAvailableCalibrations());
|
||||
// if (availableCalibrations.contains(HIGH_FIDELITY_EYE_TRACKER_CALIBRATION)) {
|
||||
// result = smi_loadCalibration(HIGH_FIDELITY_EYE_TRACKER_CALIBRATION);
|
||||
// if (result != SMI_RET_SUCCESS) {
|
||||
// qCWarning(interfaceapp) << "Eye Tracker: Error loading calibration:" << smiReturnValueToString(result);
|
||||
// QMessageBox::warning(nullptr, "Eye Tracker Error", "Error loading calibration"
|
||||
// + smiReturnValueToString(result));
|
||||
// } else {
|
||||
// qCDebug(interfaceapp) << "Eye Tracker: Loaded calibration";
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
if (_isStreaming) {
|
||||
// Automatically load calibration if one has been saved.
|
||||
QString availableCalibrations = QString(smi_getAvailableCalibrations());
|
||||
if (availableCalibrations.contains(HIGH_FIDELITY_EYE_TRACKER_CALIBRATION)) {
|
||||
result = smi_loadCalibration(HIGH_FIDELITY_EYE_TRACKER_CALIBRATION);
|
||||
if (result != SMI_RET_SUCCESS) {
|
||||
qCWarning(interfaceapp) << "Eye Tracker: Error loading calibration:" << smiReturnValueToString(result);
|
||||
QMessageBox::warning(nullptr, "Eye Tracker Error", "Error loading calibration"
|
||||
+ smiReturnValueToString(result));
|
||||
} else {
|
||||
qCDebug(interfaceapp) << "Eye Tracker: Loaded calibration";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -260,11 +259,10 @@ void EyeTracker::calibrate(int points) {
|
|||
if (result != SMI_RET_SUCCESS) {
|
||||
qCWarning(interfaceapp) << "Eye Tracker: Error performing calibration:" << smiReturnValueToString(result);
|
||||
} else {
|
||||
// TODO: Re - enable once saving / loading calibrations is working
|
||||
//result = smi_saveCalibration(HIGH_FIDELITY_EYE_TRACKER_CALIBRATION);
|
||||
//if (result != SMI_RET_SUCCESS) {
|
||||
// qCWarning(interfaceapp) << "Eye Tracker: Error saving calibration:" << smiReturnValueToString(result);
|
||||
//}
|
||||
result = smi_saveCalibration(HIGH_FIDELITY_EYE_TRACKER_CALIBRATION);
|
||||
if (result != SMI_RET_SUCCESS) {
|
||||
qCWarning(interfaceapp) << "Eye Tracker: Error saving calibration:" << smiReturnValueToString(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -292,11 +290,10 @@ QString EyeTracker::smiReturnValueToString(int value) {
|
|||
return "Eye cameras not available";
|
||||
case smi_ErrorReturnValue::SMI_ERROR_OCULUS_RUNTIME_NOT_SUPPORTED:
|
||||
return "Oculus runtime not supported";
|
||||
// TODO: Re-enable once saving / loading calibrations is working
|
||||
//case smi_ErrorReturnValue::SMI_ERROR_FILE_NOT_FOUND:
|
||||
// return "File not found";
|
||||
//case smi_ErrorReturnValue::SMI_ERROR_FILE_EMPTY:
|
||||
// return "File empty";
|
||||
case smi_ErrorReturnValue::SMI_ERROR_FILE_NOT_FOUND:
|
||||
return "File not found";
|
||||
case smi_ErrorReturnValue::SMI_ERROR_FILE_EMPTY:
|
||||
return "File empty";
|
||||
case smi_ErrorReturnValue::SMI_ERROR_UNKNOWN:
|
||||
return "Unknown error";
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue