Merge pull request #1 from kaffeeknecht/kaffeeknecht-patch-1
Type changes
This commit is contained in:
commit
fd77205cf8
2 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@ ZoomH6Remote::ZoomH6Remote(HardwareSerial* serial, Stream* debug, uint32_t timeo
|
|||
|
||||
/*This will write the data to the serial, and return the expected number of replys
|
||||
in case of failure the result is negative */
|
||||
int8_t ZoomH6Remote::writeWithReply(byte* data, size_t dataLength, byte* reply, size_t replyLength) {
|
||||
int8_t ZoomH6Remote::writeWithReply(const byte* data, size_t dataLength, byte* reply, size_t replyLength) {
|
||||
int8_t respCount = 0;
|
||||
|
||||
for (int i = 0; i < dataLength; ++i) {
|
||||
|
@ -108,7 +108,7 @@ bool ZoomH6Remote::sendCommand(byte primary, byte secondary, uint32_t gap, byte*
|
|||
|
||||
if (gap) delay(gap);
|
||||
|
||||
writeWithReply(releaseCom, 2, nullptr, 3);
|
||||
if (!writeWithReply(releaseCom, 2, nullptr, 3)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ class ZoomH6Remote {
|
|||
bool sendCommand(byte primary, byte secondary, uint32_t gap, byte* reply = nullptr);
|
||||
|
||||
private:
|
||||
int8_t writeWithReply(byte* data, size_t dataLength, byte* reply, size_t replyLength);
|
||||
int8_t writeWithReply(const byte* data, size_t dataLength, byte* reply, size_t replyLength);
|
||||
void printStatus(byte& high, byte& low);
|
||||
|
||||
Stream* _debug;
|
||||
|
|
Loading…
Reference in a new issue