Browse Source

Update EXTRA_LINADV_K with Marlin bit macros (#13993)

Sam Lane 6 years ago
parent
commit
7f1e0c5670
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Marlin/src/gcode/feature/advance/M900.cpp

+ 3
- 3
Marlin/src/gcode/feature/advance/M900.cpp View File

@@ -55,13 +55,13 @@ void GcodeSuite::M900() {
55 55
 
56 56
   #if ENABLED(EXTRA_LIN_ADVANCE_K)
57 57
 
58
-    bool ext_slot = bitRead(lin_adv_slot, tmp_extruder);
58
+    bool ext_slot = TEST(lin_adv_slot, tmp_extruder);
59 59
 
60 60
     if (parser.seenval('S')) {
61 61
       const bool slot = parser.value_bool();
62 62
       if (ext_slot != slot) {
63 63
         ext_slot = slot;
64
-        bitWrite(lin_adv_slot, tmp_extruder, slot);
64
+        SET_BIT_TO(lin_adv_slot, tmp_extruder, slot);
65 65
         planner.synchronize();
66 66
         const float temp = planner.extruder_advance_K[tmp_extruder];
67 67
         planner.extruder_advance_K[tmp_extruder] = saved_extruder_advance_K[tmp_extruder];
@@ -103,7 +103,7 @@ void GcodeSuite::M900() {
103 103
         SERIAL_ECHOLNPAIR("(Slot ", 1 - ext_slot, " K", saved_extruder_advance_K[0], ")");
104 104
       #else
105 105
         LOOP_L_N(i, EXTRUDERS) {
106
-          const int slot = (int)bitRead(lin_adv_slot, i);
106
+          const int slot = (int)TEST(lin_adv_slot, i);
107 107
           SERIAL_ECHOLNPAIR("Advance T", int(i), " S", slot, " K", planner.extruder_advance_K[i]);
108 108
           SERIAL_ECHOLNPAIR("(Slot ", 1 - slot, " K", saved_extruder_advance_K[i], ")");
109 109
           SERIAL_EOL();

Loading…
Cancel
Save