1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

Merge branch 'blackbox-serial-budget' of https://github.com/sherlockflight/cleanflight-dev into sherlockflight-blackbox-serial-budget

Conflicts:
	src/main/blackbox/blackbox.c
This commit is contained in:
Dominic Clifton 2015-10-12 20:14:20 +01:00
commit a319394f6b
20 changed files with 364 additions and 94 deletions

View file

@ -360,7 +360,7 @@ void gpsThread(void)
{
// read out available GPS bytes
if (gpsPort) {
while (serialTotalBytesWaiting(gpsPort))
while (serialRxBytesWaiting(gpsPort))
gpsNewData(serialRead(gpsPort));
}
@ -1036,14 +1036,14 @@ void gpsEnablePassthrough(serialPort_t *gpsPassthroughPort)
#endif
char c;
while(1) {
if (serialTotalBytesWaiting(gpsPort)) {
if (serialRxBytesWaiting(gpsPort)) {
LED0_ON;
c = serialRead(gpsPort);
gpsNewData(c);
serialWrite(gpsPassthroughPort, c);
LED0_OFF;
}
if (serialTotalBytesWaiting(gpsPassthroughPort)) {
if (serialRxBytesWaiting(gpsPassthroughPort)) {
LED1_ON;
serialWrite(gpsPort, serialRead(gpsPassthroughPort));
LED1_OFF;