Added functionality to set blocking behavior of write

This commit is contained in:
EricLiu2000
2019-07-24 14:57:06 -04:00
parent 69b7e5b45a
commit 8c186f00cd
5 changed files with 28 additions and 0 deletions
@@ -38,6 +38,8 @@ public:
bool rawWrite(const std::vector<uint8_t>& bytes) { return impl->write(bytes); }
virtual bool sendPacket(std::vector<uint8_t>& bytes);
void setWriteBlocks(bool blocks) { impl->writeBlocks = blocks; }
virtual bool sendCommand(Command cmd, bool boolean) { return sendCommand(cmd, std::vector<uint8_t>({ (uint8_t)boolean })); }
virtual bool sendCommand(Command cmd, std::vector<uint8_t> arguments = {});
bool getSettingsSync(std::vector<uint8_t>& data, std::chrono::milliseconds timeout = std::chrono::milliseconds(50));