AP_HAL_VRBRAIN: fix resetting TX buffer
We can't give the TX buffer 16 bytes more since next time begin() is called it will compare the buffer size to the value the caller is trying to set. In this case we would free and alloc the buffer again each time begin was called.
This commit is contained in:
parent
e8bfcf02a0
commit
68fc08fe52
@ -90,7 +90,7 @@ void VRBRAINUARTDriver::begin(uint32_t b, uint16_t rxS, uint16_t txS)
|
||||
while (_in_timer) {
|
||||
hal.scheduler->delay(1);
|
||||
}
|
||||
_writebuf.set_size(txS+16);
|
||||
_writebuf.set_size(txS);
|
||||
}
|
||||
|
||||
if (_fd == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user