Added a possible delay after connecting an Adalight device

Former-commit-id: 756fae2ebc57455bf6360dc96bf2ae5469460172
This commit is contained in:
johan
2014-05-04 11:31:13 +02:00
parent 8c1f14f8dc
commit 3eb29146dd
8 changed files with 37 additions and 14 deletions

View File

@@ -18,7 +18,7 @@ public:
/// @param[in] outputDevice The name of the output device (eg '/etc/ttyS0')
/// @param[in] baudrate The used baudrate for writing to the output device
///
LedRs232Device(const std::string& outputDevice, const unsigned baudrate);
LedRs232Device(const std::string& outputDevice, const unsigned baudrate, int delayAfterConnect_ms = 0);
///
/// Destructor of the LedDevice; closes the output device if it is open
@@ -45,9 +45,13 @@ protected:
private:
/// The name of the output device
const std::string mDeviceName;
const std::string _deviceName;
/// The used baudrate of the output device
const int mBaudRate_Hz;
const int _baudRate_Hz;
/// Sleep after the connect before continuing
const int _delayAfterConnect_ms;
/// The RS232 serial-device
serial::Serial _rs232Port;