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 494057f30d
commit 4e81b67ca3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 5 deletions

View File

@ -347,7 +347,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

@ -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