int main(int argc, char* argv[]) { PSMove *move = psmove_connect(); if (move == NULL) { printf("Could not connect to default Move controller.\n" "Please connect one via Bluetooth.\n"); exit(1); } csv = fopen("read_performance.csv", "w"); assert(csv != NULL); fprintf(csv, "mode,time,reads,dropped\n"); printf("\n -- PS Move API Sensor Reading Performance Test -- \n"); printf("\nTesting STATIC READ performance (non-changing LED setting)\n"); test_read_performance(move, STATIC_UPDATES); printf("\nTesting SMART READ performance (rate-limited LED setting)\n"); test_read_performance(move, SMART_UPDATES); printf("\nTesting BAD READ performance (continous LED setting)\n"); test_read_performance(move, ALL_UPDATES); printf("\nTesting RAW READ performance (no LED setting)\n"); test_read_performance(move, NO_UPDATES); printf("\n"); fclose(csv); return 0; }
int main(int argc, char* argv[]) { PSMove *move = psmove_connect(); if (move == NULL) { printf("Could not connect to default Move controller.\n" "Please connect one via USB or Bluetooth.\n"); exit(1); } printf("\n -- PS Move API Sensor Reading Performance Test -- \n"); printf("\nTesting STATIC READ performance (non-changing LED setting)\n"); test_read_performance(move, STATIC_UPDATES); printf("\nTesting SMART READ performance (rate-limited LED setting)\n"); test_read_performance(move, SMART_UPDATES); printf("\nTesting BAD READ performance (continous LED setting)\n"); test_read_performance(move, ALL_UPDATES); printf("\nTesting RAW READ performance (no LED setting)\n"); test_read_performance(move, NO_UPDATES); printf("\n"); return 0; }
int main(int argc, char* argv[]) { if (!psmove_init(PSMOVE_CURRENT_VERSION)) { fprintf(stderr, "PS Move API init failed (wrong version?)\n"); exit(1); } PSMove *move = psmove_connect(); if (move == NULL) { printf("Could not connect to default Move controller.\n" "Please connect one via Bluetooth.\n"); exit(1); } csv = psmove_file_open("read_performance.csv", "w"); assert(csv != NULL); fprintf(csv, "mode,time,reads,dropped\n"); printf("\n -- PS Move API Sensor Reading Performance Test -- \n"); printf("\nTesting STATIC READ performance (non-changing LED setting)\n"); test_read_performance(move, STATIC_UPDATES); printf("\nTesting SMART READ performance (rate-limited LED setting)\n"); test_read_performance(move, SMART_UPDATES); printf("\nTesting BAD READ performance (continous LED setting)\n"); test_read_performance(move, ALL_UPDATES); printf("\nTesting RAW READ performance (no LED setting)\n"); test_read_performance(move, NO_UPDATES); printf("\n"); psmove_file_close(csv); psmove_shutdown(); return 0; }