Subversion Repositories Projects

Rev

Rev 523 | Rev 753 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 523 Rev 728
Line 1... Line 1...
1
/****************************************************************************
1
/****************************************************************************
2
 *   Copyright (C) 2009 by Claas Anders "CaScAdE" Rathje                    *
2
 *   Copyright (C) 2009-2010 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 59... Line 59...
59
 
59
 
60
                draw_variometer(27, top_line, naviData.Variometer);
60
                draw_variometer(27, top_line, naviData.Variometer);
61
 
61
 
62
 
62
 
63
                // center
63
                // center
64
                if (naviData.MKFlags & FLAG_MOTOR_RUN) { // should be engines running
64
                if (naviData.FCFlags & FLAG_MOTOR_RUN) { // should be engines running
65
                    if (!(old_MKFlags & FLAG_MOTOR_RUN)) { // motors just started, clear middle
65
                    if (!(old_MKFlags & FLAG_MOTOR_RUN)) { // motors just started, clear middle
66
                        clear();
66
                        clear();
67
                        // update flags to paint display again if needed
67
                        // update flags to paint display again if needed
68
                        COSD_FLAGS_RUNTIME &= ~COSD_ICONS_WRITTEN;
68
                        COSD_FLAGS_RUNTIME &= ~COSD_ICONS_WRITTEN;
69
                    }
69
                    }
Line 146... Line 146...
146
                    write_char_xy(27, bottom_line, 201); // sat2 (free)
146
                    write_char_xy(27, bottom_line, 201); // sat2 (free)
147
                }
147
                }
148
        }
148
        }
149
 
149
 
150
        // remember statistics (only when engines running)
150
        // remember statistics (only when engines running)
151
        if (naviData.MKFlags & FLAG_MOTOR_RUN) {
151
        if (naviData.FCFlags & FLAG_MOTOR_RUN) {
152
            if (naviData.Altimeter > max_Altimeter) max_Altimeter = naviData.Altimeter;
152
            if (naviData.Altimeter > max_Altimeter) max_Altimeter = naviData.Altimeter;
153
            if (naviData.GroundSpeed > max_GroundSpeed) max_GroundSpeed = naviData.GroundSpeed;
153
            if (naviData.GroundSpeed > max_GroundSpeed) max_GroundSpeed = naviData.GroundSpeed;
154
            if (naviData.HomePositionDeviation.Distance > max_Distance) {
154
            if (naviData.HomePositionDeviation.Distance > max_Distance) {
155
                max_Distance = naviData.HomePositionDeviation.Distance;
155
                max_Distance = naviData.HomePositionDeviation.Distance;
156
            }
156
            }
Line 160... Line 160...
160
        }
160
        }
161
 
161
 
162
        // remember last values
162
        // remember last values
163
        last_RC_Quality = naviData.RC_Quality;
163
        last_RC_Quality = naviData.RC_Quality;
164
        last_UBat = naviData.UBat;
164
        last_UBat = naviData.UBat;
165
        old_MKFlags = naviData.MKFlags;
165
        old_MKFlags = naviData.FCFlags;
166
        seconds_since_last_data = 0;
166
        seconds_since_last_data = 0;
167
 
167
 
168
        return 0;
168
        return 0;
169
}
169
}
170
 
170