gps: wait for gps write buffer to empty before writing more

This commit is contained in:
Kemal Hadimli 2013-11-01 23:19:36 +02:00
parent 567e7f7cc8
commit 091c77592a
1 changed files with 5 additions and 0 deletions

View File

@ -117,6 +117,11 @@ void gpsInitHardware(void)
case GPS_UBLOX: case GPS_UBLOX:
// UBX will run at mcfg.baudrate, it shouldn't be "autodetected". So here we force it to that rate // UBX will run at mcfg.baudrate, it shouldn't be "autodetected". So here we force it to that rate
// Wait until GPS transmit buffer is empty
if (!isSerialTransmitBufferEmpty(core.gpsport))
break;
if (gpsData.state == GPS_INITIALIZING) { if (gpsData.state == GPS_INITIALIZING) {
gpsData.state_position++; gpsData.state_position++;
if (gpsData.state_position <= GPS_INIT_ENTRIES) { if (gpsData.state_position <= GPS_INIT_ENTRIES) {