Skip to content

Commit 558a5ad

Browse files
authored
Merge pull request #579 from mathl79/main
increase default Serial_Link baud rate and make it configurable
2 parents 40c8304 + f85c9bc commit 558a5ad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Software/Software.ino

+4-1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ uint16_t mbPV[MB_RTU_NUM_VALUES]; // Process variable memory
8585
// Create a ModbusRTU server instance listening on Serial2 with 2000ms timeout
8686
ModbusServerRTU MBserver(Serial2, 2000);
8787
#endif
88+
#if defined(SERIAL_LINK_RECEIVER) || defined(SERIAL_LINK_TRANSMITTER)
89+
#define SERIAL_LINK_BAUDRATE 112500
90+
#endif
8891

8992
// Common charger parameters
9093
volatile float charger_setpoint_HV_VDC = 0.0f;
@@ -931,7 +934,7 @@ void runSerialDataLink() {
931934

932935
void init_serialDataLink() {
933936
#if defined(SERIAL_LINK_RECEIVER) || defined(SERIAL_LINK_TRANSMITTER)
934-
Serial2.begin(9600, SERIAL_8N1, RS485_RX_PIN, RS485_TX_PIN);
937+
Serial2.begin(SERIAL_LINK_BAUDRATE, SERIAL_8N1, RS485_RX_PIN, RS485_TX_PIN);
935938
#endif
936939
}
937940

0 commit comments

Comments
 (0)