VictronVEDirectArduino icon indicating copy to clipboard operation
VictronVEDirectArduino copied to clipboard

Why is VEserial.begin() called within the read() function?

Open Hyperdimensionals opened this issue 11 months ago • 1 comments

Hello,

I'm curious why the VESerial.begin() function is called within the VEdirect.read() function. My understanding is that serial.begin() is typically called once when initially establishing the serial connection. Does this make it more resilient if the serial port gets temporarily disconnected?

I also noticed that in the VEDirect::begin() function, VESerial.begin() is called with the Baud rate hard-coded (VESerial.begin(19200), while in the VEDirect::read() function, it's called with the macro constant (VESerial.begin(VED_BAUD_RATE)).

Hyperdimensionals avatar Feb 28 '25 07:02 Hyperdimensionals