void HLCALLBACK calibrationCallback(HLenum event, HLuint object, HLenum thread, HLcache *cache, void *userdata) { if (event == HL_EVENT_CALIBRATION_UPDATE) { std::cout << "Device requires calibration update..." << std::endl; hlUpdateCalibration(); } else if (event == HL_EVENT_CALIBRATION_INPUT) { std::cout << "Device requires calibration.input..." << std::endl; hlUpdateCalibration(); } }
void HLCALLBACK CybPhantom::checkCalibrationCB(HLenum event, HLuint object, HLenum thread, HLcache *cache, void *pUserData) { CalibrationState *state = static_cast <CalibrationState *> (pUserData); if(event == HL_EVENT_CALIBRATION_UPDATE) { cout<<"Warning: Device Require calibration update!"<<endl; state->calibrationOk = false; state->hlCalibrationType = HL_EVENT_CALIBRATION_UPDATE; hlUpdateCalibration(); } else if(event == HL_EVENT_CALIBRATION_INPUT) { cout<<"Warning: Device requires calibration.input!"<<endl; state->hlCalibrationType = HL_EVENT_CALIBRATION_INPUT; state->calibrationOk = true; } }