Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 757 → Rev 758

/C-OSD/trunk/osd_helpers.c
185,14 → 185,14
* ##########################################################################*/
// draw routine
int draw_noodles(int8_t pos_x, int8_t pos_y, int8_t num, int8_t old_num) {
char noodle[5] = {0x78, 0x79, 0x7A, 0x7B, 0x7C};
int8_t line,car;
const char noodle[5] = {0x78, 0x79, 0x7A, 0x7B, 0x7C};
int8_t line, car;
line = num / 5;
car = num - (line * 5);
if (num != old_num) {
write_char_xy(15 - pos_x , pos_y + (old_num), 0);
}
}
 
if (num < 0) {car = -1* car; car = 4 - car; line--; num = num - 5;}
write_char_xy(15 - pos_x , pos_y + line, noodle[car]);
211,8 → 211,8
uint8_t center_x = 15;
uint8_t center_y = lastline - firstline;
center_y = 7;
write_char_xy(center_x - 7 ,center_y,226);
write_char_xy(center_x + 6 ,center_y,226);
write_char_xy(center_x - 7 ,center_y,226); // left bar
write_char_xy(center_x + 6 ,center_y,226); // right bar
 
 
#if FCONLY
229,7 → 229,7
//write_ndigit_number_u (0 , 5 , ticy ,3, 1);
//write_ndigit_number_u (0 , 6 , ticx ,3, 1);
 
if ((ticy != old_ticy) || (ticx != old_ticx)) {
//if ((ticy != old_ticy) || (ticx != old_ticx)) {
old1 = draw_noodles( 4, 3, (ticy / 2) + 20 + ticx, old1);
old2 = draw_noodles( 3, 3, (ticy / 3) + 20 + ticx, old2);
old3 = draw_noodles( 2, 3, (ticy / 6) + 20 + ticx, old3);
238,7 → 238,7
old6 = draw_noodles( - 2, 3, -(ticy / 3) + 20 + ticx, old6);
old7 = draw_noodles( - 1, 3, -(ticy / 6) + 20 + ticx, old7);
old8 = draw_noodles( 0, 3, -(ticy / 14) + 20 + ticx, old8);
}
//}
// update old vars
old_ticy = ticy;
old_ticx = ticx;
257,7 → 257,7
* from line <firstline> to <listlines> for given <nick> and <roll> values
*/
void draw_artificial_horizon(uint8_t firstline, uint8_t lastline, int16_t nick, int16_t roll) {
char noodle[5] = {225, 225, 226, 227, 227};
const char noodle[5] = {225, 225, 226, 227, 227};
uint8_t center_x = 15;
uint8_t center_y = lastline - firstline;
center_y = 7;