Rev 526 | Rev 677 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 526 | Rev 528 | ||
---|---|---|---|
Line 79... | Line 79... | ||
79 | // battery voltages |
79 | // battery voltages |
80 | uint8_t min_voltage = 0; |
80 | uint8_t min_voltage = 0; |
81 | uint8_t max_voltage = 0; |
81 | uint8_t max_voltage = 0; |
Line 82... | Line 82... | ||
82 | 82 | ||
83 | // Flags |
83 | // Flags |
Line 84... | Line 84... | ||
84 | uint8_t COSD_FLAGS = 0, COSD_FLAGS2 = 0; |
84 | uint8_t COSD_FLAGS_MODES = 0, COSD_FLAGS_CONFIG = 0, COSD_FLAGS_RUNTIME = 0, COSD_DISPLAYMODE = 0; |
Line 85... | Line 85... | ||
85 | 85 | ||
86 | #if !(ALLCHARSDEBUG|(WRITECHARS != -1)) |
86 | #if !(ALLCHARSDEBUG|(WRITECHARS != -1)) |
Line 257... | Line 257... | ||
257 | // read out config for NTSC/PAL distinguishing |
257 | // read out config for NTSC/PAL distinguishing |
258 | get_eeprom(0); |
258 | get_eeprom(0); |
259 | #endif |
259 | #endif |
Line 260... | Line 260... | ||
260 | 260 | ||
261 | // Setup Video Mode |
261 | // Setup Video Mode |
262 | if (COSD_FLAGS & COSD_FLAG_NTSC) { |
262 | if (COSD_FLAGS_CONFIG & COSD_FLAG_NTSC) { |
263 | // NTSC + enable display immediately (VM0) |
263 | // NTSC + enable display immediately (VM0) |
Line 264... | Line 264... | ||
264 | spi_send_byte(0x00, 0b00001000); |
264 | spi_send_byte(0x00, 0b00001000); |
265 | 265 | ||
Line 349... | Line 349... | ||
349 | ampere = SPI_buffer.data.ampere; |
349 | ampere = SPI_buffer.data.ampere; |
350 | ampere_wasted = SPI_buffer.data.mah; |
350 | ampere_wasted = SPI_buffer.data.mah; |
351 | s_volt = SPI_buffer.data.volt; |
351 | s_volt = SPI_buffer.data.volt; |
Line 352... | Line 352... | ||
352 | 352 | ||
353 | // if this is the first receival we should print the small A |
353 | // if this is the first receival we should print the small A |
354 | if (!(COSD_FLAGS2 & COSD_FLAG_STROMREC)) { |
354 | if (!(COSD_FLAGS_RUNTIME & COSD_FLAG_STROMREC)) { |
355 | clear(); |
355 | clear(); |
356 | COSD_FLAGS2 &= ~COSD_ICONS_WRITTEN; |
356 | COSD_FLAGS_RUNTIME &= ~COSD_ICONS_WRITTEN; |
357 | // update this flag |
357 | // update this flag |
358 | COSD_FLAGS2 |= COSD_FLAG_STROMREC; |
358 | COSD_FLAGS_RUNTIME |= COSD_FLAG_STROMREC; |
359 | } |
359 | } |
360 | } else { |
360 | } else { |
361 | // update flags |
361 | // update flags |
362 | COSD_FLAGS2 &= ~COSD_FLAG_STROMREC; |
362 | COSD_FLAGS_RUNTIME &= ~COSD_FLAG_STROMREC; |
363 | } |
363 | } |
364 | StartTransfer(9); |
364 | StartTransfer(9); |
365 | } |
365 | } |
366 | if (rxd_buffer_locked) { |
366 | if (rxd_buffer_locked) { |