Subversion Repositories Projects

Rev

Rev 757 | Rev 761 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 757 Rev 758
Line 21... Line 21...
21
#include <avr/io.h>
21
#include <avr/io.h>
22
#include <avr/eeprom.h>
22
#include <avr/eeprom.h>
23
#include <avr/pgmspace.h>
23
#include <avr/pgmspace.h>
24
#include <avr/interrupt.h>
24
#include <avr/interrupt.h>
25
#include <util/delay.h>
25
#include <util/delay.h>
-
 
26
//#include <avr/delay.h>
26
#include "max7456_software_spi.h"
27
#include "max7456_software_spi.h"
27
#include "config.h"
28
#include "config.h"
28
#include "main.h"
29
#include "main.h"
29
#include "buttons.h"
30
#include "buttons.h"
30
#include "usart1.h"
31
#include "usart1.h"
Line 80... Line 81...
80
        eeprom_write_byte(&ee_COSD_FLAGS_MODES, COSD_FLAGS_MODES);
81
        eeprom_write_byte(&ee_COSD_FLAGS_MODES, COSD_FLAGS_MODES);
81
        eeprom_write_byte(&ee_COSD_FLAGS_CONFIG, COSD_FLAGS_CONFIG);
82
        eeprom_write_byte(&ee_COSD_FLAGS_CONFIG, COSD_FLAGS_CONFIG);
82
        eeprom_write_byte(&ee_COSD_DISPLAYMODE, COSD_DISPLAYMODE);
83
        eeprom_write_byte(&ee_COSD_DISPLAYMODE, COSD_DISPLAYMODE);
83
}
84
}
Line -... Line 85...
-
 
85
 
84
 
86
 
85
/**
87
/**
86
 * auto config some stuff on startup, currently only battery cells
88
 * auto config some stuff on startup, currently only battery cells
87
 */
89
 */
88
void init_cosd(uint8_t UBat) {
90
void init_cosd(uint8_t UBat) {
Line 162... Line 164...
162
        osd_ncmode = (int(*)(void)) pgm_read_word(&mode->dfun);
164
        osd_ncmode = (int(*)(void)) pgm_read_word(&mode->dfun);
163
        // re-request OSD Data from NC every 100ms
165
        // re-request OSD Data from NC every 100ms
164
        //usart1_request_mk_data(1, 'o', 100);
166
        //usart1_request_mk_data(1, 'o', 100);
165
        #endif
167
        #endif
Line 166... Line 168...
166
 
168
 
167
    _delay_ms(3000);
169
        _delay_ms(3000);
168
    clear();
170
    clear();
169
    // update flags to paint display again because of clear
171
    // update flags to paint display again because of clear
170
    COSD_FLAGS_RUNTIME &= ~COSD_ICONS_WRITTEN;
172
    COSD_FLAGS_RUNTIME &= ~COSD_ICONS_WRITTEN;