diff --git a/include/serial.h b/include/serial.h index 1f76971..050c8e4 100644 --- a/include/serial.h +++ b/include/serial.h @@ -83,6 +83,12 @@ class Serial { bool IsOpen() { return ser.isDeviceOpen(); } + template + bool OpenDeviceDelay(T portName, unsigned int baudRate, int delay){ + std::this_thread::sleep_for(std::chrono::seconds(delay)); + return OpenDevice(portName, baudRate); + } + template bool OpenDevice(T portName, unsigned int bauds = 115200) { std::string reallyPortName;