Skip to content

Commit

Permalink
Double VE.Direct receive buffer to avoid overflow (#1109)
Browse files Browse the repository at this point in the history
  • Loading branch information
SW-Niko authored Jul 16, 2024
1 parent 926a0b9 commit 0013b2c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/VeDirectFrameHandler/VeDirectFrameHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ void VeDirectFrameHandler<T>::init(char const* who, int8_t rx, int8_t tx,
Print* msgOut, bool verboseLogging, uint8_t hwSerialPort)
{
_vedirectSerial = std::make_unique<HardwareSerial>(hwSerialPort);
_vedirectSerial->setRxBufferSize(512); // increased from default (256) to 512 Byte to avoid overflow
_vedirectSerial->end(); // make sure the UART will be re-initialized
_vedirectSerial->begin(19200, SERIAL_8N1, rx, tx);
_vedirectSerial->flush();
Expand Down

0 comments on commit 0013b2c

Please sign in to comment.