From 9867ecd3f90d53a1d1f6b32f9f6937d89590fa85 Mon Sep 17 00:00:00 2001 From: espr14 Date: Wed, 13 Jan 2021 13:59:20 +0100 Subject: [PATCH] Reduce unnecessary code --- Firmware/xyzcal.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/Firmware/xyzcal.cpp b/Firmware/xyzcal.cpp index c6880489..973efb36 100644 --- a/Firmware/xyzcal.cpp +++ b/Firmware/xyzcal.cpp @@ -689,25 +689,6 @@ uint8_t xyzcal_find_pattern_12x12_in_32x32(uint8_t* pixels, uint16_t* pattern, u return max_match; } -uint8_t xyzcal_xycoords2point(int16_t x, int16_t y) -{ - uint8_t ix = (x > 10000)?1:0; - uint8_t iy = (y > 10000)?1:0; - return iy?(3-ix):ix; -} - -//MK3 -#if ((MOTHERBOARD == BOARD_EINSY_1_0a)) -const int16_t xyzcal_point_xcoords[4] PROGMEM = {1200, 22000, 22000, 1200}; -const int16_t xyzcal_point_ycoords[4] PROGMEM = {600, 600, 19800, 19800}; -#endif //((MOTHERBOARD == BOARD_EINSY_1_0a)) - -//MK2.5 -#if ((MOTHERBOARD == BOARD_RAMBO_MINI_1_0) || (MOTHERBOARD == BOARD_RAMBO_MINI_1_3)) -const int16_t xyzcal_point_xcoords[4] PROGMEM = {1200, 22000, 22000, 1200}; -const int16_t xyzcal_point_ycoords[4] PROGMEM = {700, 700, 19800, 19800}; -#endif //((MOTHERBOARD == BOARD_RAMBO_MINI_1_0) || (MOTHERBOARD == BOARD_RAMBO_MINI_1_3)) - const uint16_t xyzcal_point_pattern_10[12] PROGMEM = {0x000, 0x0f0, 0x1f8, 0x3fc, 0x7fe, 0x7fe, 0x7fe, 0x7fe, 0x3fc, 0x1f8, 0x0f0, 0x000}; const uint16_t xyzcal_point_pattern_08[12] PROGMEM = {0x000, 0x000, 0x0f0, 0x1f8, 0x3fc, 0x3fc, 0x3fc, 0x3fc, 0x1f8, 0x0f0, 0x000, 0x000}; @@ -972,13 +953,7 @@ bool xyzcal_find_bed_induction_sensor_point_xy(void){ pos_i16_t y = _Y; pos_i16_t z = _Z; - uint8_t point = xyzcal_xycoords2point(x, y); - x = pgm_read_word((uint16_t *)(xyzcal_point_xcoords + point)); - y = pgm_read_word((uint16_t *)(xyzcal_point_ycoords + point)); - DBG(_n("point=%d x=%d y=%d z=%d\n"), point, x, y, z); xyzcal_meassure_enter(); - xyzcal_lineXYZ_to(x, y, z, 200, 0); - if (xyzcal_searchZ()){ xyzcal_lineXYZ_to(x, y, _Z, 200, 0); ret = xyzcal_scan_and_process();