Browse Source

Fix bool++ warning

Scott Lahteine 4 years ago
parent
commit
d4ab2024f5
1 changed files with 2 additions and 3 deletions
  1. 2
    3
      Marlin/src/feature/encoder_i2c.cpp

+ 2
- 3
Marlin/src/feature/encoder_i2c.cpp View File

@@ -47,7 +47,7 @@ void I2CPositionEncoder::init(const uint8_t address, const AxisEnum axis) {
47 47
   encoderAxis = axis;
48 48
   i2cAddress = address;
49 49
 
50
-  initialized++;
50
+  initialized = true;
51 51
 
52 52
   SERIAL_ECHOLNPAIR("Setting up encoder on ", AS_CHAR(axis_codes[encoderAxis]), " axis, addr = ", address);
53 53
 
@@ -209,8 +209,7 @@ void I2CPositionEncoder::set_homed() {
209 209
     delay(10);
210 210
 
211 211
     zeroOffset = get_raw_count();
212
-    homed++;
213
-    trusted++;
212
+    homed = trusted = true;
214 213
 
215 214
     #ifdef I2CPE_DEBUG
216 215
       SERIAL_CHAR(axis_codes[encoderAxis]);

Loading…
Cancel
Save