Add Calibration LCD menu item for optionallly disabling XY skew correction.
XY Skew correction menu item only enabled only when skew is 'perfect' (< 0.1deg). Fix HOME-Z to correct location (calibration point)
This commit is contained in:
parent
fa7f306726
commit
2533c36496
|
|
@ -3,6 +3,7 @@
|
|||
# Updated for Arduino 1.8.5+ by Ted Hess
|
||||
# Remove need to change default build environment
|
||||
# Firmware/ArduinoAddons are not used
|
||||
# Remove MK1 builds
|
||||
# https://learn.adafruit.com/continuous-integration-arduino-and-you/testing-your-project
|
||||
|
||||
language: c
|
||||
|
|
@ -27,7 +28,7 @@ install:
|
|||
|
||||
script:
|
||||
- GIT_VERSION=$(git rev-parse --short HEAD)
|
||||
- VARIANTS=$(ls Firmware/variants/)
|
||||
- VARIANTS=$(ls Firmware/variants/1_75_MK2*)
|
||||
- for VARIANT in $VARIANTS; do
|
||||
cp Firmware/variants/${VARIANT} Firmware/Configuration_prusa.h ;
|
||||
arduino --pref build.path=. --verify --verbose-build --board rambo:avr:rambo $PWD/Firmware/Firmware.ino ;
|
||||
|
|
@ -40,8 +41,7 @@ after_success:
|
|||
else
|
||||
BUILD_NAME=${GIT_VERSION} ;
|
||||
fi
|
||||
- mkdir -p prusa3d_fw_${BUILD_NAME}/MK1-175mm prusa3d_fw_${BUILD_NAME}/MK2-MultiMaterial prusa3d_fw_${BUILD_NAME}/MK2
|
||||
- mv *_MK1-RAMBo* prusa3d_fw_${BUILD_NAME}/MK1-175mm
|
||||
- mkdir -p prusa3d_fw_${BUILD_NAME}/MK2-MultiMaterial prusa3d_fw_${BUILD_NAME}/MK2
|
||||
- mv *_MK2-MultiMaterial-RAMBo* prusa3d_fw_${BUILD_NAME}/MK2-MultiMaterial
|
||||
- mv *_MK2-RAMBo* prusa3d_fw_${BUILD_NAME}/MK2
|
||||
- zip -r prusa3d_fw_${BUILD_NAME}.zip prusa3d_fw_* *.pdf
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
// Firmware version
|
||||
#define FW_version "3.1.0"
|
||||
#define FW_local_variant 7
|
||||
#define FW_local_variant 8
|
||||
#define FW_report_version FW_version " r" STR(FW_local_variant)
|
||||
|
||||
#define FW_PRUSA3D_MAGIC "PRUSA3DFW"
|
||||
|
|
@ -68,6 +68,8 @@
|
|||
// Current Range is: +/- 500um (stored as int16).
|
||||
#define EEPROM_BED_CORRECTION_VALID 499
|
||||
#define EEPROM_BED_CORRECTION_OFFSETS (EEPROM_BED_CORRECTION_VALID - 16)
|
||||
#define EEPROM_XY_CALIBRATION_RESULT (EEPROM_BED_CORRECTION_OFFSETS - 1)
|
||||
#define EEPROM_XY_SKEW_DISABLED (EEPROM_XY_CALIBRATION_RESULT - 1)
|
||||
|
||||
// Currently running firmware, each digit stored as uint16_t.
|
||||
// The flavor differentiates a dev, alpha, beta, release candidate or a release version.
|
||||
|
|
|
|||
|
|
@ -2429,6 +2429,10 @@ bool gcode_M45(bool onlyZ) {
|
|||
if (calibration_status() != 250 || eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE) == 0) {
|
||||
calibration_status_store(CALIBRATION_STATUS_ASSEMBLED);
|
||||
}
|
||||
|
||||
// Reset XY skew result
|
||||
eeprom_update_byte((uint8_t *)EEPROM_XY_CALIBRATION_RESULT, 0xFF);
|
||||
eeprom_update_byte((uint8_t *)EEPROM_XY_SKEW_DISABLED, 0);
|
||||
// Reset the baby step value and the baby step applied flag.
|
||||
eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, 0);
|
||||
// Complete XYZ calibration.
|
||||
|
|
@ -2458,6 +2462,7 @@ bool gcode_M45(bool onlyZ) {
|
|||
}
|
||||
lcd_bed_calibration_show_result(result, point_too_far_mask);
|
||||
if (result >= 0) {
|
||||
eeprom_update_byte((unsigned char *)EEPROM_XY_CALIBRATION_RESULT, result);
|
||||
// Calibration valid, the machine should be able to print. Advise the user to run the V2Calibration.gcode.
|
||||
calibration_status_store(CALIBRATION_STATUS_LIVE_ADJUST);
|
||||
if(eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE) != 1) lcd_show_fullscreen_message_and_wait_P(MSG_BABYSTEP_Z_NOT_SET);
|
||||
|
|
|
|||
|
|
@ -3077,9 +3077,34 @@ const char * const MSG_SILENT_MODE_ON_LANG_TABLE[LANG_NUM] PROGMEM = {
|
|||
MSG_SILENT_MODE_ON_DE
|
||||
};
|
||||
|
||||
const char MSG_SKEW_CORRECTION_EN[] PROGMEM = "Very little skew detected. Disable correction?";
|
||||
const char * const MSG_SKEW_CORRECTION_LANG_TABLE[1] PROGMEM = {
|
||||
MSG_SKEW_CORRECTION_EN
|
||||
const char MSG_SKEW_CORRECTION_OFF_EN[] PROGMEM = "XY Correct [OFF]";
|
||||
const char MSG_SKEW_CORRECTION_OFF_CZ[] PROGMEM = "XY Korekce [OFF]";
|
||||
const char MSG_SKEW_CORRECTION_OFF_IT[] PROGMEM = "XY Correz. [OFF]";
|
||||
const char MSG_SKEW_CORRECTION_OFF_ES[] PROGMEM = "XY Corr. [OFF]";
|
||||
const char MSG_SKEW_CORRECTION_OFF_PL[] PROGMEM = "XY Korekta [OFF]";
|
||||
const char MSG_SKEW_CORRECTION_OFF_DE[] PROGMEM = "XY Korrekt [OFF]";
|
||||
const char * const MSG_SKEW_CORRECTION_OFF_LANG_TABLE[LANG_NUM] PROGMEM = {
|
||||
MSG_SKEW_CORRECTION_OFF_EN,
|
||||
MSG_SKEW_CORRECTION_OFF_CZ,
|
||||
MSG_SKEW_CORRECTION_OFF_IT,
|
||||
MSG_SKEW_CORRECTION_OFF_ES,
|
||||
MSG_SKEW_CORRECTION_OFF_PL,
|
||||
MSG_SKEW_CORRECTION_OFF_DE
|
||||
};
|
||||
|
||||
const char MSG_SKEW_CORRECTION_ON_EN[] PROGMEM = "XY Correct [ON]";
|
||||
const char MSG_SKEW_CORRECTION_ON_CZ[] PROGMEM = "XY Korekce [ON]";
|
||||
const char MSG_SKEW_CORRECTION_ON_IT[] PROGMEM = "XY Correz. [ON]";
|
||||
const char MSG_SKEW_CORRECTION_ON_ES[] PROGMEM = "XY Corr. [ON]";
|
||||
const char MSG_SKEW_CORRECTION_ON_PL[] PROGMEM = "XY Korekta [ON]";
|
||||
const char MSG_SKEW_CORRECTION_ON_DE[] PROGMEM = "XY Korrekt [ON]";
|
||||
const char * const MSG_SKEW_CORRECTION_ON_LANG_TABLE[LANG_NUM] PROGMEM = {
|
||||
MSG_SKEW_CORRECTION_ON_EN,
|
||||
MSG_SKEW_CORRECTION_ON_CZ,
|
||||
MSG_SKEW_CORRECTION_ON_IT,
|
||||
MSG_SKEW_CORRECTION_ON_ES,
|
||||
MSG_SKEW_CORRECTION_ON_PL,
|
||||
MSG_SKEW_CORRECTION_ON_DE
|
||||
};
|
||||
|
||||
const char MSG_SLIGHT_SKEW_EN[] PROGMEM = "Slight skew:";
|
||||
|
|
|
|||
|
|
@ -562,8 +562,10 @@ extern const char* const MSG_SILENT_MODE_OFF_LANG_TABLE[LANG_NUM];
|
|||
#define MSG_SILENT_MODE_OFF LANG_TABLE_SELECT(MSG_SILENT_MODE_OFF_LANG_TABLE)
|
||||
extern const char* const MSG_SILENT_MODE_ON_LANG_TABLE[LANG_NUM];
|
||||
#define MSG_SILENT_MODE_ON LANG_TABLE_SELECT(MSG_SILENT_MODE_ON_LANG_TABLE)
|
||||
extern const char* const MSG_SKEW_CORRECTION_LANG_TABLE[1];
|
||||
#define MSG_SKEW_CORRECTION LANG_TABLE_SELECT_EXPLICIT(MSG_SKEW_CORRECTION_LANG_TABLE, 0)
|
||||
extern const char* const MSG_SKEW_CORRECTION_OFF_LANG_TABLE[LANG_NUM];
|
||||
#define MSG_SKEW_CORRECTION_OFF LANG_TABLE_SELECT(MSG_SKEW_CORRECTION_OFF_LANG_TABLE)
|
||||
extern const char* const MSG_SKEW_CORRECTION_ON_LANG_TABLE[LANG_NUM];
|
||||
#define MSG_SKEW_CORRECTION_ON LANG_TABLE_SELECT(MSG_SKEW_CORRECTION_ON_LANG_TABLE)
|
||||
extern const char* const MSG_SLIGHT_SKEW_LANG_TABLE[LANG_NUM];
|
||||
#define MSG_SLIGHT_SKEW LANG_TABLE_SELECT(MSG_SLIGHT_SKEW_LANG_TABLE)
|
||||
extern const char* const MSG_SOFTWARE_RESET_LANG_TABLE[1];
|
||||
|
|
|
|||
|
|
@ -353,3 +353,5 @@
|
|||
#define MSG_FILE_CNT "Nektere soubory nebudou setrideny. Maximalni pocet souboru pro setrideni je 100."
|
||||
#define MSG_WIZARD_HEATING "Predehrivam trysku. Prosim cekejte."
|
||||
#define MSG_M117_V2_CALIBRATION "M117 Kal. prvni vrstvy"
|
||||
#define MSG_SKEW_CORRECTION_ON "XY Korekce [ON]"
|
||||
#define MSG_SKEW_CORRECTION_OFF "XY Korekce [OFF]"
|
||||
|
|
|
|||
|
|
@ -365,3 +365,5 @@
|
|||
#define MSG_FILE_CNT "Einige Dateien werden nicht sortiert. Max. Anzahl der Dateien in einem Ordner ist 100."
|
||||
#define MSG_WIZARD_HEATING "Vorheizen der Duese. Bitte warten."
|
||||
#define MSG_M117_V2_CALIBRATION "M117 Erste-Schicht Kal."
|
||||
#define MSG_SKEW_CORRECTION_ON "XY Korrekt [ON]"
|
||||
#define MSG_SKEW_CORRECTION_OFF "XY Korrekt [OFF]"
|
||||
|
|
|
|||
|
|
@ -353,4 +353,5 @@
|
|||
#define(lenght=20, lines=4) MSG_PLEASE_LOAD_PLA "Please load PLA filament first."
|
||||
#define(length=20, lines=8) MSG_FILE_CNT "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."
|
||||
#define(length=25, lines=1) MSG_M117_V2_CALIBRATION "M117 First layer cal."
|
||||
#define(length=20, lines=3) MSG_SKEW_CORRECTION "Very little skew detected. Disable correction?"
|
||||
#define(length=20, lines=1) MSG_SKEW_CORRECTION_ON "XY Correct [ON]"
|
||||
#define(length=20, lines=1) MSG_SKEW_CORRECTION_OFF "XY Correct [OFF]"
|
||||
|
|
|
|||
|
|
@ -347,3 +347,5 @@
|
|||
#define MSG_FILE_CNT "Algunos archivos no seran ordenados. El Max. num. de archivos para ordenar en 1 carpeta es 100."
|
||||
#define MSG_WIZARD_HEATING "Precalentando nozzle. Espera por favor."
|
||||
#define MSG_M117_V2_CALIBRATION "M117 Cal. primera cap."
|
||||
#define MSG_SKEW_CORRECTION_ON "XY Corr. [ON]"
|
||||
#define MSG_SKEW_CORRECTION_OFF "XY Corr. [OFF]"
|
||||
|
|
|
|||
|
|
@ -338,3 +338,5 @@
|
|||
#define MSG_FILE_CNT "Alcuni dei file non potranno essere organizzati. 100 e il n. max. di file che possono essere organizzati."
|
||||
#define MSG_WIZARD_HEATING "Sto preriscaldando l'ugello. Per favore attendi."
|
||||
#define MSG_M117_V2_CALIBRATION "M117 Cal. primo layer."
|
||||
#define MSG_SKEW_CORRECTION_ON "XY Correz. [ON]"
|
||||
#define MSG_SKEW_CORRECTION_OFF "XY Correz. [OFF]"
|
||||
|
|
|
|||
|
|
@ -350,3 +350,5 @@
|
|||
#define MSG_FILE_CNT "Niektore pliki nie beda sortowane. Max. ilosc plikow do sortu w 1 folderze to 100."
|
||||
#define MSG_WIZARD_HEATING "Nagrzewanie dyszy. Prosze czekac."
|
||||
#define MSG_M117_V2_CALIBRATION "M117 Kal. 1. warstwy"
|
||||
#define MSG_SKEW_CORRECTION_ON "XY Korekta [ON]"
|
||||
#define MSG_SKEW_CORRECTION_OFF "XY Korekta [OFF]"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include "stepper.h"
|
||||
#include "ultralcd.h"
|
||||
|
||||
bool xy_skew_disabled;
|
||||
uint8_t world2machine_correction_mode;
|
||||
float world2machine_rotation_and_skew[2][2];
|
||||
float world2machine_rotation_and_skew_inv[2][2];
|
||||
|
|
@ -452,32 +453,17 @@ BedSkewOffsetDetectionResultType calculate_machine_skew_and_offset_LS(
|
|||
#endif // SUPPORT_VERBOSITY
|
||||
|
||||
if (result == BED_SKEW_OFFSET_DETECTION_PERFECT) {
|
||||
bool skew_correction = lcd_show_multiscreen_message_yes_no_and_wait_P(MSG_SKEW_CORRECTION, false, false);
|
||||
|
||||
lcd_update_enable(true);
|
||||
lcd_update(2);
|
||||
|
||||
if (skew_correction) {
|
||||
#ifdef SUPPORT_VERBOSITY
|
||||
if (verbosity_level > 0)
|
||||
SERIAL_ECHOLNPGM("Very little skew detected. Disabling skew correction.");
|
||||
#endif
|
||||
// Just disable the skew correction.
|
||||
vec_x[0] = MACHINE_AXIS_SCALE_X;
|
||||
vec_x[1] = 0.f;
|
||||
vec_y[0] = 0.f;
|
||||
vec_y[1] = MACHINE_AXIS_SCALE_Y;
|
||||
} else {
|
||||
#ifdef SUPPORT_VERBOSITY
|
||||
#ifdef SUPPORT_VERBOSITY
|
||||
if (verbosity_level > 0)
|
||||
SERIAL_ECHOLNPGM("Very little skew detected. Orthogonalizing the axes.");
|
||||
#endif
|
||||
// Orthogonalize the axes.
|
||||
#endif
|
||||
// Orthogonalize the axes.
|
||||
a1 = 0.5f * (a1 + a2);
|
||||
vec_x[0] = cos(a1) * MACHINE_AXIS_SCALE_X;
|
||||
vec_x[1] = sin(a1) * MACHINE_AXIS_SCALE_X;
|
||||
vec_y[0] = -sin(a1) * MACHINE_AXIS_SCALE_Y;
|
||||
vec_y[1] = cos(a1) * MACHINE_AXIS_SCALE_Y;
|
||||
|
||||
// Refresh the offset.
|
||||
cntr[0] = 0.f;
|
||||
cntr[1] = 0.f;
|
||||
|
|
@ -538,7 +524,6 @@ BedSkewOffsetDetectionResultType calculate_machine_skew_and_offset_LS(
|
|||
}
|
||||
#endif // SUPPORT_VERBOSITY
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Invert the transformation matrix made of vec_x, vec_y and cntr.
|
||||
|
|
@ -632,6 +617,10 @@ void reset_bed_offset_and_skew()
|
|||
// Reset the 8 16bit offsets.
|
||||
for (int8_t i = 0; i < 4; ++ i)
|
||||
eeprom_update_dword((uint32_t*)(EEPROM_BED_CALIBRATION_Z_JITTER+i*4), 0x0FFFFFFFF);
|
||||
|
||||
// Reset XY skew handling
|
||||
eeprom_update_byte((uint8_t *)EEPROM_XY_CALIBRATION_RESULT, 0xFF);
|
||||
eeprom_update_byte((uint8_t *)EEPROM_XY_SKEW_DISABLED, false);
|
||||
}
|
||||
|
||||
bool is_bed_z_jitter_data_valid()
|
||||
|
|
@ -645,10 +634,18 @@ bool is_bed_z_jitter_data_valid()
|
|||
|
||||
static void world2machine_update(const float vec_x[2], const float vec_y[2], const float cntr[2])
|
||||
{
|
||||
world2machine_rotation_and_skew[0][0] = vec_x[0];
|
||||
world2machine_rotation_and_skew[1][0] = vec_x[1];
|
||||
world2machine_rotation_and_skew[0][1] = vec_y[0];
|
||||
world2machine_rotation_and_skew[1][1] = vec_y[1];
|
||||
// Check skew compensation is disabled (use unity matrix if so)
|
||||
if (!xy_skew_disabled || homing_flag || mesh_bed_leveling_flag) {
|
||||
world2machine_rotation_and_skew[0][0] = vec_x[0];
|
||||
world2machine_rotation_and_skew[1][0] = vec_x[1];
|
||||
world2machine_rotation_and_skew[0][1] = vec_y[0];
|
||||
world2machine_rotation_and_skew[1][1] = vec_y[1];
|
||||
} else {
|
||||
world2machine_rotation_and_skew[0][0] = 1.0f;
|
||||
world2machine_rotation_and_skew[1][0] = 0.f;
|
||||
world2machine_rotation_and_skew[0][1] = 0.f;
|
||||
world2machine_rotation_and_skew[1][1] = 1.0f;
|
||||
}
|
||||
world2machine_shift[0] = cntr[0];
|
||||
world2machine_shift[1] = cntr[1];
|
||||
// No correction.
|
||||
|
|
@ -762,6 +759,8 @@ void world2machine_initialize()
|
|||
reset_bed_offset_and_skew();
|
||||
world2machine_reset();
|
||||
} else {
|
||||
// Skew disabled must equal 1 (all else is false)
|
||||
xy_skew_disabled = (eeprom_read_byte((uint8_t *)EEPROM_XY_SKEW_DISABLED) == true);
|
||||
world2machine_update(vec_x, vec_y, cntr);
|
||||
/*
|
||||
SERIAL_ECHOPGM("world2machine_initialize() loaded: ");
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ extern const float bed_ref_points[] PROGMEM;
|
|||
extern const float bed_skew_angle_mild;
|
||||
extern const float bed_skew_angle_extreme;
|
||||
|
||||
extern bool xy_skew_disabled;
|
||||
|
||||
// Is the world2machine correction activated?
|
||||
enum World2MachineCorrectionMode
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3352,6 +3352,12 @@ void lcd_extr_cal_reset() {
|
|||
|
||||
#endif
|
||||
|
||||
void lcd_xy_skew_disable_toggle()
|
||||
{
|
||||
xy_skew_disabled = !xy_skew_disabled;
|
||||
eeprom_update_byte((uint8_t *)EEPROM_XY_SKEW_DISABLED, xy_skew_disabled);
|
||||
}
|
||||
|
||||
void lcd_toshiba_flash_air_compatibility_toggle()
|
||||
{
|
||||
card.ToshibaFlashAir_enable(! card.ToshibaFlashAir_isEnabled());
|
||||
|
|
@ -3651,6 +3657,16 @@ static void lcd_calibration_menu()
|
|||
#endif //MK1BP
|
||||
MENU_ITEM(submenu, MSG_PID_EXTRUDER, pid_extruder);
|
||||
MENU_ITEM(submenu, MSG_SHOW_END_STOPS, menu_show_end_stops);
|
||||
|
||||
// Option only available if minimal skew on XY plane
|
||||
if (eeprom_read_byte((uint8_t *)EEPROM_XY_CALIBRATION_RESULT) == BED_SKEW_OFFSET_DETECTION_PERFECT) {
|
||||
if (xy_skew_disabled) {
|
||||
MENU_ITEM(function, MSG_SKEW_CORRECTION_OFF, lcd_xy_skew_disable_toggle);
|
||||
} else {
|
||||
MENU_ITEM(function, MSG_SKEW_CORRECTION_ON, lcd_xy_skew_disable_toggle);
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef MK1BP
|
||||
MENU_ITEM(gcode, MSG_CALIBRATE_BED_RESET, PSTR("M44"));
|
||||
#endif //MK1BP
|
||||
|
|
|
|||
Loading…
Reference in New Issue