Subversion Repositories Projects

Rev

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

Rev 800 Rev 809
Line 140... Line 140...
140
 
140
 
141
        // center
141
        // center
142
        if (naviData.FCFlags & FCFLAG_MOTOR_RUN) { // should be engines running
142
        if (naviData.FCFlags & FCFLAG_MOTOR_RUN) { // should be engines running
143
            if (!(old_MKFlags & FCFLAG_MOTOR_RUN)) { // motors just started, clear middle
143
            if (!(old_MKFlags & FCFLAG_MOTOR_RUN)) { // motors just started, clear middle
144
                clear();
144
                clear();
-
 
145
                // remember current heigth for offsets
145
                // remember current heigth for gps offset
146
                if (COSD_FLAGS_CONFIG & COSD_FLAG_GPSHEIGHT) {
-
 
147
                    altimeter_offset = naviData.CurrentPosition.Altitude / 1000; // GPS
-
 
148
                } else {
-
 
149
                    altimeter_offset = naviData.Altimeter / 20; // BARO
146
                altimeter_offset = naviData.CurrentPosition.Altitude / 1000;
150
                }
147
                // set wasted counter to current offset
151
                // set wasted counter to current offset
148
                if ((COSD_FLAGS_RUNTIME & COSD_FLAG_STROMREC) && !(COSD_FLAGS_MODES & COSD_FLAG_FCCURRENT)) {
152
                if ((COSD_FLAGS_RUNTIME & COSD_FLAG_STROMREC) && !(COSD_FLAGS_MODES & COSD_FLAG_FCCURRENT)) {
149
                    wasted_ampere_offset = ampere_wasted / 10;
153
                    wasted_ampere_offset = ampere_wasted / 10;
150
                } else if (COSD_FLAGS_MODES & COSD_FLAG_FCCURRENT) {
154
                } else if (COSD_FLAGS_MODES & COSD_FLAG_FCCURRENT) {