Rev 1921 | Rev 1928 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1921 | Rev 1925 | ||
---|---|---|---|
Line 365... | Line 365... | ||
365 | if((AdNeutralGier < 150 * 2) || (AdNeutralGier > 850 * 2)) { VersionInfo.HardwareError[0] |= FC_ERROR0_GYRO_YAW; }; |
365 | if((AdNeutralGier < 150 * 2) || (AdNeutralGier > 850 * 2)) { VersionInfo.HardwareError[0] |= FC_ERROR0_GYRO_YAW; }; |
366 | if((NeutralAccX < 300) || (NeutralAccX > 750)) { VersionInfo.HardwareError[0] |= FC_ERROR0_ACC_NICK; }; |
366 | if((NeutralAccX < 300) || (NeutralAccX > 750)) { VersionInfo.HardwareError[0] |= FC_ERROR0_ACC_NICK; }; |
367 | if((NeutralAccY < 300) || (NeutralAccY > 750)) { VersionInfo.HardwareError[0] |= FC_ERROR0_ACC_ROLL; }; |
367 | if((NeutralAccY < 300) || (NeutralAccY > 750)) { VersionInfo.HardwareError[0] |= FC_ERROR0_ACC_ROLL; }; |
368 | if((NeutralAccZ < 512) || (NeutralAccZ > 850)) { VersionInfo.HardwareError[0] |= FC_ERROR0_ACC_TOP; }; |
368 | if((NeutralAccZ < 512) || (NeutralAccZ > 850)) { VersionInfo.HardwareError[0] |= FC_ERROR0_ACC_TOP; }; |
369 | carefree_old = 70; |
369 | carefree_old = 70; |
- | 370 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
|
370 | LIBFC_HoTT_Clear(); |
371 | LIBFC_HoTT_Clear(); |
- | 372 | #endif |
|
371 | } |
373 | } |
Line 372... | Line 374... | ||
372 | 374 | ||
373 | 375 | ||
Line 1799... | Line 1801... | ||
1799 | // else tmp_int = 2 * tmp_int - tmp_motorwert[i]; // original MotorSmoothing |
1801 | // else tmp_int = 2 * tmp_int - tmp_motorwert[i]; // original MotorSmoothing |
1800 | else |
1802 | else |
1801 | { |
1803 | { |
1802 | if(EE_Parameter.MotorSmooth == 0) |
1804 | if(EE_Parameter.MotorSmooth == 0) |
1803 | { |
1805 | { |
1804 | tmp_int = 2 * tmp_int - tmp_motorwert[i]; |
1806 | tmp_int = 2 * tmp_int - tmp_motorwert[i]; |
1805 | } |
1807 | } |
1806 | else // 1 means tmp_int = tmp_int; |
1808 | else // 1 means tmp_int = tmp_int; |
1807 | if(EE_Parameter.MotorSmooth > 1) |
1809 | if(EE_Parameter.MotorSmooth > 1) |
1808 | { |
1810 | { |
1809 | // If >= 2 then allow >= 50% of the intended step down to rapidly reach the intended value. |
1811 | // If >= 2 then allow >= 50% of the intended step down to rapidly reach the intended value. |
1810 | tmp_int = tmp_int + ((tmp_motorwert[i] - tmp_int)/EE_Parameter.MotorSmooth); |
1812 | tmp_int = tmp_int + ((tmp_motorwert[i] - tmp_int)/EE_Parameter.MotorSmooth); |
1811 | } |
1813 | } |
1812 | } |
1814 | } |
1813 | LIMIT_MIN_MAX(tmp_int,(int) MIN_GAS * 4,(int) MAX_GAS * 4); |
1815 | LIMIT_MIN_MAX(tmp_int,(int) MIN_GAS * 4,(int) MAX_GAS * 4); |
1814 | Motor[i].SetPoint = tmp_int / 4; |
1816 | Motor[i].SetPoint = tmp_int / 4; |
1815 | Motor[i].SetPointLowerBits = (tmp_int % 4)<<1; // (3 bits total) |
1817 | Motor[i].SetPointLowerBits = (tmp_int % 4)<<1; // (3 bits total) |