/// find Y MAX endstop void home_y_positive() { queue_wait(); #if defined Y_MAX_PIN uint8_t denoise_count = 0; // home Y y_enable(); // hit home hard y_direction(1); while (denoise_count < 8) { // denoise if (y_max()) denoise_count++; else denoise_count = 0; // step y_step(); delay(5); unstep(); // wait until neyt step time delay((uint32_t) (60.0 * 1000000.0 / STEPS_PER_MM_Y / ((float) MAXIMUM_FEEDRATE_Y))); } denoise_count = 0; // back off slowly y_direction(0); while (y_max() != 0) { // step y_step(); delay(5); unstep(); // wait until next step time delay((uint32_t) (60.0 * 1000000.0 / STEPS_PER_MM_Y / ((float) SEARCH_FEEDRATE_Y))); } // set Y home TARGET t = {0, 0, 0, 0, 0}; // set position to MAX startpoint.Y = current_position.Y = (int32_t) (Y_MAX * STEPS_PER_MM_Y); // go to zero t.F = MAXIMUM_FEEDRATE_Y; enqueue(&t); #endif }
/// fund Y MIN endstop void home_y_negative() { queue_wait(); #if defined Y_MIN_PIN uint8_t denoise_count = 0; // home Y y_enable(); // hit home hard y_direction(0); while (denoise_count < 8) { // denoise if (y_min()) denoise_count++; else denoise_count = 0; // step y_step(); delay(5); unstep(); // wait until neyt step time delay((uint32_t) (60.0 * 1000000.0 / STEPS_PER_MM_Y / ((float) MAXIMUM_FEEDRATE_Y))); } denoise_count = 0; // back off slowly y_direction(1); while (y_min() != 0) { // step y_step(); delay(5); unstep(); // wait until next step time delay((uint32_t) (60.0 * 1000000.0 / STEPS_PER_MM_Y / ((float) SEARCH_FEEDRATE_Y))); } // set Y home startpoint.Y = current_position.Y = 0; #endif }
void defiSite::print(FILE* f) const { fprintf(f, "Site '%p' %s\n", name(), orientStr()); fprintf(f, " DO X %g %g BY %g\n", x_orig(), x_num(), x_step()); fprintf(f, " DO Y %g %g BY %g\n", y_orig(), y_num(), y_step()); }