Rev 1771 | Rev 1802 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1771 | Rev 1801 | ||
---|---|---|---|
Line 22... | Line 22... | ||
22 | #include <avr/io.h> |
22 | #include <avr/io.h> |
23 | #include <avr/eeprom.h> |
23 | #include <avr/eeprom.h> |
24 | #include <avr/pgmspace.h> |
24 | #include <avr/pgmspace.h> |
25 | #include <avr/interrupt.h> |
25 | #include <avr/interrupt.h> |
26 | #include <util/delay.h> |
26 | #include <util/delay.h> |
- | 27 | #include <string.h> |
|
27 | #include "max7456_software_spi.h" |
28 | #include "max7456_software_spi.h" |
28 | #include "config.h" |
29 | #include "config.h" |
29 | #include "buttons.h" |
30 | #include "buttons.h" |
30 | #include "usart1.h" |
31 | #include "usart1.h" |
31 | #include "osd_helpers.h" |
32 | #include "osd_helpers.h" |
Line 126... | Line 127... | ||
126 | usart1_EnableTXD(); |
127 | usart1_EnableTXD(); |
127 | usart1_puts_pgm(PSTR(REQUEST_UART_TO_FC)); |
128 | usart1_puts_pgm(PSTR(REQUEST_UART_TO_FC)); |
128 | usart1_DisableTXD(); |
129 | usart1_DisableTXD(); |
129 | #endif |
130 | #endif |
Line -... | Line 131... | ||
- | 131 | ||
Line -... | Line 132... | ||
- | 132 | paramset_serial setting; |
|
- | 133 | ||
130 | 134 | //#define NOFCOMMUNICATION |
|
- | 135 | #ifndef NOFCOMMUNICATION |
|
- | 136 | usart1_request_blocking('Q', PSTR(REQUEST_CURRENT_SETTING)); |
|
131 | 137 | memcpy((char*)(&setting), (char*)pRxData, sizeof(paramset_serial)); |
|
- | 138 | //setting = *((paramset_serial*)pRxData); |
|
- | 139 | #else |
|
- | 140 | // manual stuff? |
|
- | 141 | memcpy((char*)setting.param.Name, "NO FC COMMUN", 12); |
|
132 | usart1_request_blocking('Q', PSTR(REQUEST_CURRENT_SETTING)); |
142 | setting.param.UnterspannungsWarnung = 94; |
Line 133... | Line -... | ||
133 | - | ||
134 | //write_ascii_char(4 + 12 * 30, rxd_buffer[2]); |
- | |
- | 143 | #endif // #ifndef NOFCOMMUNICATION |
|
- | 144 | //write_ascii_char(4 + 12 * 30, rxd_buffer[2]); |
|
135 | 145 | ||
136 | paramset_serial setting; |
146 | |
Line 137... | Line 147... | ||
137 | setting = *((paramset_serial*)pRxData); |
147 | |
138 | write_ndigit_number_u(10, 7, setting.SettingsIndex, 1, 1); |
148 | write_ndigit_number_u(10, 7, setting.SettingsIndex, 1, 1); |
Line 180... | Line 190... | ||
180 | //usart1_request_mk_data(1, 'v', 0); |
190 | //usart1_request_mk_data(1, 'v', 0); |
181 | write_ascii_string_pgm(2, 11, PSTR("NC VERSION: ........")); |
191 | write_ascii_string_pgm(2, 11, PSTR("NC VERSION: ........")); |
182 | usart1_request_blocking('V', PSTR(REQUEST_NC_VERSION)); |
192 | usart1_request_blocking('V', PSTR(REQUEST_NC_VERSION)); |
183 | #endif |
193 | #endif |
184 | str_VersionInfo VersionInfo; |
194 | str_VersionInfo VersionInfo; |
185 | VersionInfo = *((str_VersionInfo*)pRxData); |
195 | //VersionInfo = *((str_VersionInfo*)pRxData); |
- | 196 | memcpy((char*)(&VersionInfo), (char*)pRxData, sizeof(str_VersionInfo)); |
|
Line 186... | Line 197... | ||
186 | 197 | ||
187 | write_ndigit_number_u(14, 11, VersionInfo.SWMajor, 3, 1); |
198 | write_ndigit_number_u(14, 11, VersionInfo.SWMajor, 3, 1); |
188 | write_ndigit_number_u(18, 11, VersionInfo.SWMinor, 3, 1); |
199 | write_ndigit_number_u(18, 11, VersionInfo.SWMinor, 3, 1); |
189 | write_ascii_char(22 + 11 * 30, 'a' + VersionInfo.SWPatch); |
200 | write_ascii_char(22 + 11 * 30, 'a' + VersionInfo.SWPatch); |