PX4: use a minimum transmit buffer for UARTs of 512 bytes
this avoids writes stalling on the GPS port. We can't afford this memory on APM2, but we can on PX4, and it means that while the GPS is blocking at startup it doesn't cause any scheduler slips
This commit is contained in:
parent
2e75dd50be
commit
2340bb6220
@ -62,8 +62,11 @@ void PX4UARTDriver::begin(uint32_t b, uint16_t rxS, uint16_t txS)
|
|||||||
if (rxS == 0) {
|
if (rxS == 0) {
|
||||||
rxS = 128;
|
rxS = 128;
|
||||||
}
|
}
|
||||||
if (txS == 0) {
|
// on PX4 we have enough memory to have a larger transmit
|
||||||
txS = 128;
|
// buffer for all ports. This means we don't get delays while
|
||||||
|
// waiting to write GPS config packets
|
||||||
|
if (txS < 512) {
|
||||||
|
txS = 512;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user