Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 808 → Rev 809

/C-OSD/trunk/osd_ncmode_default.c/osd_ncmode_default.c
142,8 → 142,12
if (naviData.FCFlags & FCFLAG_MOTOR_RUN) { // should be engines running
if (!(old_MKFlags & FCFLAG_MOTOR_RUN)) { // motors just started, clear middle
clear();
// remember current heigth for gps offset
altimeter_offset = naviData.CurrentPosition.Altitude / 1000;
// remember current heigth for offsets
if (COSD_FLAGS_CONFIG & COSD_FLAG_GPSHEIGHT) {
altimeter_offset = naviData.CurrentPosition.Altitude / 1000; // GPS
} else {
altimeter_offset = naviData.Altimeter / 20; // BARO
}
// set wasted counter to current offset
if ((COSD_FLAGS_RUNTIME & COSD_FLAG_STROMREC) && !(COSD_FLAGS_MODES & COSD_FLAG_FCCURRENT)) {
wasted_ampere_offset = ampere_wasted / 10;