Set timeout according to parameter

This commit is contained in:
GHOSCHT 2022-02-05 21:04:30 +01:00
parent 10d4d42c7e
commit 22c93557fd
No known key found for this signature in database
GPG key ID: A35BD466B8871994
2 changed files with 2 additions and 0 deletions

View file

@ -4,4 +4,5 @@
I2CCommunicator::I2CCommunicator(TwoWire &w_out, int slaveAddr, int timeout, __SIZE_TYPE__ bufferSize) : StreamCommunicator(w_out, bufferSize) I2CCommunicator::I2CCommunicator(TwoWire &w_out, int slaveAddr, int timeout, __SIZE_TYPE__ bufferSize) : StreamCommunicator(w_out, bufferSize)
{ {
w_out.begin(slaveAddr); w_out.begin(slaveAddr);
w_out.setTimeout(timeout);
} }

View file

@ -4,4 +4,5 @@
SerialCommunicator::SerialCommunicator(HardwareSerial &p_out, int baudRate, int timeout, __SIZE_TYPE__ bufferSize) : StreamCommunicator(p_out, bufferSize) SerialCommunicator::SerialCommunicator(HardwareSerial &p_out, int baudRate, int timeout, __SIZE_TYPE__ bufferSize) : StreamCommunicator(p_out, bufferSize)
{ {
p_out.begin(baudRate); p_out.begin(baudRate);
p_out.setTimeout(timeout);
} }