Rev 737 | Rev 757 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 737 | Rev 738 | ||
---|---|---|---|
Line 122... | Line 122... | ||
122 | write_ascii_string_pgm(23, 2, VM_PAL); |
122 | write_ascii_string_pgm(23, 2, VM_PAL); |
123 | } |
123 | } |
Line 124... | Line 124... | ||
124 | 124 | ||
125 | // request version from board |
125 | // request version from board |
- | 126 | rxd_buffer_locked = 0; |
|
126 | rxd_buffer_locked = 0; |
127 | usart1_EnableTXD(); |
127 | #if FCONLY |
128 | #if FCONLY |
128 | usart1_request_mk_data(0, 'v', 0); |
129 | //usart1_request_mk_data(0, 'v', 0); |
- | 130 | write_ascii_string_pgm(2, 11, PSTR("FC VERSION: ........")); |
|
129 | write_ascii_string_pgm(2, 11, PSTR("FC VERSION: ........")); |
131 | usart1_puts_pgm(PSTR(REQUEST_FC_VERSION)); |
130 | #else |
132 | #else |
- | 133 | //usart1_request_mk_data(1, 'v', 0); |
|
131 | usart1_request_mk_data(1, 'v', 0); |
134 | usart1_puts_pgm(PSTR(REQUEST_NC_VERSION)); |
132 | write_ascii_string_pgm(2, 11, PSTR("NC VERSION: ........")); |
135 | write_ascii_string_pgm(2, 11, PSTR("NC VERSION: ........")); |
- | 136 | #endif |
|
133 | #endif |
137 | usart1_DisableTXD(); |
134 | // wait for response |
138 | // wait for response |
135 | while (rxd_buffer_locked == 0) { |
139 | while (rxd_buffer_locked == 0) { |
136 | asm("nop"); |
140 | asm("nop"); |
137 | } |
141 | } |
Line 149... | Line 153... | ||
149 | COSD_DISPLAYMODE %= (sizeof(fcdisplaymodes) / sizeof(displaymode_t)); |
153 | COSD_DISPLAYMODE %= (sizeof(fcdisplaymodes) / sizeof(displaymode_t)); |
150 | mode = fcdisplaymodes; |
154 | mode = fcdisplaymodes; |
151 | mode += COSD_DISPLAYMODE; |
155 | mode += COSD_DISPLAYMODE; |
152 | osd_fcmode = (int(*)(void)) pgm_read_word(&mode->dfun); |
156 | osd_fcmode = (int(*)(void)) pgm_read_word(&mode->dfun); |
153 | // re-request data ever 100ms from FC; |
157 | // re-request data ever 100ms from FC; |
154 | usart1_request_mk_data(0, 'd', 100); |
158 | //usart1_request_mk_data(0, 'd', 100); |
155 | #else |
159 | #else |
156 | COSD_DISPLAYMODE %= (sizeof(ncdisplaymodes) / sizeof(displaymode_t)); |
160 | COSD_DISPLAYMODE %= (sizeof(ncdisplaymodes) / sizeof(displaymode_t)); |
157 | mode = ncdisplaymodes; |
161 | mode = ncdisplaymodes; |
158 | mode += COSD_DISPLAYMODE; |
162 | mode += COSD_DISPLAYMODE; |
159 | osd_ncmode = (int(*)(void)) pgm_read_word(&mode->dfun); |
163 | osd_ncmode = (int(*)(void)) pgm_read_word(&mode->dfun); |
160 | // re-request OSD Data from NC every 100ms |
164 | // re-request OSD Data from NC every 100ms |
161 | usart1_request_mk_data(1, 'o', 100); |
165 | //usart1_request_mk_data(1, 'o', 100); |
162 | #endif |
166 | #endif |
Line 163... | Line 167... | ||
163 | 167 | ||
164 | _delay_ms(3000); |
168 | _delay_ms(3000); |
165 | clear(); |
169 | clear(); |