Skip to content

Commit

Permalink
Check the slave argument
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane committed Apr 22, 2011
1 parent 10a2311 commit d9b593c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Modbusino.cpp
Expand Up @@ -63,7 +63,9 @@ static uint16_t crc16(uint8_t *req, uint8_t req_length)
}

ModbusinoSlave::ModbusinoSlave(uint8_t slave) {
_slave = slave;
if (slave >= 0 & slave <= 247) {
_slave = slave;
}
}

void ModbusinoSlave::setup(long baud) {
Expand Down

0 comments on commit d9b593c

Please sign in to comment.