Rev 2426 | Rev 2488 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2426 | Rev 2486 | ||
---|---|---|---|
Line 120... | Line 120... | ||
120 | if(abs(signal - PPM_in[index]) < 6) { if(SenderOkay < 200) SenderOkay += 10; else SenderOkay = 200;} |
120 | if(abs(signal - PPM_in[index]) < 6) { if(SenderOkay < 200) SenderOkay += 10; else SenderOkay = 200;} |
121 | } |
121 | } |
122 | tmp = (3 * (PPM_in[index]) + signal) / 4; |
122 | tmp = (3 * (PPM_in[index]) + signal) / 4; |
123 | if(tmp > signal+1) tmp--; else |
123 | if(tmp > signal+1) tmp--; else |
124 | if(tmp < signal-1) tmp++; |
124 | if(tmp < signal-1) tmp++; |
125 | if(SenderOkay >= 195) PPM_diff[index] = ((tmp - PPM_in[index]) / 3) * 3; |
- | |
126 | else PPM_diff[index] = 0; |
- | |
127 | PPM_in[index] = tmp; |
125 | PPM_in[index] = tmp; |
- | 126 | if(SenderOkay >= 195) PPM_diff[index] = ((tmp - PPM_in[index]) / 3) * 3; |
|
- | 127 | else |
|
- | 128 | { |
|
- | 129 | PPM_diff[index] = 0; |
|
- | 130 | if(SenderOkay < 50) |
|
- | 131 | { |
|
- | 132 | PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] = 0; |
|
- | 133 | PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] = 0; |
|
- | 134 | PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] = 0; |
|
- | 135 | PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] = 0; |
|
- | 136 | } |
|
- | 137 | } |
|
128 | } |
138 | } |
129 | index++; |
139 | index++; |
130 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
140 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
131 | #else |
141 | #else |
132 | /* |
142 | /* |