harmonize blocking factor (#1709)

* harmonize blocking factor

* static assert
This commit is contained in:
Matthew Kennedy 2020-08-21 11:12:28 -07:00 committed by GitHub
parent 7fef82742f
commit 207aafe262
5 changed files with 6 additions and 4 deletions

View File

@ -341,7 +341,7 @@
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_SIZE 256
#define SERIAL_USB_BUFFERS_SIZE 320
#endif
/**

View File

@ -339,7 +339,7 @@
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_SIZE 256
#define SERIAL_USB_BUFFERS_SIZE 320
#endif
/**

View File

@ -24,6 +24,8 @@ extern LoggingWithStorage tsLogger;
#include "usbconsole.h"
#if HAL_USE_SERIAL_USB
// Assert that the USB tx/rx buffers are large enough to fit one full packet
static_assert(SERIAL_USB_BUFFERS_SIZE >= BLOCKING_FACTOR + 10);
extern SerialUSBDriver SDU1;
#endif /* HAL_USE_SERIAL_USB */

View File

@ -70,7 +70,7 @@ struct_no_prefix engine_configuration_s
#define LE_COMMAND_LENGTH 200
! see 'blockingFactor' in rusefi.ini
#define BLOCKING_FACTOR 400
#define BLOCKING_FACTOR 256
#define FSIO_ANALOG_INPUT_COUNT 4

View File

@ -65,7 +65,7 @@ enable2ndByteCanID = false
; delayAfterPortOpen = 500
blockingFactor = 256 ; max chunk size
blockingFactor = @@BLOCKING_FACTOR@@ ; max chunk size
;end communication settings
; name = bits, type, offset, bits