Merge pull request #17 from prusa3d/MK3-michal

Power panic improved by turning off Z steppers 
Dubug outputs for filament and fan rotation sensors moved to special menu Support->Extruder info
XYZ calibration debug now available only while not printing
This commit is contained in:
Michal Průša 2017-07-07 05:02:54 +02:00 committed by GitHub
commit 25896ef6e1
6 changed files with 119 additions and 13 deletions

View File

@ -7056,7 +7056,10 @@ void uvlo_() {
current_position[Z_AXIS] += UVLO_Z_AXIS_SHIFT;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 40, active_extruder);
st_synchronize();
disable_z();
eeprom_update_byte((uint8_t*)EEPROM_UVLO, 1);
delay(10);
}
void setup_uvlo_interrupt() {

View File

@ -1301,6 +1301,31 @@ const char * const MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE2_LANG_TABLE[LANG_NUM] PR
MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE2_DE
};
const char MSG_INFO_EXTRUDER_EN[] PROGMEM = "Extruder info";
const char * const MSG_INFO_EXTRUDER_LANG_TABLE[1] PROGMEM = {
MSG_INFO_EXTRUDER_EN
};
const char MSG_INFO_FILAMENT_XDIFF_EN[] PROGMEM = "Fil. Xdiff:";
const char * const MSG_INFO_FILAMENT_XDIFF_LANG_TABLE[1] PROGMEM = {
MSG_INFO_FILAMENT_XDIFF_EN
};
const char MSG_INFO_FILAMENT_YDIFF_EN[] PROGMEM = "Fil. Ydiff:";
const char * const MSG_INFO_FILAMENT_YDIFF_LANG_TABLE[1] PROGMEM = {
MSG_INFO_FILAMENT_YDIFF_EN
};
const char MSG_INFO_NOZZLE_FAN_EN[] PROGMEM = "Nozzle FAN:";
const char * const MSG_INFO_NOZZLE_FAN_LANG_TABLE[1] PROGMEM = {
MSG_INFO_NOZZLE_FAN_EN
};
const char MSG_INFO_PRINT_FAN_EN[] PROGMEM = "Print FAN: ";
const char * const MSG_INFO_PRINT_FAN_LANG_TABLE[1] PROGMEM = {
MSG_INFO_PRINT_FAN_EN
};
const char MSG_INIT_SDCARD_EN[] PROGMEM = "Init. SD card";
const char * const MSG_INIT_SDCARD_LANG_TABLE[1] PROGMEM = {
MSG_INIT_SDCARD_EN

View File

@ -254,6 +254,16 @@ extern const char* const MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE1_LANG_TABLE[LANG_N
#define MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE1 LANG_TABLE_SELECT(MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE1_LANG_TABLE)
extern const char* const MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE2_LANG_TABLE[LANG_NUM];
#define MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE2 LANG_TABLE_SELECT(MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE2_LANG_TABLE)
extern const char* const MSG_INFO_EXTRUDER_LANG_TABLE[1];
#define MSG_INFO_EXTRUDER LANG_TABLE_SELECT_EXPLICIT(MSG_INFO_EXTRUDER_LANG_TABLE, 0)
extern const char* const MSG_INFO_FILAMENT_XDIFF_LANG_TABLE[1];
#define MSG_INFO_FILAMENT_XDIFF LANG_TABLE_SELECT_EXPLICIT(MSG_INFO_FILAMENT_XDIFF_LANG_TABLE, 0)
extern const char* const MSG_INFO_FILAMENT_YDIFF_LANG_TABLE[1];
#define MSG_INFO_FILAMENT_YDIFF LANG_TABLE_SELECT_EXPLICIT(MSG_INFO_FILAMENT_YDIFF_LANG_TABLE, 0)
extern const char* const MSG_INFO_NOZZLE_FAN_LANG_TABLE[1];
#define MSG_INFO_NOZZLE_FAN LANG_TABLE_SELECT_EXPLICIT(MSG_INFO_NOZZLE_FAN_LANG_TABLE, 0)
extern const char* const MSG_INFO_PRINT_FAN_LANG_TABLE[1];
#define MSG_INFO_PRINT_FAN LANG_TABLE_SELECT_EXPLICIT(MSG_INFO_PRINT_FAN_LANG_TABLE, 0)
extern const char* const MSG_INIT_SDCARD_LANG_TABLE[1];
#define MSG_INIT_SDCARD LANG_TABLE_SELECT_EXPLICIT(MSG_INIT_SDCARD_LANG_TABLE, 0)
extern const char* const MSG_INSERT_FILAMENT_LANG_TABLE[LANG_NUM];

View File

@ -306,3 +306,10 @@
#define(length=17, lines=1) MSG_EXTRUDER_4 "Extruder 4"
#define(length=20, lines=2) MSG_RECOVER_PRINT "Blackout occurred. Recover print?"
#define(length=20, lines=1) MSG_RECOVERING_PRINT "Recovering print "
#define(length=15, lines=1) MSG_INFO_EXTRUDER "Extruder info"
#define(length=11, lines=1) MSG_INFO_NOZZLE_FAN "Nozzle FAN:"
#define(length=11, lines=1) MSG_INFO_PRINT_FAN "Print FAN: "
#define(length=11, lines=1) MSG_INFO_FILAMENT_XDIFF "Fil. Xd:"
#define(length=11, lines=1) MSG_INFO_FILAMENT_YDIFF "Fil. Ydiff:"

View File

@ -175,7 +175,7 @@ static void prusa_stat_farm_number();
static void prusa_stat_temperatures();
static void prusa_stat_printinfo();
static void lcd_farm_no();
static void lcd_menu_extruder_info();
#ifdef DOGLCD
static void lcd_set_contrast();
#endif
@ -519,16 +519,18 @@ static void lcd_status_screen()
lcd_printPGM(MSG_PRINTER_DISCONNECTED);
}
//#define FSENS_FACTOR (2580.8/50) //filament sensor factor [steps / encoder counts]
//#define FSENS_FACTOR (2580.8/45.3) //filament sensor factor [steps / encoder counts]
lcd.setCursor(0, 3);
lcd_implementation_print(" ");
lcd.setCursor(0, 3);
lcd_implementation_print(pat9125_x);
lcd.setCursor(6, 3);
lcd_implementation_print(pat9125_y);
lcd.setCursor(12, 3);
lcd_implementation_print(pat9125_b);
//lcd.setCursor(0, 3);
//lcd_implementation_print(" ");
//lcd.setCursor(0, 3);
//lcd_implementation_print(pat9125_x);
//lcd.setCursor(6, 3);
//lcd_implementation_print(pat9125_y);
//lcd.setCursor(12, 3);
//lcd_implementation_print(pat9125_b);
}
#ifdef ULTIPANEL
@ -890,6 +892,61 @@ void lcd_cooldown()
}
static void lcd_menu_extruder_info()
{
int fan_speed_RPM[2];
fan_speed_RPM[0] = 60*fan_speed[0];
fan_speed_RPM[1] = 60*fan_speed[1];
// Display Nozzle fan RPM
lcd.setCursor(0, 0);
lcd_printPGM(MSG_INFO_NOZZLE_FAN);
lcd.setCursor(11, 0);
lcd.print(" ");
lcd.setCursor(12, 0);
lcd.print(itostr4(fan_speed_RPM[0]));
lcd.print(" RPM");
// Display Nozzle fan RPM
lcd.setCursor(0, 1);
lcd_printPGM(MSG_INFO_PRINT_FAN);
lcd.setCursor(11, 1);
lcd.print(" ");
lcd.setCursor(12, 1);
lcd.print(itostr4(fan_speed_RPM[1]));
lcd.print(" RPM");
// Display X and Y difference from Filament sensor
lcd.setCursor(0, 2);
lcd.print("Fil. Xd:");
lcd.print(itostr3(pat9125_x));
lcd.print(" ");
lcd.setCursor(12, 2);
lcd.print("Yd:");
lcd.print(itostr3(pat9125_y));
// Display Light intensity from Filament sensor
lcd.setCursor(0, 3);
lcd.print("Intensity: ");
lcd.setCursor(12, 3);
lcd.print(itostr3(pat9125_b));
if (lcd_clicked())
{
lcd_quick_feedback();
lcd_return_to_status();
}
}
static void lcd_preheat_menu()
{
@ -959,7 +1016,11 @@ static void lcd_support_menu()
}
#ifndef MK1BP
MENU_ITEM(back, PSTR("------------"), lcd_main_menu);
if (!IS_SD_PRINTING)
{
MENU_ITEM(function, PSTR("XYZ cal. details"), lcd_service_mode_show_result);
}
MENU_ITEM(submenu, MSG_INFO_EXTRUDER, lcd_menu_extruder_info);
#endif //MK1BP
END_MENU();
}

View File

@ -711,10 +711,10 @@ static void lcd_implementation_status_screen()
lcd.print(itostr3(feedmultiply));
lcd_printPGM(PSTR("% "));
lcd.setCursor(8, 0);
lcd.print(itostr3(fan_speed[0]));
lcd.setCursor(8, 1);
lcd.print(itostr3(fan_speed[1]));
//lcd.setCursor(8, 0);
//lcd.print(itostr3(fan_speed[0]));
//lcd.setCursor(8, 1);
//lcd.print(itostr3(fan_speed[1]));
#else
//Print Feedrate