We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5fab4db commit 150d485Copy full SHA for 150d485
src/DMXSerial2.cpp
@@ -403,8 +403,8 @@ void DMXSerialClass2::getDeviceID (DEVICEID id) {
403
uint8_t DMXSerialClass2::readRelative(unsigned int channel)
404
{
405
uint8_t val = 0;
406
- if ((channel >= 0) && (channel < _initData->footprint)) {
407
- // in range !
+ if (channel < _initData->footprint) {
+ // channel is in a valid range! (channel >= 0) is assumed by (unsigned int) type.
408
val = _dmxData[_startAddress + channel];
409
} // if
410
return(val);
0 commit comments