Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 733 → Rev 734

/C-OSD/trunk/osd_ncmode_default.c/osd_ncmode_default.c
106,7 → 106,7
write_char_xy(21, top_line + 1, 0xa0 + heading_fine_conv(heading_home));
 
write_ndigit_number_u(24, top_line + 1, naviData.HomePositionDeviation.Distance / 10, 3, 0);
 
// center
if (naviData.FCFlags & FLAG_MOTOR_RUN) { // should be engines running
if (!(old_MKFlags & FLAG_MOTOR_RUN)) { // motors just started, clear middle
113,6 → 113,12
clear();
// remember current heigth for gps offset
altimeter_offset = naviData.CurrentPosition.Altitude / 1000;
// 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;
} else if (COSD_FLAGS_MODES & COSD_FLAG_FCCURRENT) {
wasted_ampere_offset = naviData.UsedCapacity;
}
// update flags to paint display again if needed
COSD_FLAGS_RUNTIME &= ~COSD_ICONS_WRITTEN;
}
145,6 → 151,16
write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[7])))); // ampere
write_ndigit_number_u_10th(18, line, max_ampere / 10, 3, 0);
write_char_xy(22, line, 0x9F); // small A
// wasted mampere in this flight (will count up after landing)
if ((COSD_FLAGS_RUNTIME & COSD_FLAG_STROMREC) && !(COSD_FLAGS_MODES & COSD_FLAG_FCCURRENT)) {
write_ndigit_number_u(23, line, (ampere_wasted / 10) - wasted_ampere_offset, 4, 0);
} else if (COSD_FLAGS_MODES & COSD_FLAG_FCCURRENT) {
write_ndigit_number_u(23, line, naviData.UsedCapacity - wasted_ampere_offset, 4, 0);
}
write_char_xy(27, line, 0xB5); // mah
}
write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[4])))); // max time
write_time(16, line, max_FlyingTime);