Rev 1866 | Rev 2099 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1866 | Rev 2039 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /**************************************************************************** |
1 | /**************************************************************************** |
2 | * Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje * |
2 | * Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje * |
3 | * admiralcascade@gmail.com * |
3 | * admiralcascade@gmail.com * |
4 | * Project-URL: http://www.mylifesucks.de/oss/c-osd/ * |
4 | * Project-URL: http://www.mylifesucks.de/oss/c-osd/ * |
5 | * * |
5 | * * |
6 | * This program is free software; you can redistribute it and/or modify * |
6 | * This program is free software; you can redistribute it and/or modify * |
7 | * it under the terms of the GNU General Public License as published by * |
7 | * it under the terms of the GNU General Public License as published by * |
Line 61... | Line 61... | ||
61 | 61 | ||
Line 62... | Line 62... | ||
62 | draw_variometer(27, top_line, naviData.Variometer); |
62 | draw_variometer(27, top_line, naviData.Variometer); |
63 | 63 | ||
64 | 64 | ||
65 | // center |
65 | // center |
66 | if (naviData.FCFlags & FCFLAG_MOTOR_RUN) { // should be engines running |
66 | if (naviData.FCStatusFlags & FCFLAG_MOTOR_RUN) { // should be engines running |
67 | if (!(old_MKFlags & FCFLAG_MOTOR_RUN)) { // motors just started, clear middle |
67 | if (!(old_MKFlags & FCFLAG_MOTOR_RUN)) { // motors just started, clear middle |
68 | clear(); |
68 | clear(); |
Line 118... | Line 118... | ||
118 | write_char_xy(27, bottom_line, 201); // sat2 (free) |
118 | write_char_xy(27, bottom_line, 201); // sat2 (free) |
119 | } |
119 | } |
120 | } |
120 | } |
Line 121... | Line 121... | ||
121 | 121 | ||
122 | // remember statistics (only when engines running) |
122 | // remember statistics (only when engines running) |
123 | if (naviData.FCFlags & FCFLAG_MOTOR_RUN) { |
123 | if (naviData.FCStatusFlags & FCFLAG_MOTOR_RUN) { |
124 | if (COSD_FLAGS_CONFIG & COSD_FLAG_GPSHEIGHT) { |
124 | if (COSD_FLAGS_CONFIG & COSD_FLAG_GPSHEIGHT) { |
125 | if (naviData.CurrentPosition.Altitude / 1000 - altimeter_offset > max_Altimeter) max_Altimeter = naviData.CurrentPosition.Altitude / 1000; |
125 | if (naviData.CurrentPosition.Altitude / 1000 - altimeter_offset > max_Altimeter) max_Altimeter = naviData.CurrentPosition.Altitude / 1000; |
126 | } else { |
126 | } else { |
127 | if (naviData.Altimeter / 20 > max_Altimeter) max_Altimeter = naviData.Altimeter / 20; |
127 | if (naviData.Altimeter / 20 > max_Altimeter) max_Altimeter = naviData.Altimeter / 20; |
Line 140... | Line 140... | ||
140 | } |
140 | } |
Line 141... | Line 141... | ||
141 | 141 | ||
142 | // remember last values |
142 | // remember last values |
143 | last_RC_Quality = naviData.RC_Quality; |
143 | last_RC_Quality = naviData.RC_Quality; |
144 | last_UBat = naviData.UBat; |
144 | last_UBat = naviData.UBat; |
145 | old_MKFlags = naviData.FCFlags; |
145 | old_MKFlags = naviData.FCStatusFlags; |
146 | old_NCFlags = naviData.NCFlags; |
146 | old_NCFlags = naviData.NCFlags; |
Line 147... | Line 147... | ||
147 | seconds_since_last_data = 0; |
147 | seconds_since_last_data = 0; |
148 | 148 |