Merge pull request #6213 from thinkyhead/rc_gitattributes

Init bed_level_virt_interpolate on EEPROM load
This commit is contained in:
Scott Lahteine 2017-04-09 08:13:11 -05:00 committed by GitHub
commit 1a3cd6a090
3 changed files with 7 additions and 10 deletions

View File

@ -2615,6 +2615,8 @@ static void clean_up_after_endstop_or_probe_move() {
} }
void bed_level_virt_interpolate() { void bed_level_virt_interpolate() {
bilinear_grid_spacing_virt[X_AXIS] = bilinear_grid_spacing[X_AXIS] / (BILINEAR_SUBDIVISIONS);
bilinear_grid_spacing_virt[Y_AXIS] = bilinear_grid_spacing[Y_AXIS] / (BILINEAR_SUBDIVISIONS);
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
for (uint8_t ty = 0; ty < BILINEAR_SUBDIVISIONS; ty++) for (uint8_t ty = 0; ty < BILINEAR_SUBDIVISIONS; ty++)
@ -4268,11 +4270,6 @@ inline void gcode_G28() {
bilinear_start[X_AXIS] = RAW_X_POSITION(left_probe_bed_position); bilinear_start[X_AXIS] = RAW_X_POSITION(left_probe_bed_position);
bilinear_start[Y_AXIS] = RAW_Y_POSITION(front_probe_bed_position); bilinear_start[Y_AXIS] = RAW_Y_POSITION(front_probe_bed_position);
#if ENABLED(ABL_BILINEAR_SUBDIVISION)
bilinear_grid_spacing_virt[X_AXIS] = xGridSpacing / (BILINEAR_SUBDIVISIONS);
bilinear_grid_spacing_virt[Y_AXIS] = yGridSpacing / (BILINEAR_SUBDIVISIONS);
#endif
// Can't re-enable (on error) until the new grid is written // Can't re-enable (on error) until the new grid is written
abl_should_enable = false; abl_should_enable = false;
} }
@ -4478,7 +4475,7 @@ inline void gcode_G28() {
inInc = -1; inInc = -1;
} }
zig = !zig; // zag zig ^= true; // zag
// Inner loop is Y with PROBE_Y_FIRST enabled // Inner loop is Y with PROBE_Y_FIRST enabled
for (int8_t PR_INNER_VAR = inStart; PR_INNER_VAR != inStop; PR_INNER_VAR += inInc) { for (int8_t PR_INNER_VAR = inStart; PR_INNER_VAR != inStop; PR_INNER_VAR += inInc) {
@ -5802,7 +5799,7 @@ inline void gcode_M42() {
#if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(UBL_G26_MESH_EDITING) #if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(UBL_G26_MESH_EDITING)
inline void gcode_M49() { inline void gcode_M49() {
ubl.g26_debug_flag = !ubl.g26_debug_flag; ubl.g26_debug_flag ^= true;
SERIAL_PROTOCOLPGM("UBL Debug Flag turned "); SERIAL_PROTOCOLPGM("UBL Debug Flag turned ");
serialprintPGM(ubl.g26_debug_flag ? PSTR("on.") : PSTR("off.")); serialprintPGM(ubl.g26_debug_flag ? PSTR("on.") : PSTR("off."));
} }

View File

@ -1551,7 +1551,7 @@
inInc = -1; inInc = -1;
} }
zig = !zig; // zag zig ^= true; // zag
// Inner loop is Y with PROBE_Y_FIRST enabled // Inner loop is Y with PROBE_Y_FIRST enabled
for (PR_INNER_VAR = inStart; PR_INNER_VAR != inStop; PR_INNER_VAR += inInc) { for (PR_INNER_VAR = inStart; PR_INNER_VAR != inStop; PR_INNER_VAR += inInc) {

View File

@ -688,7 +688,7 @@ void kill_screen(const char* lcd_msg) {
extern void update_case_light(); extern void update_case_light();
void toggle_case_light() { void toggle_case_light() {
case_light_on = !case_light_on; case_light_on ^= true;
lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
update_case_light(); update_case_light();
} }
@ -3196,7 +3196,7 @@ void kill_screen(const char* lcd_msg) {
#endif //SDSUPPORT #endif //SDSUPPORT
void menu_action_setting_edit_bool(const char* pstr, bool* ptr) {UNUSED(pstr); *ptr = !(*ptr); lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; } void menu_action_setting_edit_bool(const char* pstr, bool* ptr) {UNUSED(pstr); *ptr ^= true; lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; }
void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, screenFunc_t callback) { void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, screenFunc_t callback) {
menu_action_setting_edit_bool(pstr, ptr); menu_action_setting_edit_bool(pstr, ptr);
(*callback)(); (*callback)();