Subversion Repositories Projects

Compare Revisions

Regard whitespace Rev 470 → Rev 471

/C-OSD/trunk/osd_ncmode_default.c
17,9 → 17,9
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
****************************************************************************/
 
if (COSD_FLAGS & COSD_FLAG_HUD) {
// write icons at init or after menu/mode-switch
if (!(COSD_FLAGS & COSD_ICONS_WRITTEN)) {
if (!(COSD_FLAGS2 & COSD_ICONS_WRITTEN)) {
write_char_xy(5, top_line, 0xCB); // km/h
write_char_xy(10, top_line, 0xCA); // RC-transmitter
write_char_xy(16, top_line, 0xD0); // degree symbol
36,7 → 36,7
write_char_xy(21, bottom_line, 0xD2); // fly clock
write_char_xy(26, bottom_line, 0xC8); // sat1
write_char_xy(27, bottom_line, 0xC9); // sat2
COSD_FLAGS |= COSD_ICONS_WRITTEN;
COSD_FLAGS2 |= COSD_ICONS_WRITTEN;
}
 
// first line
50,8 → 50,8
for (uint8_t x = 0; x < 4; x++)
write_char_att_xy(7 + x, top_line, 0);
}
last_RC_Quality = naviData.RC_Quality;
 
 
if (naviData.NCFlags & NC_FLAG_NOSERIALLINK) {
write_char_xy(11, top_line, 0); // clear
} else {
90,16 → 90,16
if (!(old_MKFlags & FLAG_MOTOR_RUN)) { // motors just started, clear middle
clear();
// update flags to paint display again if needed
COSD_FLAGS &= ~COSD_ICONS_WRITTEN;
COSD_FLAGS2 &= ~COSD_ICONS_WRITTEN;
}
if (COSD_FLAGS & COSD_FLAG_ARTHORIZON) {
draw_artificial_horizon(top_line + 2, bottom_line - 1, naviData.AngleNick, naviData.AngleRoll);
}
// motors are on, assume we were/are flying
COSD_FLAGS |= COSD_WASFLYING;
COSD_FLAGS2 |= COSD_WASFLYING;
} else {
// stats
if ((COSD_FLAGS & COSD_WASFLYING) && (COSD_FLAGS & COSD_FLAG_STATS)) {
if ((COSD_FLAGS2 & COSD_WASFLYING) && (COSD_FLAGS & COSD_FLAG_STATS)) {
uint8_t line = 3;
write_ascii_string_pgm(2, line, stats_item_pointers[0]); // max Altitude
write_ndigit_number_s(18, line, max_Altimeter / 30, 1000, 0);
137,7 → 137,7
if (COSD_FLAGS2 & COSD_FLAG_STROMREC) {
//write_ndigit_number_s(3, bottom_line - 1, ampere, 1000, 0);
write_ndigit_number_u_10th(3, bottom_line - 1, ampere / 10, 100, 0);
write_ndigit_number_s(10, bottom_line - 1, ampere_wasted, 1000, 0);
write_ndigit_number_s(10, bottom_line - 1, ampere_wasted / 10, 1000, 0);
}
 
// bottom line
150,8 → 150,6
for (uint8_t x = 2; x < 8; x++)
write_char_att_xy(x, bottom_line, 0);
}
// remember last values
last_UBat = naviData.UBat;
 
write_time(8, bottom_line, uptime);
write_time(15, bottom_line, naviData.FlyingTime);
171,6 → 169,7
} else { // (naviData.NCFlags & NC_FLAG_FREE)
write_char_xy(27, bottom_line, 201); // sat2 (free)
}
}
 
//write_number_s(8, 5, RxDataLen);
//write_number_s(16, 5, setsReceived++);
187,6 → 186,8
if (ampere > max_ampere) max_ampere = ampere;
}
 
// remember last values
last_RC_Quality = naviData.RC_Quality;
last_UBat = naviData.UBat;
old_MKFlags = naviData.MKFlags;
seconds_since_last_data = 0;