Rev 728 | Rev 761 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 728 | Rev 758 | ||
---|---|---|---|
Line 52... | Line 52... | ||
52 | valid_ppm_to_go--; |
52 | valid_ppm_to_go--; |
53 | } else { |
53 | } else { |
54 | ppm = TCNT1 - old_timer1; |
54 | ppm = TCNT1 - old_timer1; |
55 | ppm -= 256; |
55 | ppm -= 256; |
56 | if (ppm < 128) { // we want HUD |
56 | if (ppm < 128) { // we want HUD |
- | 57 | if (!(COSD_FLAGS_MODES & COSD_FLAG_HUD)) { |
|
- | 58 | COSD_FLAGS_RUNTIME &= ~COSD_ICONS_WRITTEN; |
|
- | 59 | } |
|
57 | COSD_FLAGS_CONFIG |= COSD_FLAG_HUD; |
60 | COSD_FLAGS_MODES |= COSD_FLAG_HUD; |
58 | } else { // we do not want hud |
61 | } else { // we do not want hud |
59 | if (COSD_FLAGS_CONFIG & COSD_FLAG_HUD) { |
62 | if (COSD_FLAGS_MODES & COSD_FLAG_HUD) { |
60 | clear(); |
63 | clear(); |
61 | } |
64 | } |
62 | COSD_FLAGS_CONFIG &= ~COSD_FLAG_HUD; |
65 | COSD_FLAGS_MODES &= ~COSD_FLAG_HUD; |
63 | } |
66 | } |
64 | } |
67 | } |
65 | EMCUCR |= (1<<ISC2); // next one is rising |
68 | EMCUCR |= (1<<ISC2); // next one is rising |
66 | } |
69 | } |
67 | //write_ndigit_number_u(2, 2, ppm, 1000, 0); // debug |
70 | //write_ndigit_number_u(2, 5, ppm, 1000, 0); // debug |
68 | //write_ndigit_number_u(2, 3, valid_ppm_to_go, 100, 0); // debug |
71 | //write_ndigit_number_u(2, 6, valid_ppm_to_go, 100, 0); // debug |
69 | //write_ndigit_number_u(2, 4, COSD_FLAGS, 100, 0); // debug |
72 | //write_ndigit_number_u(2, 7, COSD_FLAGS_CONFIG, 100, 0); // debug |
- | 73 | PORTC ^= (1 << PC3); |
|
- | 74 | uptime = ppm; |
|
70 | } |
75 | } |
Line 71... | Line 76... | ||
71 | 76 |