Rev 1869 | Rev 1960 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1869 | Rev 1955 | ||
---|---|---|---|
Line 97... | Line 97... | ||
97 | rampedTargetHeight -= staticParams.Height_Gain; |
97 | rampedTargetHeight -= staticParams.Height_Gain; |
98 | } |
98 | } |
99 | } |
99 | } |
Line 100... | Line 100... | ||
100 | 100 | ||
101 | // height, in meters (so the division factor is: 100) |
101 | // height, in meters (so the division factor is: 100) |
102 | DebugOut.Analog[30] = height / 10; |
102 | debugOut.analog[30] = height / 10; |
Line 103... | Line 103... | ||
103 | } |
103 | } |
104 | 104 | ||
105 | // ParamSet.GlobalConfig & CFG_HEIGHT_CONTROL |
105 | // ParamSet.GlobalConfig & CFG_HEIGHT_CONTROL |
Line 122... | Line 122... | ||
122 | 122 | ||
123 | // iHeight, at a difference of 5 meters and a freq. of 488 Hz, will grow with 244000 / sec.... |
123 | // iHeight, at a difference of 5 meters and a freq. of 488 Hz, will grow with 244000 / sec.... |
Line 124... | Line 124... | ||
124 | // iHeight += heightError; |
124 | // iHeight += heightError; |
125 | 125 | ||
126 | if (dHeight > 0) { |
126 | if (dHeight > 0) { |
127 | DebugOut.Digital[0] |= DEBUG_HEIGHT_DIFF; |
127 | debugOut.digital[0] |= DEBUG_HEIGHT_DIFF; |
128 | DebugOut.Digital[1] &= ~DEBUG_HEIGHT_DIFF; |
128 | debugOut.digital[1] &= ~DEBUG_HEIGHT_DIFF; |
129 | } else if (dHeight < 0) { |
129 | } else if (dHeight < 0) { |
130 | DebugOut.Digital[1] |= DEBUG_HEIGHT_DIFF; |
130 | debugOut.digital[1] |= DEBUG_HEIGHT_DIFF; |
Line 131... | Line 131... | ||
131 | DebugOut.Digital[0] &= ~DEBUG_HEIGHT_DIFF; |
131 | debugOut.digital[0] &= ~DEBUG_HEIGHT_DIFF; |
132 | } |
132 | } |
133 | 133 | ||
Line 165... | Line 165... | ||
165 | - 1) + throttle) / HOVERTHROTTLEFILTER; |
165 | - 1) + throttle) / HOVERTHROTTLEFILTER; |
Line 166... | Line 166... | ||
166 | 166 | ||
167 | if (isFlying >= 1000 && stronglyFilteredHeightDiff < 3 |
167 | if (isFlying >= 1000 && stronglyFilteredHeightDiff < 3 |
168 | && stronglyFilteredHeightDiff > -3) { |
168 | && stronglyFilteredHeightDiff > -3) { |
169 | hoverThrottle = stronglyFilteredThrottle; |
169 | hoverThrottle = stronglyFilteredThrottle; |
170 | DebugOut.Digital[0] |= DEBUG_HOVERTHROTTLE; |
170 | debugOut.digital[0] |= DEBUG_HOVERTHROTTLE; |
171 | // DebugOut.Analog[18] = hoverThrottle; |
171 | // DebugOut.Analog[18] = hoverThrottle; |
172 | } else |
172 | } else |
Line 173... | Line 173... | ||
173 | DebugOut.Digital[0] &= ~DEBUG_HOVERTHROTTLE; |
173 | debugOut.digital[0] &= ~DEBUG_HOVERTHROTTLE; |
174 | 174 | ||
Line 175... | Line 175... | ||
175 | DebugOut.Analog[20] = dThrottle; |
175 | debugOut.analog[20] = dThrottle; |
176 | DebugOut.Analog[21] = hoverThrottle; |
176 | debugOut.analog[21] = hoverThrottle; |
Line 177... | Line 177... | ||
177 | 177 |