Hi Nikki:
If you want to initial Eye V2 engine:
1. Please do not modify any header file we provide. E.g. in SRanipal_Eye.h, the following line should be:
const int ANIPAL_TYPE_EYE_V2 = 2;
2. You need a separate flag to check if eye v2 is enabled, e.g.,
int error = ViveSR::anipal::Initial(ViveSR::anipal::Eye::ANIPAL_TYPE_EYE_V2, NULL);
if (error == ViveSR::Error::WORK) {
EnableEyeV2 = true;
}
Then in the function void streaming(), you need separate code to handle eye v2 data, e.g.,
if (EnableEyeV2) {
int result = ViveSR::anipal::Eye::GetEyeData_v2(&eye_data_v2);
if (result == ViveSR::Error::WORK) {
float *gaze = eye_data_v2.verbose_data.left.gaze_direction_normalized.elem_;
printf("[Eye v2] Wide: %.2f %.2f \n", eye_data_v2.expression_data.left.eye_wide, eye_data_v2.expression_data.right.eye_wide);
}
}