Rev 2058 | Rev 2073 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2058 | Rev 2059 | ||
---|---|---|---|
Line 133... | Line 133... | ||
133 | if (headingError < -YAW_I_LIMIT) |
133 | if (headingError < -YAW_I_LIMIT) |
134 | headingError = -YAW_I_LIMIT; |
134 | headingError = -YAW_I_LIMIT; |
135 | else if (headingError > YAW_I_LIMIT) |
135 | else if (headingError > YAW_I_LIMIT) |
136 | headingError = YAW_I_LIMIT; |
136 | headingError = YAW_I_LIMIT; |
Line 137... | Line -... | ||
137 | - | ||
138 | debugOut.analog[29] = headingError / 100; |
- | |
139 | 137 | ||
140 | PDPart = (int32_t) (headingError * yawIFactor) / (GYRO_DEG_FACTOR_YAW << 4); |
138 | PDPart = (int32_t) (headingError * yawIFactor) / (GYRO_DEG_FACTOR_YAW << 4); |
141 | // Ehhhhh here is something with desired yaw rate, not?? Ahh OK it gets added in later on. |
139 | // Ehhhhh here is something with desired yaw rate, not?? Ahh OK it gets added in later on. |
Line 142... | Line 140... | ||
142 | PDPart += (int32_t) (yawRate * yawPFactor) / (GYRO_DEG_FACTOR_YAW >> 5); |
140 | PDPart += (int32_t) (yawRate * yawPFactor) / (GYRO_DEG_FACTOR_YAW >> 5); |