Rev 1652 | Rev 1654 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1652 | Rev 1653 | ||
---|---|---|---|
Line 1646... | Line 1646... | ||
1646 | else tmp_int += ((long)pd_ergebnis_roll * Mixer.Motor[i][2]) / 64L; |
1646 | else tmp_int += ((long)pd_ergebnis_roll * Mixer.Motor[i][2]) / 64L; |
1647 | // Gier |
1647 | // Gier |
1648 | if(Mixer.Motor[i][3] == 64) tmp_int += GierMischanteil * 2; |
1648 | if(Mixer.Motor[i][3] == 64) tmp_int += GierMischanteil * 2; |
1649 | else if(Mixer.Motor[i][3] == -64) tmp_int -= GierMischanteil * 2; |
1649 | else if(Mixer.Motor[i][3] == -64) tmp_int -= GierMischanteil * 2; |
1650 | else tmp_int += ((long)GierMischanteil * Mixer.Motor[i][3]) / 32L; |
1650 | else tmp_int += ((long)GierMischanteil * Mixer.Motor[i][3]) / 32L; |
1651 | 1651 | /* |
|
1652 | if(tmp_int > tmp_motorwert[i]) tmp_int = (tmp_motorwert[i] + tmp_int) / 2; // MotorSmoothing |
1652 | if(tmp_int > tmp_motorwert[i]) tmp_int = (tmp_motorwert[i] + tmp_int) / 2; // MotorSmoothing |
1653 | else tmp_int = 2 * tmp_int - tmp_motorwert[i]; // MotorSmoothing |
1653 | else tmp_int = 2 * tmp_int - tmp_motorwert[i]; // MotorSmoothing |
1654 | 1654 | ||
- | 1655 | if(Poti2 > 50) |
|
- | 1656 | { |
|
- | 1657 | if(tmp_int > tmp_motorwert[i]) tmp_int = (tmp_motorwert[i] + tmp_int) / 2; // MotorSmoothing |
|
- | 1658 | else if(Poti2 > 150) tmp_int = 2 * tmp_int - tmp_motorwert[i]; // MotorSmoothing |
|
- | 1659 | } |
|
- | 1660 | */ |
|
1655 | LIMIT_MIN_MAX(tmp_int,MIN_GAS * 8,MAX_GAS * 8); |
1661 | LIMIT_MIN_MAX(tmp_int,MIN_GAS * 8,MAX_GAS * 8); |
1656 | Motor[i].SetPoint = tmp_int / 8; |
1662 | Motor[i].SetPoint = tmp_int / 8; |
1657 | Motor[i].SetPointLowerBits = tmp_int % 8; |
1663 | Motor[i].SetPointLowerBits = tmp_int % 8; |
1658 | tmp_motorwert[i] = tmp_int; |
1664 | tmp_motorwert[i] = tmp_int; |
1659 | } |
1665 | } |