Merge branch 'next'
This commit is contained in:
@@ -314,15 +314,14 @@ extern "C" void TC3_IRQHandler() //capture ppm in at 2MHz
|
||||
ppmInState = 1; // triggered
|
||||
}
|
||||
else {
|
||||
if (ppmInState && ppmInState<=16)
|
||||
{
|
||||
if (val>800 && val<2200) // if valid pulse-width range
|
||||
{
|
||||
g_ppmIns[ppmInState++ - 1] =
|
||||
(int16_t)(val - 1500)*(g_eeGeneral.PPM_Multiplier+10)/10; //+-500 != 512, but close enough.
|
||||
if (ppmInState>0 && ppmInState<=16) {
|
||||
if (val>800 && val<2200) { // if valid pulse-width range
|
||||
ppmInValid = 100;
|
||||
g_ppmIns[ppmInState++ - 1] = (int16_t)(val - 1500)*(g_eeGeneral.PPM_Multiplier+10)/10; //+-500 != 512, but close enough.
|
||||
}
|
||||
else
|
||||
else {
|
||||
ppmInState = 0; // not triggered
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user