Skip to content

Commit 4273ff7

Browse files
committed
within
1 parent c31d6d2 commit 4273ff7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Marlin/src/gcode/feature/adc/M3426.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void GcodeSuite::M3426() {
4141
address = parser.byteval('A', 3);
4242
const bool inverted = parser.byteval('I') == 1;
4343

44-
if (channel <= 2 && (gain == 1 || gain == 2 || gain == 4 || gain == 8) && (address >= 104 && address <= 111)) {
44+
if (channel <= 2 && (gain == 1 || gain == 2 || gain == 4 || gain == 8) && WITHIN(address, 104, 111)) {
4545
int16_t result = mcp3426.ReadValue(channel, gain, address);
4646

4747
if (mcp3426.Error == false) {

0 commit comments

Comments
 (0)