Rev 1677 | Rev 1682 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1677 | Rev 1680 | ||
---|---|---|---|
Line 1664... | Line 1664... | ||
1664 | // Gier |
1664 | // Gier |
1665 | if(Mixer.Motor[i][3] == 64) tmp_int += GierMischanteil; |
1665 | if(Mixer.Motor[i][3] == 64) tmp_int += GierMischanteil; |
1666 | else if(Mixer.Motor[i][3] == -64) tmp_int -= GierMischanteil; |
1666 | else if(Mixer.Motor[i][3] == -64) tmp_int -= GierMischanteil; |
1667 | else tmp_int += ((long)GierMischanteil * Mixer.Motor[i][3]) / 64L; |
1667 | else tmp_int += ((long)GierMischanteil * Mixer.Motor[i][3]) / 64L; |
Line -... | Line 1668... | ||
- | 1668 | ||
- | 1669 | if(tmp_int > tmp_motorwert[i]) tmp_int = (tmp_motorwert[i] + tmp_int) / 2; // MotorSmoothing |
|
- | 1670 | else tmp_int = 2 * tmp_int - tmp_motorwert[i]; // MotorSmoothing |
|
- | 1671 | ||
1668 | 1672 | /* |
|
1669 | if(Parameter_UserParam5 > 50) |
1673 | if(Parameter_UserParam5 > 50) |
1670 | { |
1674 | { |
1671 | if(tmp_int > tmp_motorwert[i]) tmp_int = (tmp_motorwert[i] + tmp_int) / 2; // MotorSmoothing |
1675 | if(tmp_int > tmp_motorwert[i]) tmp_int = (tmp_motorwert[i] + tmp_int) / 2; // MotorSmoothing |
- | 1676 | // else tmp_int = 2 * tmp_int - tmp_motorwert[i]; // MotorSmoothing |
|
1672 | else tmp_int = 2 * tmp_int - tmp_motorwert[i]; // MotorSmoothing |
1677 | else tmp_int -= Parameter_UserParam6 * (tmp_motorwert[i] - tmp_int); // MotorSmoothing |
1673 | } |
1678 | } |
1674 | 1679 | */ |
|
1675 | LIMIT_MIN_MAX(tmp_int,MIN_GAS * 4,MAX_GAS * 4); |
1680 | LIMIT_MIN_MAX(tmp_int,MIN_GAS * 4,MAX_GAS * 4); |
1676 | Motor[i].SetPoint = tmp_int / 4; |
1681 | Motor[i].SetPoint = tmp_int / 4; |
1677 | Motor[i].SetPointLowerBits = (tmp_int % 4)<<1; // (3 bits total) |
1682 | Motor[i].SetPointLowerBits = (tmp_int % 4)<<1; // (3 bits total) |
1678 | tmp_motorwert[i] = tmp_int; |
1683 | tmp_motorwert[i] = tmp_int; |