intercom: don't store start byte twice.
This commit is contained in:
parent
e6a137d5f1
commit
a3b1529607
|
|
@ -168,9 +168,8 @@ ISR(USART_RX_vect)
|
|||
packet_pointer = 1;
|
||||
intercom_flags |= FLAG_RX_IN_PROGRESS;
|
||||
}
|
||||
|
||||
else if (packet_pointer > 0) {
|
||||
// we're receiving a packet
|
||||
if (packet_pointer > 0) {
|
||||
// calculate CRC (except CRC character!)
|
||||
if (packet_pointer < (sizeof(intercom_packet_t) - 1))
|
||||
rxcrc ^= c;
|
||||
|
|
|
|||
|
|
@ -168,9 +168,8 @@ ISR(USART_RX_vect)
|
|||
packet_pointer = 1;
|
||||
intercom_flags |= FLAG_RX_IN_PROGRESS;
|
||||
}
|
||||
|
||||
else if (packet_pointer > 0) {
|
||||
// we're receiving a packet
|
||||
if (packet_pointer > 0) {
|
||||
// calculate CRC (except CRC character!)
|
||||
if (packet_pointer < (sizeof(intercom_packet_t) - 1))
|
||||
rxcrc ^= c;
|
||||
|
|
|
|||
Loading…
Reference in New Issue