From d4ab2024f50152f06223c3ab63a7a93b95b4b887 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 18 Mar 2021 15:59:48 -0500 Subject: [PATCH] Fix bool++ warning --- Marlin/src/feature/encoder_i2c.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Marlin/src/feature/encoder_i2c.cpp b/Marlin/src/feature/encoder_i2c.cpp index cf5ebfd01..abaa93f76 100644 --- a/Marlin/src/feature/encoder_i2c.cpp +++ b/Marlin/src/feature/encoder_i2c.cpp @@ -47,7 +47,7 @@ void I2CPositionEncoder::init(const uint8_t address, const AxisEnum axis) { encoderAxis = axis; i2cAddress = address; - initialized++; + initialized = true; SERIAL_ECHOLNPAIR("Setting up encoder on ", AS_CHAR(axis_codes[encoderAxis]), " axis, addr = ", address); @@ -209,8 +209,7 @@ void I2CPositionEncoder::set_homed() { delay(10); zeroOffset = get_raw_count(); - homed++; - trusted++; + homed = trusted = true; #ifdef I2CPE_DEBUG SERIAL_CHAR(axis_codes[encoderAxis]);