@ -20,7 +20,7 @@ Emphasis has been put on code simplicity and reliability.
@@ -20,7 +20,7 @@ Emphasis has been put on code simplicity and reliability.
Code has not yet been massively tested in the field.
Nevertheless extensive tests have been done in the lab with a limited set of different receivers, and a limited number of users did report very sucessfull results.
Nevertheless extensive tests have been done in the lab with a limited set of different receivers, and a limited number of users did report very successful results.
Carefully check that your radio is working perfectly before you fly.
else// We've got a low level (falling edge, channel end or sync symbol start)
{
ppm1_width[ppm1_channel]=servo_time-ppm1_start[ppm1_channel];// Calculate channel pulse lenght, or sync symbol lenght
ppm1_width[ppm1_channel]=servo_time-ppm1_start[ppm1_channel];// Calculate channel pulse length, or sync symbol length
if(sync_ch1==true)// Are we synchronized ?
{
// Check channel pulse lenght validity
if(ppm1_width[ppm1_channel]>(PPM_CH1_VAL_MAX-PPM_CH1_CHANNEL_PREPULSE_LENGHT))||(ppm1_width[ppm1_channel]<(PPM_CH1_VAL_MIN-PPM_CH1_CHANNEL_PREPULSE_LENGHT))// If we have a valid pulse lenght
// Check channel pulse length validity
if(ppm1_width[ppm1_channel]>(PPM_CH1_VAL_MAX-PPM_CH1_CHANNEL_PREPULSE_LENGHT))||(ppm1_width[ppm1_channel]<(PPM_CH1_VAL_MIN-PPM_CH1_CHANNEL_PREPULSE_LENGHT))// If we have a valid pulse length
{
// Reset channel error flag
channel_error_ch1=false;
}
else// We do not have a valid channel lenght
else// We do not have a valid channel length
{
if(ppm1_width[ppm1_channel]>PPM_CH1_MIN_SYNC_LENGHT)||(ppm1_width[ppm1_channel]<PPM_CH1_MAX_SYNC_LENGHT)//Check for sync symbol
else// We've got a low level (falling edge, channel end or sync symbol start)
{
ppm2_width[ppm2_channel]=servo_time-ppm2_start[ppm2_channel];// Calculate channel pulse lenght, or sync symbol lenght
ppm2_width[ppm2_channel]=servo_time-ppm2_start[ppm2_channel];// Calculate channel pulse length, or sync symbol length
if(sync_ch2==true)// Are we synchronized ?
{
// Check channel pulse lenght validity
if(ppm2_width[ppm2_channel]>(PPM_CH2_VAL_MAX-PPM_CH2_CHANNEL_PREPULSE_LENGHT))||(ppm2_width[ppm2_channel]<(PPM_CH2_VAL_MIN-PPM_CH2_CHANNEL_PREPULSE_LENGHT))// If we have a valid pulse lenght
// Check channel pulse length validity
if(ppm2_width[ppm2_channel]>(PPM_CH2_VAL_MAX-PPM_CH2_CHANNEL_PREPULSE_LENGHT))||(ppm2_width[ppm2_channel]<(PPM_CH2_VAL_MIN-PPM_CH2_CHANNEL_PREPULSE_LENGHT))// If we have a valid pulse length
{
// Reset channel error flag
channel_error_ch2=false;
}
else// We do not have a valid channel lenght
else// We do not have a valid channel length
{
if(ppm2_width[ppm2_channel]>PPM_CH2_MIN_SYNC_LENGHT)||(ppm2_width[ppm2_channel]<PPM_CH2_MAX_SYNC_LENGHT)//Check for sync symbol