Rev 902 | Rev 1437 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 902 | Rev 952 | ||
---|---|---|---|
Line 118... | Line 118... | ||
118 | } |
118 | } |
119 | } |
119 | } |
Line 120... | Line 120... | ||
120 | 120 | ||
121 | // remember statistics (only when engines running) |
121 | // remember statistics (only when engines running) |
- | 122 | if (naviData.FCFlags & FCFLAG_MOTOR_RUN) { |
|
- | 123 | if (COSD_FLAGS_CONFIG & COSD_FLAG_GPSHEIGHT) { |
|
- | 124 | if (naviData.CurrentPosition.Altitude / 1000 - altimeter_offset > max_Altimeter) max_Altimeter = naviData.CurrentPosition.Altitude / 1000; |
|
122 | if (naviData.FCFlags & FCFLAG_MOTOR_RUN) { |
125 | } else { |
- | 126 | if (naviData.Altimeter / 20 > max_Altimeter) max_Altimeter = naviData.Altimeter / 20; |
|
123 | if (naviData.Altimeter > max_Altimeter) max_Altimeter = naviData.Altimeter; |
127 | } |
124 | if (naviData.GroundSpeed > max_GroundSpeed) max_GroundSpeed = naviData.GroundSpeed; |
128 | if (naviData.GroundSpeed > max_GroundSpeed) max_GroundSpeed = naviData.GroundSpeed; |
125 | if (naviData.HomePositionDeviation.Distance > max_Distance) { |
129 | if (naviData.HomePositionDeviation.Distance > max_Distance) { |
126 | max_Distance = naviData.HomePositionDeviation.Distance; |
130 | max_Distance = naviData.HomePositionDeviation.Distance; |
127 | } |
131 | } |
128 | if (naviData.UBat < min_UBat) min_UBat = naviData.UBat; |
132 | if (naviData.UBat < min_UBat) min_UBat = naviData.UBat; |
- | 133 | if (naviData.FlyingTime > max_FlyingTime) max_FlyingTime = naviData.FlyingTime; |
|
129 | if (naviData.FlyingTime > max_FlyingTime) max_FlyingTime = naviData.FlyingTime; |
134 | if ((COSD_FLAGS_RUNTIME & COSD_FLAG_STROMREC) && !(COSD_FLAGS_MODES & COSD_FLAG_FCCURRENT)) { |
- | 135 | if (ampere > max_ampere) max_ampere = ampere; |
|
- | 136 | } else if (COSD_FLAGS_MODES & COSD_FLAG_FCCURRENT) { |
|
- | 137 | if (naviData.Current * 10 > max_ampere) max_ampere = naviData.Current * 10; |
|
130 | if (ampere > max_ampere) max_ampere = ampere; |
138 | } |
Line 131... | Line 139... | ||
131 | } |
139 | } |
- | 140 | ||
132 | 141 | // remember last values |
|
133 | // remember last values |
142 | last_RC_Quality = naviData.RC_Quality; |
- | 143 | last_UBat = naviData.UBat; |
|
134 | last_UBat = naviData.UBat; |
144 | old_MKFlags = naviData.FCFlags; |
Line 135... | Line 145... | ||
135 | old_MKFlags = naviData.FCFlags; |
145 | old_NCFlags = naviData.NCFlags; |
136 | seconds_since_last_data = 0; |
146 | seconds_since_last_data = 0; |