Merge pull request #1 from kaffeeknecht/kaffeeknecht-patch-1

Type changes
This commit is contained in:
kaffeeknecht 2020-03-03 12:56:06 +01:00 committed by GitHub
commit fd77205cf8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -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;
}

View file

@ -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;