We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c31d6d2 commit 4273ff7Copy full SHA for 4273ff7
1 file changed
Marlin/src/gcode/feature/adc/M3426.cpp
@@ -41,7 +41,7 @@ void GcodeSuite::M3426() {
41
address = parser.byteval('A', 3);
42
const bool inverted = parser.byteval('I') == 1;
43
44
- if (channel <= 2 && (gain == 1 || gain == 2 || gain == 4 || gain == 8) && (address >= 104 && address <= 111)) {
+ if (channel <= 2 && (gain == 1 || gain == 2 || gain == 4 || gain == 8) && WITHIN(address, 104, 111)) {
45
int16_t result = mcp3426.ReadValue(channel, gain, address);
46
47
if (mcp3426.Error == false) {
0 commit comments