RizkiWahyupratama / ardupilot-mega

Automatically exported from code.google.com/p/ardupilot-mega
0 stars 0 forks source link

FastSerial flush bug #423

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
void FastSerial::flush(void)
{
//....
    _rxBuffer->head = _rxBuffer->tail;

// don't reverse this or there may be problems if the TX interrupt
// occurs after reading the value of _txBuffer->tail but before writing
// the value to _txBuffer->head.
    _txBuffer->tail = _rxBuffer->head;

}

Shouldn't the last line be:

    _txBuffer->tail = _txBuffer->head;

Original issue reported on code.google.com by greg.nas...@gmail.com on 26 Sep 2011 at 3:31

GoogleCodeExporter commented 9 years ago

Original comment by Meee...@gmail.com on 27 Sep 2011 at 1:53

GoogleCodeExporter commented 9 years ago
Absolutely; thanks for pointing this out (sorry that your report got lost in 
the pile of noise that is Gmail!).

Fixed in 1a9b51f

Original comment by DrZip...@gmail.com on 26 Dec 2011 at 11:54