diff --git a/ArduPlane/Makefile b/ArduPlane/Makefile index 654fe55964..27ee7d4f69 100644 --- a/ArduPlane/Makefile +++ b/ArduPlane/Makefile @@ -44,10 +44,10 @@ etags: cd .. && etags -f ArduPlane/TAGS --langmap=C++:.pde.cpp.h $$(git ls-files ArduPlane libraries) obc: - make -f Makefile EXTRAFLAGS="-DCONFIG_APM_HARDWARE=APM_HARDWARE_APM2 -DOBC_FAILSAFE=ENABLED -DTELEMETRY_UART2=ENABLED" + make -f Makefile EXTRAFLAGS="-DCONFIG_APM_HARDWARE=APM_HARDWARE_APM2 -DOBC_FAILSAFE=ENABLED -DTELEMETRY_UART2=ENABLED -DSERIAL_BUFSIZE=512" obc-sitl: - make -f ../libraries/Desktop/Makefile.desktop EXTRAFLAGS="-DOBC_FAILSAFE=ENABLED" + make -f ../libraries/Desktop/Makefile.desktop EXTRAFLAGS="-DOBC_FAILSAFE=ENABLED -DSERIAL_BUFSIZE=512" sitl-newcontrollers: make -f ../libraries/Desktop/Makefile.desktop EXTRAFLAGS="-DAPM_CONTROL=ENABLED" diff --git a/ArduPlane/config.h b/ArduPlane/config.h index ecdaf2b532..98652489d9 100644 --- a/ArduPlane/config.h +++ b/ArduPlane/config.h @@ -849,3 +849,7 @@ #ifndef APM_CONTROL # define APM_CONTROL DISABLED #endif + +#ifndef SERIAL_BUFSIZE +# define SERIAL_BUFSIZE 256 +#endif diff --git a/ArduPlane/system.pde b/ArduPlane/system.pde index 5d2f80dcbd..12f3805674 100644 --- a/ArduPlane/system.pde +++ b/ArduPlane/system.pde @@ -81,7 +81,7 @@ static void init_ardupilot() // The console port buffers are defined to be sufficiently large to support // the MAVLink protocol efficiently // - Serial.begin(SERIAL0_BAUD, 128, 256); + Serial.begin(SERIAL0_BAUD, 128, SERIAL_BUFSIZE); // GPS serial port. // @@ -137,7 +137,7 @@ static void init_ardupilot() } #else // we have a 2nd serial port for telemetry - Serial3.begin(map_baudrate(g.serial3_baud, SERIAL3_BAUD), 128, 256); + Serial3.begin(map_baudrate(g.serial3_baud, SERIAL3_BAUD), 128, SERIAL_BUFSIZE); gcs3.init(&Serial3); #endif