#include <stdio.h>
static int running;
static float width;
static void* __send_pulses(__attribute__ ((unused)) void *params)
{
while(running){
}
return 0;
}
int main()
{
pthread_t send_pulse_thread;
printf("\nDISCONNECT PROPELLERS FROM MOTORS\n");
printf("DISCONNECT POWER FROM ESCS\n");
printf("press enter to start sending max pulse width\n");
getchar();
width = 1;
running = 1;
if(
rc_pthread_create(&send_pulse_thread, __send_pulses, (
void*) NULL, SCHED_OTHER,0)==-1){
return -1;
}
printf("\n");
printf("Now apply power to the ESCs.\n");
printf("Press enter again after the ESCs finish chirping\n");
getchar();
printf("\n");
printf("Sending minimum width pulses\n");
printf("Press enter again after the ESCs chirp to finish calibration\n");
width = 0;
getchar();
printf("\nCalibration complete, check with rc_test_escs\n");
running =0;
return 0;
}