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
 
55
 
56
   #if ENABLED(EXTRA_LIN_ADVANCE_K)
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
     if (parser.seenval('S')) {
60
     if (parser.seenval('S')) {
61
       const bool slot = parser.value_bool();
61
       const bool slot = parser.value_bool();
62
       if (ext_slot != slot) {
62
       if (ext_slot != slot) {
63
         ext_slot = slot;
63
         ext_slot = slot;
64
-        bitWrite(lin_adv_slot, tmp_extruder, slot);
64
+        SET_BIT_TO(lin_adv_slot, tmp_extruder, slot);
65
         planner.synchronize();
65
         planner.synchronize();
66
         const float temp = planner.extruder_advance_K[tmp_extruder];
66
         const float temp = planner.extruder_advance_K[tmp_extruder];
67
         planner.extruder_advance_K[tmp_extruder] = saved_extruder_advance_K[tmp_extruder];
67
         planner.extruder_advance_K[tmp_extruder] = saved_extruder_advance_K[tmp_extruder];
103
         SERIAL_ECHOLNPAIR("(Slot ", 1 - ext_slot, " K", saved_extruder_advance_K[0], ")");
103
         SERIAL_ECHOLNPAIR("(Slot ", 1 - ext_slot, " K", saved_extruder_advance_K[0], ")");
104
       #else
104
       #else
105
         LOOP_L_N(i, EXTRUDERS) {
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
           SERIAL_ECHOLNPAIR("Advance T", int(i), " S", slot, " K", planner.extruder_advance_K[i]);
107
           SERIAL_ECHOLNPAIR("Advance T", int(i), " S", slot, " K", planner.extruder_advance_K[i]);
108
           SERIAL_ECHOLNPAIR("(Slot ", 1 - slot, " K", saved_extruder_advance_K[i], ")");
108
           SERIAL_ECHOLNPAIR("(Slot ", 1 - slot, " K", saved_extruder_advance_K[i], ")");
109
           SERIAL_EOL();
109
           SERIAL_EOL();

Loading…
Cancel
Save