#include <stdio.h>
#if _WIN32 || _WIN64
#include <windows.h>
static void sleep_ms(int time) {
Sleep(time);
}
#else
#include <unistd.h>
static void sleep_ms(int time) {
usleep(time * 1000);
}
#endif
char* serial_number;
printf("Entered calibration mode for eye tracker with serial number %s \n.", serial_number);
{
#define NUM_OF_POINTS 5U
{{0.5f, 0.5f}, {0.1f, 0.1f}, {0.1f, 0.9f}, {0.9f, 0.1f}, {0.9f, 0.9f}};
size_t i = 0;
for(; i < NUM_OF_POINTS; i++) {
printf(
"Show a point on screen at (%f,%f).\n", point->
x, point->
y);
sleep_ms(700);
printf(
"Collecting data at (%f,%f).\n", point->
x, point->
y);
}
}
printf("Computing and applying calibration.\n");
printf(
"Compute and apply returned %i and collected at %zu points.\n", status, calibration_result->
calibration_point_count);
} else {
printf("Calibration failed!\n");
}
printf(
"Removing calibration point at (%f,%f).\n", recalibrate_point->
x, recalibrate_point->
y);
printf(
"Show a point on screen at (%f,%f).\n", recalibrate_point->
x, recalibrate_point->
y);
printf("Computing and applying calibration.\n");
printf(
"Compute and apply returned %i and collected at %zu points.\n", status, calibration_result->
calibration_point_count);
} else {
printf("Calibration failed!\n");
}
}
printf("Left calibration mode.\n");
}