89,17 → 89,16 |
s++; |
} |
}*/ |
|
|
/** |
* send a PGM<string> throught usart1 |
*/ |
void usart1_puts_pgm(const char* string) { |
while (pgm_read_byte(string) != 0x00) |
usart1_putc(pgm_read_byte(string++)); |
} |
|
/** |
* send a PGM<string> throught usart1 |
*/ |
void usart1_puts_pgm(const char* string) { |
while (pgm_read_byte(string) != 0x00) |
usart1_putc(pgm_read_byte(string++)); |
} |
|
/** |
* transmit interrupt handler |
* unused |
*/ |
123,26 → 122,27 |
static uint8_t usart_rx_ok = 0; |
uint8_t crc1, crc2; |
// the rxd buffer is unlocked |
if (usart_rx_ok == 0) { |
// if ((c2 == '#') && (c1 == 'b' || c1 == 'c') && (c == 'D' || c == 'V' || c == 'O')) { |
if ((c2 == '#') && (c1 == 'b' || c1 == 'c') && |
#if FCONLY |
(c == 'V' || c == 'D')) { // version and debug |
#else |
(c == 'V' || c == 'O')) { // version and OSD |
#endif |
usart_rx_ok = 1; |
rxd_buffer[ptr_rxd_buffer++] = c2; |
crc = c2; |
rxd_buffer[ptr_rxd_buffer++] = c1; |
crc += c1; |
rxd_buffer[ptr_rxd_buffer++] = c; |
crc += c; |
c2 = 0; |
c1 = 0; |
LED1_ON |
LED2_OFF |
} else { |
if (usart_rx_ok == 0) { |
// if ((c2 == '#') && (c1 == 'b' || c1 == 'c') && (c == 'D' || c == 'V' || c == 'O')) { |
|
if ((c2 == '#') && (c1 == 'b' || c1 == 'c') && |
#if FCONLY |
(c == 'V' || c == 'D')) { // version and debug |
#else |
(c == 'V' || c == 'O')) { // version and OSD |
#endif |
usart_rx_ok = 1; |
rxd_buffer[ptr_rxd_buffer++] = c2; |
crc = c2; |
rxd_buffer[ptr_rxd_buffer++] = c1; |
crc += c1; |
rxd_buffer[ptr_rxd_buffer++] = c; |
crc += c; |
c2 = 0; |
c1 = 0; |
LED1_ON |
LED2_OFF |
} else { |
c2 = c1; |
c1 = c; |
} |