From 28e564738e1bc1b425dbe8b746b019983d653a29 Mon Sep 17 00:00:00 2001 From: John Tetreault Date: Sun, 10 Mar 2024 14:19:21 -0400 Subject: [PATCH] Added option to configure Serial Repeater baud rate so end user can set to 115,200 for high speed Nextion display --- Config.h | 3 +++ SerialPort.cpp | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Config.h b/Config.h index 0dea844..828e231 100644 --- a/Config.h +++ b/Config.h @@ -100,6 +100,9 @@ // Use the modem as a serial repeater for Nextion displays #define SERIAL_REPEATER +// Set the baud rate of the modem serial repeater for Nextion displays +#define SERIAL_REPEATER_BAUD_RATE 9600 + // Use the modem as an I2C repeater for OLED displays // #define I2C_REPEATER diff --git a/SerialPort.cpp b/SerialPort.cpp index e6a3454..755bc67 100644 --- a/SerialPort.cpp +++ b/SerialPort.cpp @@ -896,7 +896,11 @@ void CSerialPort::start() beginInt(1U, SERIAL_SPEED); #if defined(SERIAL_REPEATER) - beginInt(3U, 9600); + #if defined(SERIAL_REPEATER_BAUD_RATE) + beginInt(3U, SERIAL_REPEATER_BAUD_RATE); + #else + beginInt(3U, 9600); + #endif #endif #if defined(I2C_REPEATER) beginInt(10U, 9600);