Download Memoria. Introducción 0

Transcript
Memoria. Anexo III: Código modificado de la Unidad de Medida Inercial
{
state = 1;
sync_start = diff;
}
return;
}
if( state < PPM_MAX_PULSES+1 )
{
/* Sanity check the pulse for a valid servo width */
if( width < 700ul * CLOCK || width > 2300ul * CLOCK )
goto restart_ppm_cycle;
/* Read a data pulses */
ppm_pulses[ state++ - 1 ] = width;
return;
}
/*
* All done.
Mark it as valid and call the user supplied
* copy_to_servos() routine to update the servo outputs.
*/
144