intercom: Add delay before slave replies. Without it the first byte gets lost.

This commit is contained in:
Markus Amsler 2011-02-13 21:36:18 +01:00 committed by Michael Moon
parent a3b1529607
commit 959bae2f4a
2 changed files with 4 additions and 0 deletions

View File

@ -185,6 +185,8 @@ ISR(USART_RX_vect)
if (rx.packet.controller_num == THIS_CONTROLLER_NUM) {
if (rxcrc != rx.packet.crc)
tx.packet.err = ERROR_BAD_CRC;
// not sure why exactly this delay is needed, but wihtout it first byte never arrives.
delay_us(150);
start_send();
}
#endif

View File

@ -185,6 +185,8 @@ ISR(USART_RX_vect)
if (rx.packet.controller_num == THIS_CONTROLLER_NUM) {
if (rxcrc != rx.packet.crc)
tx.packet.err = ERROR_BAD_CRC;
// not sure why exactly this delay is needed, but wihtout it first byte never arrives.
delay_us(150);
start_send();
}
#endif