Browse Source

Merge pull request #6213 from thinkyhead/rc_gitattributes

Init bed_level_virt_interpolate on EEPROM load
Scott Lahteine 7 years ago
parent
commit
1a3cd6a090
3 changed files with 7 additions and 10 deletions
  1. 4
    7
      Marlin/Marlin_main.cpp
  2. 1
    1
      Marlin/ubl_G29.cpp
  3. 2
    2
      Marlin/ultralcd.cpp

+ 4
- 7
Marlin/Marlin_main.cpp View File

2615
     }
2615
     }
2616
 
2616
 
2617
     void bed_level_virt_interpolate() {
2617
     void bed_level_virt_interpolate() {
2618
+      bilinear_grid_spacing_virt[X_AXIS] = bilinear_grid_spacing[X_AXIS] / (BILINEAR_SUBDIVISIONS);
2619
+      bilinear_grid_spacing_virt[Y_AXIS] = bilinear_grid_spacing[Y_AXIS] / (BILINEAR_SUBDIVISIONS);
2618
       for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
2620
       for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
2619
         for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
2621
         for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
2620
           for (uint8_t ty = 0; ty < BILINEAR_SUBDIVISIONS; ty++)
2622
           for (uint8_t ty = 0; ty < BILINEAR_SUBDIVISIONS; ty++)
4268
           bilinear_start[X_AXIS] = RAW_X_POSITION(left_probe_bed_position);
4270
           bilinear_start[X_AXIS] = RAW_X_POSITION(left_probe_bed_position);
4269
           bilinear_start[Y_AXIS] = RAW_Y_POSITION(front_probe_bed_position);
4271
           bilinear_start[Y_AXIS] = RAW_Y_POSITION(front_probe_bed_position);
4270
 
4272
 
4271
-          #if ENABLED(ABL_BILINEAR_SUBDIVISION)
4272
-            bilinear_grid_spacing_virt[X_AXIS] = xGridSpacing / (BILINEAR_SUBDIVISIONS);
4273
-            bilinear_grid_spacing_virt[Y_AXIS] = yGridSpacing / (BILINEAR_SUBDIVISIONS);
4274
-          #endif
4275
-
4276
           // Can't re-enable (on error) until the new grid is written
4273
           // Can't re-enable (on error) until the new grid is written
4277
           abl_should_enable = false;
4274
           abl_should_enable = false;
4278
         }
4275
         }
4478
             inInc = -1;
4475
             inInc = -1;
4479
           }
4476
           }
4480
 
4477
 
4481
-          zig = !zig; // zag
4478
+          zig ^= true; // zag
4482
 
4479
 
4483
           // Inner loop is Y with PROBE_Y_FIRST enabled
4480
           // Inner loop is Y with PROBE_Y_FIRST enabled
4484
           for (int8_t PR_INNER_VAR = inStart; PR_INNER_VAR != inStop; PR_INNER_VAR += inInc) {
4481
           for (int8_t PR_INNER_VAR = inStart; PR_INNER_VAR != inStop; PR_INNER_VAR += inInc) {
5802
 #if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(UBL_G26_MESH_EDITING)
5799
 #if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(UBL_G26_MESH_EDITING)
5803
 
5800
 
5804
   inline void gcode_M49() {
5801
   inline void gcode_M49() {
5805
-    ubl.g26_debug_flag = !ubl.g26_debug_flag;
5802
+    ubl.g26_debug_flag ^= true;
5806
     SERIAL_PROTOCOLPGM("UBL Debug Flag turned ");
5803
     SERIAL_PROTOCOLPGM("UBL Debug Flag turned ");
5807
     serialprintPGM(ubl.g26_debug_flag ? PSTR("on.") : PSTR("off."));
5804
     serialprintPGM(ubl.g26_debug_flag ? PSTR("on.") : PSTR("off."));
5808
   }
5805
   }

+ 1
- 1
Marlin/ubl_G29.cpp View File

1551
           inInc = -1;
1551
           inInc = -1;
1552
         }
1552
         }
1553
 
1553
 
1554
-        zig = !zig; // zag
1554
+        zig ^= true; // zag
1555
 
1555
 
1556
         // Inner loop is Y with PROBE_Y_FIRST enabled
1556
         // Inner loop is Y with PROBE_Y_FIRST enabled
1557
         for (PR_INNER_VAR = inStart; PR_INNER_VAR != inStop; PR_INNER_VAR += inInc) {
1557
         for (PR_INNER_VAR = inStart; PR_INNER_VAR != inStop; PR_INNER_VAR += inInc) {

+ 2
- 2
Marlin/ultralcd.cpp View File

688
     extern void update_case_light();
688
     extern void update_case_light();
689
 
689
 
690
     void toggle_case_light() {
690
     void toggle_case_light() {
691
-      case_light_on = !case_light_on;
691
+      case_light_on ^= true;
692
       lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
692
       lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
693
       update_case_light();
693
       update_case_light();
694
     }
694
     }
3196
 
3196
 
3197
   #endif //SDSUPPORT
3197
   #endif //SDSUPPORT
3198
 
3198
 
3199
-  void menu_action_setting_edit_bool(const char* pstr, bool* ptr) {UNUSED(pstr); *ptr = !(*ptr); lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; }
3199
+  void menu_action_setting_edit_bool(const char* pstr, bool* ptr) {UNUSED(pstr); *ptr ^= true; lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; }
3200
   void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, screenFunc_t callback) {
3200
   void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, screenFunc_t callback) {
3201
     menu_action_setting_edit_bool(pstr, ptr);
3201
     menu_action_setting_edit_bool(pstr, ptr);
3202
     (*callback)();
3202
     (*callback)();

Loading…
Cancel
Save