Subversion Repositories Projects

Rev

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

Rev 474 Rev 489
Line 40... Line 40...
40
uint16_t EEMEM ee_cal_ampere = 512;
40
uint16_t EEMEM ee_cal_ampere = 512;
41
uint8_t EEMEM ee_sensor = 50;
41
uint8_t EEMEM ee_sensor = 50;
42
uint8_t EEMEM ee_COSD_FLAGS;
42
uint8_t EEMEM ee_COSD_FLAGS;
Line 43... Line 43...
43
 
43
 
44
// store init strings in progmem
44
// store init strings in progmem
45
char init_0[] PROGMEM = "C-OSD Initialisation";
45
const char init_0[] PROGMEM = "C-OSD Initialisation";
46
char init_1[] PROGMEM = "FC only Mode";
46
const char init_1[] PROGMEM = "FC only Mode";
47
char init_2[] PROGMEM = "NaviCtrl Mode";
47
const char init_2[] PROGMEM = "NaviCtrl Mode";
48
char init_3[] PROGMEM = "Guessing Number of Cells";
48
const char init_3[] PROGMEM = "Guessing Number of Cells";
49
char init_4[] PROGMEM = "Number of Cells:";
49
const char init_4[] PROGMEM = "Number of Cells:";
50
char init_5[] PROGMEM = "Warn Voltage   :";
50
const char init_5[] PROGMEM = "Warn Voltage   :";
51
char init_6[] PROGMEM = "Max Voltage    :";
51
const char init_6[] PROGMEM = "Max Voltage    :";
52
char* init_point[] PROGMEM = {init_0, init_1, init_2, init_3, init_4, init_5, init_6};
52
const char* init_point[] PROGMEM = {init_0, init_1, init_2, init_3, init_4, init_5, init_6};
53
 
53
 
54
char ee_message0[] PROGMEM = "Loading Data from EEPROM";
54
const char ee_message0[] PROGMEM = "Loading Data from EEPROM";
55
char ee_message1[] PROGMEM = "No saved Data in EEPROM";
55
const char ee_message1[] PROGMEM = "No saved Data in EEPROM";
Line 56... Line 56...
56
char* ee_msg[] PROGMEM = {ee_message0, ee_message1};
56
const char* ee_msg[] PROGMEM = {ee_message0, ee_message1};
57
 
57
 
58
// video modes
58
// video modes
Line 59... Line 59...
59
char VM_PAL[] PROGMEM = "PAL ";
59
const char VM_PAL[] PROGMEM = "PAL ";
60
char VM_NTSC[] PROGMEM = "NTSC";
60
const char VM_NTSC[] PROGMEM = "NTSC";
61
 
61
 
62
// menu strings to progmem
62
// menu strings to progmem
63
char menu_item0[] PROGMEM = "Video Mode";
63
const char menu_item0[] PROGMEM = "Video Mode";
64
char menu_item1[] PROGMEM = "Full HUD";
64
const char menu_item1[] PROGMEM = "Full HUD";
65
char menu_item2[] PROGMEM = "Art.Horizon in HUD";
65
const char menu_item2[] PROGMEM = "Art.Horizon in HUD";
66
char menu_item3[] PROGMEM = "Big Vario bar";
66
const char menu_item3[] PROGMEM = "Big Vario bar";
67
char menu_item4[] PROGMEM = "Statistics";
67
const char menu_item4[] PROGMEM = "Statistics";
68
char menu_item5[] PROGMEM = "Warnings"; // TODO: do it!
68
const char menu_item5[] PROGMEM = "Warnings"; // TODO: do it!
69
char menu_item6[] PROGMEM = "Reset uptime";
69
const char menu_item6[] PROGMEM = "Reset uptime";
70
char menu_item7[] PROGMEM = "Request OSD-data";
70
const char menu_item7[] PROGMEM = "Request OSD-data";
71
char menu_item8[] PROGMEM = "Disable Debug-data";
71
const char menu_item8[] PROGMEM = "Disable Debug-data";
72
char menu_item9[] PROGMEM = "Save config";
72
const char menu_item9[] PROGMEM = "Save config";
Line 73... Line 73...
73
char menu_item10[] PROGMEM = "EXIT";
73
const char menu_item10[] PROGMEM = "EXIT";
74
char* menu[] = {menu_item0, menu_item1, menu_item2, menu_item3, menu_item4,
74
const char* menu[] = {menu_item0, menu_item1, menu_item2, menu_item3, menu_item4,
75
        menu_item5, menu_item6, menu_item7, menu_item8, menu_item9, menu_item10};
75
        menu_item5, menu_item6, menu_item7, menu_item8, menu_item9, menu_item10};
Line 195... Line 195...
195
}
195
}
Line 196... Line 196...
196
 
196
 
197
/**
197
/**
198
 * some sort of clicking response in the menu
198
 * some sort of clicking response in the menu
199
 */
199
 */
200
void config_menu_doclick(uint8_t chosen, char** menu) {
200
void config_menu_doclick(uint8_t chosen, const char* menu[]) {
201
    write_ascii_string(4, chosen + 2, "DONE              ");
201
    write_ascii_string(4, chosen + 2, "DONE              ");
202
    _delay_ms(500);
202
    _delay_ms(500);
203
    write_ascii_string_pgm(4, chosen + 2, menu[chosen]);
203
    write_ascii_string_pgm(4, chosen + 2, menu[chosen]);