Rev 1226 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1226 | Rev 1286 | ||
---|---|---|---|
Line 58... | Line 58... | ||
58 | // Stabiles Signal |
58 | // Stabiles Signal |
59 | if(abs(signal - PPM_in[index]) < 6) { if(SenderOkay < 200) SenderOkay += 10; else SenderOkay = 200;} |
59 | if(abs(signal - PPM_in[index]) < 6) { if(SenderOkay < 200) SenderOkay += 10; else SenderOkay = 200;} |
60 | tmp = (3 * (PPM_in[index]) + signal) / 4; |
60 | tmp = (3 * (PPM_in[index]) + signal) / 4; |
61 | if(tmp > signal+1) tmp--; else |
61 | if(tmp > signal+1) tmp--; else |
62 | if(tmp < signal-1) tmp++; |
62 | if(tmp < signal-1) tmp++; |
63 | if(SenderOkay >= 195) PPM_diff[index] = ((tmp - PPM_in[index]) / 3) * 3; |
63 | //if(SenderOkay >= 195) PPM_diff[index] = ((tmp - PPM_in[index]) / 3) * 3; // MartinR: so war es |
- | 64 | if(SenderOkay >= 195) PPM_diff[index] = (tmp - PPM_in[index]); // MartinR: Optimiert |
|
64 | else PPM_diff[index] = 0; |
65 | else PPM_diff[index] = 0; |
65 | PPM_in[index] = tmp; |
66 | PPM_in[index] = tmp; |
66 | } |
67 | } |
67 | index++; |
68 | index++; |
68 | if(index == 5) J3High; else J3Low; // Servosignal an J3 anlegen |
69 | if(index == 5) J3High; else J3Low; // Servosignal an J3 anlegen |