Increase MMU2 serial buffer size with USB serial (#15646)

This commit is contained in:
Timm 2019-10-24 19:28:41 +02:00 committed by Scott Lahteine
parent 0f5d457252
commit e02b06672c
2 changed files with 10 additions and 2 deletions

View File

@ -97,7 +97,7 @@ volatile int8_t MMU2::finda = 1;
volatile bool MMU2::finda_runout_valid;
int16_t MMU2::version = -1, MMU2::buildnr = -1;
millis_t MMU2::last_request, MMU2::next_P0_request;
char MMU2::rx_buffer[16], MMU2::tx_buffer[16];
char MMU2::rx_buffer[MMU_RX_SIZE], MMU2::tx_buffer[MMU_TX_SIZE];
#if HAS_LCD_MENU && ENABLED(MMU2_MENUS)

View File

@ -27,6 +27,14 @@
#include "../runout.h"
#endif
#if SERIAL_USB
#define MMU_RX_SIZE 256
#define MMU_TX_SIZE 256
#else
#define MMU_RX_SIZE 16
#define MMU_TX_SIZE 16
#endif
struct E_Step;
class MMU2 {
@ -79,7 +87,7 @@ private:
static volatile bool finda_runout_valid;
static int16_t version, buildnr;
static millis_t last_request, next_P0_request;
static char rx_buffer[16], tx_buffer[16];
static char rx_buffer[MMU_RX_SIZE], tx_buffer[MMU_TX_SIZE];
static inline void set_runout_valid(const bool valid) {
finda_runout_valid = valid;