harmonize blocking factor (#1709)
* harmonize blocking factor * static assert
This commit is contained in:
parent
494057f30d
commit
4e81b67ca3
|
@ -347,7 +347,7 @@
|
||||||
* buffers.
|
* buffers.
|
||||||
*/
|
*/
|
||||||
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
#define SERIAL_USB_BUFFERS_SIZE 256
|
#define SERIAL_USB_BUFFERS_SIZE 320
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -341,7 +341,7 @@
|
||||||
* buffers.
|
* buffers.
|
||||||
*/
|
*/
|
||||||
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
#define SERIAL_USB_BUFFERS_SIZE 256
|
#define SERIAL_USB_BUFFERS_SIZE 320
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -339,7 +339,7 @@
|
||||||
* buffers.
|
* buffers.
|
||||||
*/
|
*/
|
||||||
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
#define SERIAL_USB_BUFFERS_SIZE 256
|
#define SERIAL_USB_BUFFERS_SIZE 320
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -24,6 +24,8 @@ extern LoggingWithStorage tsLogger;
|
||||||
#include "usbconsole.h"
|
#include "usbconsole.h"
|
||||||
|
|
||||||
#if HAL_USE_SERIAL_USB
|
#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;
|
extern SerialUSBDriver SDU1;
|
||||||
#endif /* HAL_USE_SERIAL_USB */
|
#endif /* HAL_USE_SERIAL_USB */
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ struct_no_prefix engine_configuration_s
|
||||||
#define LE_COMMAND_LENGTH 200
|
#define LE_COMMAND_LENGTH 200
|
||||||
|
|
||||||
! see 'blockingFactor' in rusefi.ini
|
! see 'blockingFactor' in rusefi.ini
|
||||||
#define BLOCKING_FACTOR 400
|
#define BLOCKING_FACTOR 256
|
||||||
|
|
||||||
#define FSIO_ANALOG_INPUT_COUNT 4
|
#define FSIO_ANALOG_INPUT_COUNT 4
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ enable2ndByteCanID = false
|
||||||
|
|
||||||
; delayAfterPortOpen = 500
|
; delayAfterPortOpen = 500
|
||||||
|
|
||||||
blockingFactor = 256 ; max chunk size
|
blockingFactor = @@BLOCKING_FACTOR@@ ; max chunk size
|
||||||
;end communication settings
|
;end communication settings
|
||||||
|
|
||||||
; name = bits, type, offset, bits
|
; name = bits, type, offset, bits
|
||||||
|
|
Loading…
Reference in New Issue