Rev 1676 | Rev 1680 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1676 | Rev 1677 | ||
---|---|---|---|
Line 1670... | Line 1670... | ||
1670 | { |
1670 | { |
1671 | if(tmp_int > tmp_motorwert[i]) tmp_int = (tmp_motorwert[i] + tmp_int) / 2; // MotorSmoothing |
1671 | if(tmp_int > tmp_motorwert[i]) tmp_int = (tmp_motorwert[i] + tmp_int) / 2; // MotorSmoothing |
1672 | else tmp_int = 2 * tmp_int - tmp_motorwert[i]; // MotorSmoothing |
1672 | else tmp_int = 2 * tmp_int - tmp_motorwert[i]; // MotorSmoothing |
1673 | } |
1673 | } |
Line 1674... | Line 1674... | ||
1674 | 1674 | ||
1675 | LIMIT_MIN_MAX(tmp_int,MIN_GAS * 4,MAX_GAS * 4);test |
1675 | LIMIT_MIN_MAX(tmp_int,MIN_GAS * 4,MAX_GAS * 4); |
1676 | Motor[i].SetPoint = tmp_int / 4; |
1676 | Motor[i].SetPoint = tmp_int / 4; |
1677 | Motor[i].SetPointLowerBits = tmp_int % 4; |
1677 | Motor[i].SetPointLowerBits = (tmp_int % 4)<<1; // (3 bits total) |
1678 | tmp_motorwert[i] = tmp_int; |
1678 | tmp_motorwert[i] = tmp_int; |
1679 | } |
1679 | } |
1680 | else |
1680 | else |
1681 | { |
1681 | { |