Merge remote-tracking branch 'upstream/MK3' into MK3

This commit is contained in:
DRracer 2019-06-18 09:43:59 +02:00
commit 052cb61b36
23 changed files with 938 additions and 649 deletions

View File

@ -7,8 +7,8 @@
#define STR(x) STR_HELPER(x)
// Firmware version
#define FW_VERSION "3.7.1"
#define FW_COMMIT_NR 2266
#define FW_VERSION "3.7.2-RC1"
#define FW_COMMIT_NR 2359
// FW_VERSION_UNKNOWN means this is an unofficial build.
// The firmware should only be checked into github with this symbol.
#define FW_DEV_VERSION FW_VERSION_UNKNOWN

5
Firmware/Marlin.h Normal file → Executable file
View File

@ -214,6 +214,9 @@ void manage_inactivity(bool ignore_stepper_queue=false);
#endif
#define FARM_FILAMENT_COLOR_NONE 99;
enum AxisEnum {X_AXIS=0, Y_AXIS=1, Z_AXIS=2, E_AXIS=3, X_HEAD=4, Y_HEAD=5};
#define X_AXIS_MASK 1
#define Y_AXIS_MASK 2
@ -389,7 +392,7 @@ extern bool wizard_active; //autoload temporarily disabled during wizard
extern LongTimer safetyTimer;
#define PRINT_PERCENT_DONE_INIT 0xff
#define PRINTER_ACTIVE (IS_SD_PRINTING || is_usb_printing || isPrintPaused || (custom_message_type == CUSTOM_MSG_TYPE_TEMCAL) || saved_printing || (lcd_commands_type == LCD_COMMAND_V2_CAL) || card.paused || mmu_print_saved)
#define PRINTER_ACTIVE (IS_SD_PRINTING || is_usb_printing || isPrintPaused || (custom_message_type == CustomMsg::TempCal) || saved_printing || (lcd_commands_type == LcdCommands::Layer1Cal) || card.paused || mmu_print_saved)
//! Beware - mcode_in_progress is set as soon as the command gets really processed,
//! which is not the same as posting the M600 command into the command queue
//! There can be a considerable lag between posting M600 and its real processing which might result

View File

@ -214,8 +214,6 @@ static LongTimer crashDetTimer;
bool mesh_bed_leveling_flag = false;
bool mesh_bed_run_from_menu = false;
int8_t FarmMode = 0;
bool prusa_sd_card_upload = false;
unsigned int status_number = 0;
@ -1065,6 +1063,9 @@ void setup()
//disabled filament autoload (PFW360)
fsensor_autoload_set(false);
#endif //FILAMENT_SENSOR
// ~ FanCheck -> on
if(!(eeprom_read_byte((uint8_t*)EEPROM_FAN_CHECK_ENABLED)))
eeprom_update_byte((unsigned char *)EEPROM_FAN_CHECK_ENABLED,true);
}
MYSERIAL.begin(BAUDRATE);
fdev_setup_stream(uartout, uart_putchar, NULL, _FDEV_SETUP_WRITE); //setup uart out stream
@ -1644,6 +1645,7 @@ void setup()
}
#endif //UVLO_SUPPORT
fCheckModeInit();
KEEPALIVE_STATE(NOT_BUSY);
#ifdef WATCHDOG
wdt_enable(WDTO_4S);
@ -3157,7 +3159,7 @@ static void gcode_M600(bool automatic, float x_position, float y_position, float
#endif //IR_SENSOR
lcd_setstatuspgm(_T(WELCOME_MSG));
custom_message_type = CUSTOM_MSG_TYPE_STATUS;
custom_message_type = CustomMsg::Status;
}
//! @brief Rise Z if too low to avoid blob/jam before filament loading
@ -3173,6 +3175,11 @@ void gcode_M701()
{
printf_P(PSTR("gcode_M701 begin\n"));
if (farm_mode)
{
prusa_statistics(22);
}
if (mmu_enabled)
{
extr_adj(tmp_extruder);//loads current extruder
@ -3181,7 +3188,7 @@ void gcode_M701()
else
{
enable_z();
custom_message_type = CUSTOM_MSG_TYPE_F_LOAD;
custom_message_type = CustomMsg::FilamentLoading;
#ifdef FSENSOR_QUALITY
fsensor_oq_meassure_start(40);
@ -3211,7 +3218,7 @@ void gcode_M701()
lcd_setstatuspgm(_T(WELCOME_MSG));
disable_z();
loading_flag = false;
custom_message_type = CUSTOM_MSG_TYPE_STATUS;
custom_message_type = CustomMsg::Status;
#ifdef FSENSOR_QUALITY
fsensor_oq_meassure_stop();
@ -3649,7 +3656,39 @@ void process_commands()
} else if(code_seen("FR")) { //! PRUSA FR
// Factory full reset
factory_reset(0);
}
//-//
/*
} else if(code_seen("qqq")) {
MYSERIAL.println("=== checking ===");
MYSERIAL.println(eeprom_read_byte((uint8_t*)EEPROM_CHECK_MODE),DEC);
MYSERIAL.println(eeprom_read_byte((uint8_t*)EEPROM_NOZZLE_DIAMETER),DEC);
MYSERIAL.println(eeprom_read_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM),DEC);
MYSERIAL.println(farm_mode,DEC);
MYSERIAL.println(eCheckMode,DEC);
} else if(code_seen("www")) {
MYSERIAL.println("=== @ FF ===");
eeprom_update_byte((uint8_t*)EEPROM_CHECK_MODE,0xFF);
eeprom_update_byte((uint8_t*)EEPROM_NOZZLE_DIAMETER,0xFF);
eeprom_update_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM,0xFFFF);
*/
} else if (code_seen("nozzle")) { //! PRUSA nozzle
uint16_t nDiameter;
if(code_seen('D'))
{
nDiameter=(uint16_t)(code_value()*1000.0+0.5); // [,um]
nozzle_diameter_check(nDiameter);
}
else if(code_seen("set") && farm_mode)
{
strchr_pointer++; // skip 2nd char (~ 'e')
strchr_pointer++; // skip 3rd char (~ 't')
nDiameter=(uint16_t)(code_value()*1000.0+0.5); // [,um]
eeprom_update_byte((uint8_t*)EEPROM_NOZZLE_DIAMETER,(uint8_t)e_NOZZLE_DIAMETER_NULL); // for correct synchronization after farm-mode exiting
eeprom_update_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM,nDiameter);
}
else SERIAL_PROTOCOLLN((float)eeprom_read_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM)/1000.0);
}
//else if (code_seen('Cal')) {
// lcd_calibration();
// }
@ -4194,7 +4233,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
// setTargetHotend(200, 0);
setTargetBed(70 + (start_temp - 30));
custom_message_type = CUSTOM_MSG_TYPE_TEMCAL;
custom_message_type = CustomMsg::TempCal;
custom_message_state = 1;
lcd_setstatuspgm(_T(MSG_TEMP_CALIBRATION));
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
@ -4296,7 +4335,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
break;
}
puts_P(_N("PINDA probe calibration start"));
custom_message_type = CUSTOM_MSG_TYPE_TEMCAL;
custom_message_type = CustomMsg::TempCal;
custom_message_state = 1;
lcd_setstatuspgm(_T(MSG_TEMP_CALIBRATION));
current_position[X_AXIS] = PINDA_PREHEAT_X;
@ -4364,7 +4403,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
}
custom_message_type = CUSTOM_MSG_TYPE_STATUS;
custom_message_type = CustomMsg::Status;
eeprom_update_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA, 1);
puts_P(_N("Temperature calibration done."));
@ -4424,7 +4463,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
// We don't know where we are! HOME!
// Push the commands to the front of the message queue in the reverse order!
// There shall be always enough space reserved for these commands.
if (lcd_commands_type != LCD_COMMAND_STOP_PRINT) {
if (lcd_commands_type != LcdCommands::StopPrint) {
repeatcommand_front(); // repeat G80 with all its parameters
enquecommand_front_P((PSTR("G28 W0")));
}
@ -4464,7 +4503,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
if (temp_comp_start)
if (run == false && temp_cal_active == true && calibration_status_pinda() == true && target_temperature_bed >= 50) {
if (lcd_commands_type != LCD_COMMAND_STOP_PRINT) {
if (lcd_commands_type != LcdCommands::StopPrint) {
temp_compensation_start();
run = true;
repeatcommand_front(); // repeat G80 with all its parameters
@ -4476,14 +4515,14 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
break;
}
run = false;
if (lcd_commands_type == LCD_COMMAND_STOP_PRINT) {
if (lcd_commands_type == LcdCommands::StopPrint) {
mesh_bed_leveling_flag = false;
break;
}
// Save custom message state, set a new custom message state to display: Calibrating point 9.
unsigned int custom_message_type_old = custom_message_type;
CustomMsg custom_message_type_old = custom_message_type;
unsigned int custom_message_state_old = custom_message_state;
custom_message_type = CUSTOM_MSG_TYPE_MESHBL;
custom_message_type = CustomMsg::MeshBedLeveling;
custom_message_state = (nMeasPoints * nMeasPoints) + 10;
lcd_update(1);
@ -4683,7 +4722,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
enable_z_endstop(bState);
} while (st_get_position_mm(Z_AXIS) > MESH_HOME_Z_SEARCH); // i.e. Z-leveling not o.k.
// plan_set_z_position(MESH_HOME_Z_SEARCH); // is not necessary ('do-while' loop always ends at the expected Z-position)
custom_message_type=CUSTOM_MSG_TYPE_STATUS; // display / status-line recovery
custom_message_type=CustomMsg::Status; // display / status-line recovery
lcd_update_enable(true); // display / status-line recovery
gcode_G28(true, true, true); // X & Y & Z-homing (must be after individual Z-homing (problem with spool-holder)!)
repeatcommand_front(); // re-run (i.e. of "G80")
@ -4959,6 +4998,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
EEPROM_save_B(EEPROM_FARM_NUMBER, &farm_no);
SilentModeMenu = SILENT_MODE_OFF;
eeprom_update_byte((unsigned char *)EEPROM_SILENT, SilentModeMenu);
fCheckModeInit(); // alternatively invoke printer reset
break;
case 99: //! G99 (deactivate farm mode)
@ -4966,6 +5006,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
lcd_printer_connected();
eeprom_update_byte((unsigned char *)EEPROM_FARM_MODE, farm_mode);
lcd_update(2);
fCheckModeInit(); // alternatively invoke printer reset
break;
default:
printf_P(PSTR("Unknown G code: %s \n"), cmdbuffer + bufindr + CMDHDRSIZE);
@ -5928,7 +5969,7 @@ Sigma_Exit:
SERIAL_PROTOCOLLNRPGM(FW_VERSION_STR_P());
} else if (code_seen('U')) {
// Check the firmware version provided. If the firmware version provided by the U code is higher than the currently running firmware,
// pause the print and ask the user to upgrade the firmware.
// pause the print for 30s and ask the user to upgrade the firmware.
show_upgrade_dialog_if_version_newer(++ strchr_pointer);
} else {
SERIAL_ECHOPGM("FIRMWARE_NAME:Prusa-Firmware ");
@ -7671,7 +7712,7 @@ static void handleSafetyTimer()
{
safetyTimer.start();
}
else if (safetyTimer.expired(safetytimer_inactive_time))
else if (safetyTimer.expired(farm_mode?FARM_DEFAULT_SAFETYTIMER_TIME_ms:safetytimer_inactive_time))
{
setTargetBed(0);
setAllTargetHotends(0);
@ -7693,9 +7734,9 @@ bool bInhibitFlag;
#ifdef IR_SENSOR
bInhibitFlag=(menu_menu==lcd_menu_show_sensors_state); // Support::SensorInfo menu active
#endif // IR_SENSOR
if ((mcode_in_progress != 600) && (eFilamentAction != e_FILAMENT_ACTION_autoLoad) && (!bInhibitFlag)) //M600 not in progress, preHeat @ autoLoad menu not active, Support::ExtruderInfo/SensorInfo menu not active
if ((mcode_in_progress != 600) && (eFilamentAction != FilamentAction::AutoLoad) && (!bInhibitFlag)) //M600 not in progress, preHeat @ autoLoad menu not active, Support::ExtruderInfo/SensorInfo menu not active
{
if (!moves_planned() && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LCD_COMMAND_V2_CAL) && !wizard_active)
if (!moves_planned() && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LcdCommands::Layer1Cal) && !wizard_active)
{
if (fsensor_check_autoload())
{
@ -7719,7 +7760,7 @@ if(0)
show_preheat_nozzle_warning();
lcd_update_enable(true);
*/
eFilamentAction=e_FILAMENT_ACTION_autoLoad;
eFilamentAction=FilamentAction::AutoLoad;
bFilamentFirstRun=false;
if(target_temperature[0]>=EXTRUDE_MINTEMP)
{
@ -8193,7 +8234,7 @@ void bed_check(float x_dimension, float y_dimension, int x_points_num, int y_poi
float bed_zero_ref_y = (-0.6f + Y_PROBE_OFFSET_FROM_EXTRUDER);
float mesh_home_z_search = 4;
float measure_z_heigth = 0.2f;
float measure_z_height = 0.2f;
float row[x_points_num];
int ix = 0;
int iy = 0;
@ -8210,7 +8251,7 @@ void bed_check(float x_dimension, float y_dimension, int x_points_num, int y_poi
unsigned int custom_message_type_old = custom_message_type;
unsigned int custom_message_state_old = custom_message_state;
custom_message_type = CUSTOM_MSG_TYPE_MESHBL;
custom_message_type = CustomMsg::MeshBedLeveling;
custom_message_state = (x_points_num * y_points_num) + 10;
lcd_update(1);
@ -8228,7 +8269,7 @@ void bed_check(float x_dimension, float y_dimension, int x_points_num, int y_poi
}
st_synchronize();
*/
destination[Z_AXIS] = measure_z_heigth;
destination[Z_AXIS] = measure_z_height;
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], Z_LIFT_FEEDRATE, active_extruder);
for(int8_t i=0; i < NUM_AXIS; i++) {
current_position[i] = destination[i];
@ -8408,7 +8449,7 @@ void bed_analysis(float x_dimension, float y_dimension, int x_points_num, int y_
}
unsigned int custom_message_type_old = custom_message_type;
unsigned int custom_message_state_old = custom_message_state;
custom_message_type = CUSTOM_MSG_TYPE_MESHBL;
custom_message_type = CustomMsg::MeshBedLeveling;
custom_message_state = (x_points_num * y_points_num) + 10;
lcd_update(1);
@ -8558,7 +8599,7 @@ void bed_analysis(float x_dimension, float y_dimension, int x_points_num, int y_
void temp_compensation_start() {
custom_message_type = CUSTOM_MSG_TYPE_TEMPRE;
custom_message_type = CustomMsg::TempCompPreheat;
custom_message_state = PINDA_HEAT_T + 1;
lcd_update(2);
if (degHotend(active_extruder) > EXTRUDE_MINTEMP) {
@ -8579,7 +8620,7 @@ void temp_compensation_start() {
if (custom_message_state == 99 || custom_message_state == 9) lcd_update(2); //force whole display redraw if number of digits changed
else lcd_update(1);
}
custom_message_type = CUSTOM_MSG_TYPE_STATUS;
custom_message_type = CustomMsg::Status;
custom_message_state = 0;
}

2
Firmware/cmdqueue.cpp Normal file → Executable file
View File

@ -598,7 +598,7 @@ void get_command()
if (farm_mode)
{
prusa_statistics(6);
lcd_commands_type = LCD_COMMAND_FARM_MODE_CONFIRM;
lcd_commands_type = LcdCommands::FarmModeConfirm;
}
}

View File

@ -155,11 +155,18 @@
#define EEPROM_MMU_LOAD_FAIL (EEPROM_MMU_LOAD_FAIL_TOT - 1) //uint8_t
#define EEPROM_MMU_CUTTER_ENABLED (EEPROM_MMU_LOAD_FAIL - 1)
#define EEPROM_UVLO_MESH_BED_LEVELING_FULL (EEPROM_MMU_CUTTER_ENABLED - 12*12*2) //allow 12 calibration points for future expansion
#define EEPROM_MBL_TYPE (EEPROM_UVLO_MESH_BED_LEVELING_FULL-1) //uint8_t for mesh bed leveling precision
#define EEPROM_MBL_MAGNET_ELIMINATION (EEPROM_MBL_TYPE -1)
#define EEPROM_MBL_POINTS_NR (EEPROM_MBL_MAGNET_ELIMINATION -1) //uint8_t number of points in one exis for mesh bed leveling
#define EEPROM_MBL_PROBE_NR (EEPROM_MBL_POINTS_NR-1) //number of measurements for each point
#define EEPROM_MMU_STEALTH (EEPROM_MBL_PROBE_NR-1)
#define EEPROM_CHECK_MODE (EEPROM_MMU_STEALTH-1) // uint8
#define EEPROM_NOZZLE_DIAMETER (EEPROM_CHECK_MODE-1) // uint8
#define EEPROM_NOZZLE_DIAMETER_uM (EEPROM_NOZZLE_DIAMETER-2) // uint16
// !!!!!
// !!!!! this is end of EEPROM section ... all updates MUST BE inserted before this mark !!!!!
// !!!!!

214
Firmware/first_lay_cal.cpp Normal file
View File

@ -0,0 +1,214 @@
//! @file
//! @date Jun 10, 2019
//! @author Marek Bel
//! @brief First layer (Z offset) calibration
#include "first_lay_cal.h"
#include "Configuration_prusa.h"
#include "language.h"
#include "Marlin.h"
#include "mmu.h"
#include <avr/pgmspace.h>
//! @brief Preheat
void lay1cal_preheat()
{
static const char cmd_preheat_0[] PROGMEM = "M107";
static const char cmd_preheat_1[] PROGMEM = "M104 S" STRINGIFY(PLA_PREHEAT_HOTEND_TEMP);
static const char cmd_preheat_2[] PROGMEM = "M140 S" STRINGIFY(PLA_PREHEAT_HPB_TEMP);
static const char cmd_preheat_3[] PROGMEM = "M190 S" STRINGIFY(PLA_PREHEAT_HPB_TEMP);
static const char cmd_preheat_4[] PROGMEM = "M109 S" STRINGIFY(PLA_PREHEAT_HOTEND_TEMP);
static const char cmd_preheat_5[] PROGMEM = "G28";
static const char cmd_preheat_6[] PROGMEM = "G92 E0.0";
static const char * const preheat_cmd[] PROGMEM =
{
cmd_preheat_0,
cmd_preheat_1,
cmd_preheat_2,
cmd_preheat_3,
cmd_preheat_4,
cmd_preheat_5, //call MSG_M117_V2_CALIBRATION before
cmd_preheat_6,
};
for (uint8_t i = 0; i < (sizeof(preheat_cmd)/sizeof(preheat_cmd[0])); ++i)
{
if (5 == i) enquecommand_P(_T(MSG_M117_V2_CALIBRATION));
enquecommand_P(static_cast<char*>(pgm_read_ptr(&preheat_cmd[i])));
}
}
//! @brief Print intro line
//! @param cmd_buffer character buffer needed to format gcodes
//! @param filament filament to use (applies for MMU only)
void lay1cal_intro_line(char *cmd_buffer, uint8_t filament)
{
static const char cmd_intro_mmu_0[] PROGMEM = "M83";
static const char cmd_intro_mmu_1[] PROGMEM = "G1 Y-3.0 F1000.0";
static const char cmd_intro_mmu_2[] PROGMEM = "G1 Z0.4 F1000.0";
static const char cmd_intro_mmu_3[] PROGMEM = "G1 X55.0 E32.0 F1073.0"; // call T code before
static const char cmd_intro_mmu_4[] PROGMEM = "G1 X5.0 E32.0 F1800.0";
static const char cmd_intro_mmu_5[] PROGMEM = "G1 X55.0 E8.0 F2000.0";
static const char cmd_intro_mmu_6[] PROGMEM = "G1 Z0.3 F1000.0";
static const char cmd_intro_mmu_7[] PROGMEM = "G92 E0.0";
static const char cmd_intro_mmu_8[] PROGMEM = "G1 X240.0 E25.0 F2200.0";
static const char cmd_intro_mmu_9[] PROGMEM = "G1 Y-2.0 F1000.0";
static const char cmd_intro_mmu_10[] PROGMEM = "G1 X55.0 E25 F1400.0";
static const char cmd_intro_mmu_11[] PROGMEM = "G1 Z0.20 F1000.0";
static const char cmd_intro_mmu_12[] PROGMEM = "G1 X5.0 E4.0 F1000.0";
static const char * const intro_mmu_cmd[] PROGMEM =
{
cmd_intro_mmu_0,
cmd_intro_mmu_1,
cmd_intro_mmu_2,
cmd_intro_mmu_3, // call T code before
cmd_intro_mmu_4,
cmd_intro_mmu_5,
cmd_intro_mmu_6,
cmd_intro_mmu_7,
cmd_intro_mmu_8,
cmd_intro_mmu_9,
cmd_intro_mmu_10,
cmd_intro_mmu_11,
cmd_intro_mmu_12,
};
if (mmu_enabled)
{
for (uint8_t i = 0; i < (sizeof(intro_mmu_cmd)/sizeof(intro_mmu_cmd[0])); ++i)
{
if (3 == i)
{
sprintf_P(cmd_buffer, PSTR("T%d"), filament);
enquecommand(cmd_buffer);
}
enquecommand_P(static_cast<char*>(pgm_read_ptr(&intro_mmu_cmd[i])));
}
}
else
{
enquecommand_P(PSTR("G1 X60.0 E9.0 F1000.0"));
enquecommand_P(PSTR("G1 X100.0 E12.5 F1000.0"));
}
}
//! @brief Setup for printing meander
void lay1cal_before_meander()
{
static const char cmd_pre_meander_0[] PROGMEM = "G92 E0.0";
static const char cmd_pre_meander_1[] PROGMEM = "G21"; //set units to millimeters TODO unsupported command
static const char cmd_pre_meander_2[] PROGMEM = "G90"; //use absolute coordinates
static const char cmd_pre_meander_3[] PROGMEM = "M83"; //use relative distances for extrusion TODO: duplicate
static const char cmd_pre_meander_4[] PROGMEM = "G1 E-1.50000 F2100.00000";
static const char cmd_pre_meander_5[] PROGMEM = "G1 Z5 F7200.000";
static const char cmd_pre_meander_6[] PROGMEM = "M204 S1000"; //set acceleration
static const char cmd_pre_meander_7[] PROGMEM = "G1 F4000";
static const char * const cmd_pre_meander[] PROGMEM =
{
cmd_pre_meander_0,
cmd_pre_meander_1,
cmd_pre_meander_2,
cmd_pre_meander_3,
cmd_pre_meander_4,
cmd_pre_meander_5,
cmd_pre_meander_6,
cmd_pre_meander_7,
};
for (uint8_t i = 0; i < (sizeof(cmd_pre_meander)/sizeof(cmd_pre_meander[0])); ++i)
{
enquecommand_P(static_cast<char*>(pgm_read_ptr(&cmd_pre_meander[i])));
}
}
//! @brief Count extrude length
//!
//! @param layer_height layer height in mm
//! @param extrusion_width extrusion width in mm
//! @param extrusion_length extrusion length in mm
//! @return filament length in mm which needs to be extruded to form line
static constexpr float count_e(float layer_height, float extrusion_width, float extrusion_length)
{
return (extrusion_length * layer_height * extrusion_width / (M_PI * pow(1.75, 2) / 4));
}
static const float width = 0.4; //!< line width
static const float length = 20 - width; //!< line length
static const float height = 0.2; //!< layer height TODO This is wrong, as current Z height is 0.15 mm
static const float extr = count_e(height, width, length); //!< E axis movement needed to print line
//! @brief Print meander
//! @param cmd_buffer character buffer needed to format gcodes
void lay1cal_meander(char *cmd_buffer)
{
static const char cmd_meander_0[] PROGMEM = "G1 X50 Y155";
static const char cmd_meander_1[] PROGMEM = "G1 Z0.150 F7200.000";
static const char cmd_meander_2[] PROGMEM = "G1 F1080";
static const char cmd_meander_3[] PROGMEM = "G1 X75 Y155 E2.5";
static const char cmd_meander_4[] PROGMEM = "G1 X100 Y155 E2";
static const char cmd_meander_5[] PROGMEM = "G1 X200 Y155 E2.62773";
static const char cmd_meander_6[] PROGMEM = "G1 X200 Y135 E0.66174";
static const char cmd_meander_7[] PROGMEM = "G1 X50 Y135 E3.62773";
static const char cmd_meander_8[] PROGMEM = "G1 X50 Y115 E0.49386";
static const char cmd_meander_9[] PROGMEM = "G1 X200 Y115 E3.62773";
static const char cmd_meander_10[] PROGMEM = "G1 X200 Y95 E0.49386";
static const char cmd_meander_11[] PROGMEM = "G1 X50 Y95 E3.62773";
static const char cmd_meander_12[] PROGMEM = "G1 X50 Y75 E0.49386";
static const char cmd_meander_13[] PROGMEM = "G1 X200 Y75 E3.62773";
static const char cmd_meander_14[] PROGMEM = "G1 X200 Y55 E0.49386";
static const char cmd_meander_15[] PROGMEM = "G1 X50 Y55 E3.62773";
static const char * const cmd_meander[] PROGMEM =
{
cmd_meander_0,
cmd_meander_1,
cmd_meander_2,
cmd_meander_3,
cmd_meander_4,
cmd_meander_5,
cmd_meander_6,
cmd_meander_7,
cmd_meander_8,
cmd_meander_9,
cmd_meander_10,
cmd_meander_11,
cmd_meander_12,
cmd_meander_13,
cmd_meander_14,
cmd_meander_15,
};
for (uint8_t i = 0; i < (sizeof(cmd_meander)/sizeof(cmd_meander[0])); ++i)
{
enquecommand_P(static_cast<char*>(pgm_read_ptr(&cmd_meander[i])));
}
sprintf_P(cmd_buffer, PSTR("G1 X50 Y35 E%-.3f"), extr);
enquecommand(cmd_buffer);
}
//! @brief Print square
//!
//! This function needs to be called 16 times for i from 0 to 15.
//!
//! @param cmd_buffer character buffer needed to format gcodes
//! @param i iteration
void lay1cal_square(char *cmd_buffer, uint8_t i)
{
const float extr_short_segment = count_e(height, width, width);
static const char fmt1[] PROGMEM = "G1 X%d Y%-.2f E%-.3f";
static const char fmt2[] PROGMEM = "G1 Y%-.2f E%-.3f";
sprintf_P(cmd_buffer, fmt1, 70, (35 - i*width * 2), extr);
enquecommand(cmd_buffer);
sprintf_P(cmd_buffer, fmt2, (35 - (2 * i + 1)*width), extr_short_segment);
enquecommand(cmd_buffer);
sprintf_P(cmd_buffer, fmt1, 50, (35 - (2 * i + 1)*width), extr);
enquecommand(cmd_buffer);
sprintf_P(cmd_buffer, fmt2, (35 - (i + 1)*width * 2), extr_short_segment);
enquecommand(cmd_buffer);
}

15
Firmware/first_lay_cal.h Normal file
View File

@ -0,0 +1,15 @@
//! @file
//! @date Jun 10, 2019
//! @author Marek Bel
#ifndef FIRMWARE_FIRST_LAY_CAL_H_
#define FIRMWARE_FIRST_LAY_CAL_H_
#include <stdint.h>
void lay1cal_preheat();
void lay1cal_intro_line(char *cmd_buffer, uint8_t filament);
void lay1cal_before_meander();
void lay1cal_meander(char *cmd_buffer);
void lay1cal_square(char *cmd_buffer, uint8_t i);
#endif /* FIRMWARE_FIRST_LAY_CAL_H_ */

24
Firmware/mmu.cpp Normal file → Executable file
View File

@ -1076,7 +1076,7 @@ if(0)
extr_unload();
}
else {
eFilamentAction=e_FILAMENT_ACTION_mmuUnLoad;
eFilamentAction=FilamentAction::MmuUnLoad;
bFilamentFirstRun=false;
if(target_temperature[0]>=EXTRUDE_MINTEMP)
{
@ -1372,13 +1372,13 @@ void lcd_mmu_load_to_nozzle(uint8_t filament_nr)
mmu_load_to_nozzle();
load_filament_final_feed();
st_synchronize();
custom_message_type = CUSTOM_MSG_TYPE_F_LOAD;
custom_message_type = CustomMsg::FilamentLoading;
lcd_setstatuspgm(_T(MSG_LOADING_FILAMENT));
lcd_return_to_status();
lcd_update_enable(true);
lcd_load_filament_color_check();
lcd_setstatuspgm(_T(WELCOME_MSG));
custom_message_type = CUSTOM_MSG_TYPE_STATUS;
custom_message_type = CustomMsg::Status;
}
else
{
@ -1511,20 +1511,20 @@ void mmu_continue_loading(bool blocking)
enum class Ls : uint_least8_t
{
enter,
retry,
unload,
Enter,
Retry,
Unload,
};
Ls state = Ls::enter;
Ls state = Ls::Enter;
while (PIN_GET(IR_SENSOR_PIN) != 0)
{
switch (state)
{
case Ls::enter:
case Ls::Enter:
increment_load_fail();
// no break
case Ls::retry:
case Ls::Retry:
#ifdef MMU_HAS_CUTTER
if (1 == eeprom_read_byte((uint8_t*)EEPROM_MMU_CUTTER_ENABLED))
{
@ -1535,9 +1535,9 @@ void mmu_continue_loading(bool blocking)
mmu_command(MmuCmd::T0 + tmp_extruder);
manage_response(true, true, MMU_TCODE_MOVE);
load_more();
state = Ls::unload;
state = Ls::Unload;
break;
case Ls::unload:
case Ls::Unload:
stop_and_save_print_to_ram(0, 0);
//lift z
@ -1562,7 +1562,7 @@ void mmu_continue_loading(bool blocking)
{
marlin_wait_for_click();
restore_print_from_ram_and_continue(0);
state = Ls::retry;
state = Ls::Retry;
}
else
{

View File

@ -434,7 +434,7 @@ static void temp_runaway_stop(bool isPreheat, bool isBed);
void updatePID()
{
#ifdef PIDTEMP
for(int e = 0; e < EXTRUDERS; e++) {
for(uint_least8_t e = 0; e < EXTRUDERS; e++) {
iState_sum_max[e] = PID_INTEGRAL_DRIVE_MAX / cs.Ki;
}
#endif
@ -2053,8 +2053,8 @@ void check_max_temp()
struct alert_automaton_mintemp {
private:
enum { ALERT_AUTOMATON_SPEED_DIV = 5 };
enum class States : uint8_t { INIT = 0, TEMP_ABOVE_MINTEMP, SHOW_PLEASE_RESTART, SHOW_MINTEMP };
States state = States::INIT;
enum class States : uint8_t { Init = 0, TempAboveMintemp, ShowPleaseRestart, ShowMintemp };
States state = States::Init;
uint8_t repeat = ALERT_AUTOMATON_SPEED_DIV;
void substep(States next_state){
@ -2073,26 +2073,26 @@ public:
static const char m2[] PROGMEM = "MINTEMP fixed";
static const char m1[] PROGMEM = "Please restart";
switch(state){
case States::INIT: // initial state - check hysteresis
case States::Init: // initial state - check hysteresis
if( current_temp > mintemp ){
state = States::TEMP_ABOVE_MINTEMP;
state = States::TempAboveMintemp;
}
// otherwise keep the Err MINTEMP alert message on the display,
// i.e. do not transfer to state 1
break;
case States::TEMP_ABOVE_MINTEMP: // the temperature has risen above the hysteresis check
case States::TempAboveMintemp: // the temperature has risen above the hysteresis check
lcd_setalertstatuspgm(m2);
substep(States::SHOW_MINTEMP);
substep(States::ShowMintemp);
last_alert_sent_to_lcd = LCDALERT_MINTEMPFIXED;
break;
case States::SHOW_PLEASE_RESTART: // displaying "Please restart"
case States::ShowPleaseRestart: // displaying "Please restart"
lcd_updatestatuspgm(m1);
substep(States::SHOW_MINTEMP);
substep(States::ShowMintemp);
last_alert_sent_to_lcd = LCDALERT_PLEASERESTART;
break;
case States::SHOW_MINTEMP: // displaying "MINTEMP fixed"
case States::ShowMintemp: // displaying "MINTEMP fixed"
lcd_updatestatuspgm(m2);
substep(States::SHOW_PLEASE_RESTART);
substep(States::ShowPleaseRestart);
last_alert_sent_to_lcd = LCDALERT_MINTEMPFIXED;
break;
}

10
Firmware/tmc2130.cpp Normal file → Executable file
View File

@ -158,7 +158,7 @@ void tmc2130_init()
SET_INPUT(Y_TMC2130_DIAG);
SET_INPUT(Z_TMC2130_DIAG);
SET_INPUT(E0_TMC2130_DIAG);
for (int axis = 0; axis < 2; axis++) // X Y axes
for (uint_least8_t axis = 0; axis < 2; axis++) // X Y axes
{
tmc2130_setup_chopper(axis, tmc2130_mres[axis], tmc2130_current_h[axis], tmc2130_current_r[axis]);
tmc2130_wr(axis, TMC2130_REG_TPOWERDOWN, 0x00000000);
@ -169,7 +169,7 @@ void tmc2130_init()
tmc2130_wr_TPWMTHRS(axis, TMC2130_TPWMTHRS);
//tmc2130_wr_THIGH(axis, TMC2130_THIGH);
}
for (int axis = 2; axis < 3; axis++) // Z axis
for (uint_least8_t axis = 2; axis < 3; axis++) // Z axis
{
tmc2130_setup_chopper(axis, tmc2130_mres[axis], tmc2130_current_h[axis], tmc2130_current_r[axis]);
tmc2130_wr(axis, TMC2130_REG_TPOWERDOWN, 0x00000000);
@ -183,7 +183,7 @@ void tmc2130_init()
tmc2130_wr_TPWMTHRS(axis, TMC2130_TPWMTHRS);
#endif //TMC2130_STEALTH_Z
}
for (int axis = 3; axis < 4; axis++) // E axis
for (uint_least8_t axis = 3; axis < 4; axis++) // E axis
{
tmc2130_setup_chopper(axis, tmc2130_mres[axis], tmc2130_current_h[axis], tmc2130_current_r[axis]);
tmc2130_wr(axis, TMC2130_REG_TPOWERDOWN, 0x00000000);
@ -383,7 +383,7 @@ void tmc2130_check_overtemp()
static uint32_t checktime = 0;
if (_millis() - checktime > 1000 )
{
for (int i = 0; i < 4; i++)
for (uint_least8_t i = 0; i < 4; i++)
{
uint32_t drv_status = 0;
skip_debug_msg = true;
@ -392,7 +392,7 @@ void tmc2130_check_overtemp()
{ // BIT 26 - over temp prewarning ~120C (+-20C)
SERIAL_ERRORRPGM(MSG_TMC_OVERTEMP);
SERIAL_ECHOLN(i);
for (int j = 0; j < 4; j++)
for (uint_least8_t j = 0; j < 4; j++)
tmc2130_wr(j, TMC2130_REG_CHOPCONF, 0x00010000);
kill(MSG_TMC_OVERTEMP);
}

File diff suppressed because it is too large Load Diff

61
Firmware/ultralcd.h Normal file → Executable file
View File

@ -89,31 +89,37 @@ extern void lcd_diag_show_end_stops();
// To be used in lcd_commands_type.
#define LCD_COMMAND_IDLE 0
#define LCD_COMMAND_LOAD_FILAMENT 1
#define LCD_COMMAND_STOP_PRINT 2
#define LCD_COMMAND_FARM_MODE_CONFIRM 4
#define LCD_COMMAND_LONG_PAUSE 5
#define LCD_COMMAND_PID_EXTRUDER 7
#define LCD_COMMAND_V2_CAL 8
enum class LcdCommands : uint_least8_t
{
Idle,
LoadFilament,
StopPrint,
FarmModeConfirm,
LongPause,
PidExtruder,
Layer1Cal,
};
extern int lcd_commands_type;
extern LcdCommands lcd_commands_type;
extern int8_t FSensorStateMenu;
#define CUSTOM_MSG_TYPE_STATUS 0 // status message from lcd_status_message variable
#define CUSTOM_MSG_TYPE_MESHBL 1 // Mesh bed leveling in progress
#define CUSTOM_MSG_TYPE_F_LOAD 2 // Loading filament in progress
#define CUSTOM_MSG_TYPE_PIDCAL 3 // PID tuning in progress
#define CUSTOM_MSG_TYPE_TEMCAL 4 // PINDA temp calibration
#define CUSTOM_MSG_TYPE_TEMPRE 5 // Temp compensation preheat
enum class CustomMsg : uint_least8_t
{
Status, //!< status message from lcd_status_message variable
MeshBedLeveling, //!< Mesh bed leveling in progress
FilamentLoading, //!< Loading filament in progress
PidCal, //!< PID tuning in progress
TempCal, //!< PINDA temperature calibration
TempCompPreheat, //!< Temperature compensation preheat
};
extern unsigned int custom_message_type;
extern CustomMsg custom_message_type;
extern unsigned int custom_message_state;
extern uint8_t farm_mode;
extern int farm_no;
extern int farm_timer;
extern int farm_status;
extern uint8_t farm_status;
#ifdef TMC2130
#define SILENT_MODE_NORMAL 0
@ -145,18 +151,19 @@ void extr_unload_used();
#endif //SNMM
void extr_unload();
typedef enum
enum class FilamentAction : uint_least8_t
{
e_FILAMENT_ACTION_none, //!< 'none' state is used as flag for (filament) autoLoad (i.e. opposite for 'autoLoad' state)
e_FILAMENT_ACTION_Load,
e_FILAMENT_ACTION_autoLoad,
e_FILAMENT_ACTION_unLoad,
e_FILAMENT_ACTION_mmuLoad,
e_FILAMENT_ACTION_mmuUnLoad,
e_FILAMENT_ACTION_mmuEject,
e_FILAMENT_ACTION_mmuCut,
} eFILAMENT_ACTION;
extern eFILAMENT_ACTION eFilamentAction;
None, //!< 'none' state is used as flag for (filament) autoLoad (i.e. opposite for 'autoLoad' state)
Load,
AutoLoad,
UnLoad,
MmuLoad,
MmuUnLoad,
MmuEject,
MmuCut,
};
extern FilamentAction eFilamentAction;
extern bool bFilamentFirstRun;
extern bool bFilamentPreheatState;
extern bool bFilamentAction;

View File

@ -304,7 +304,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
_tone(BEEPER, 1000);
delay_keep_alive(50);
_noTone(BEEPER);
lcd_wait_for_click();
lcd_wait_for_click_delay(30);
lcd_update_enable(true);
lcd_clear();
lcd_update(0);
@ -327,3 +327,46 @@ void update_current_firmware_version_to_eeprom()
eeprom_update_word((uint16_t*)EEPROM_FIRMWARE_VERSION_FLAVOR, ver_current[3]);
}
}
//-//
eNOZZLE_DIAMETER eNozzleDiameter=e_NOZZLE_DIAMETER_400;
eCHECK_MODE eCheckMode=e_CHECK_MODE_none;
void fCheckModeInit()
{
eCheckMode=(eCHECK_MODE)eeprom_read_byte((uint8_t*)EEPROM_CHECK_MODE);
if(eCheckMode==e_CHECK_MODE_NULL)
{
eCheckMode=e_CHECK_MODE_warn;
eeprom_update_byte((uint8_t*)EEPROM_CHECK_MODE,(uint8_t)eCheckMode);
}
if(farm_mode)
eCheckMode=e_CHECK_MODE_strict;
eNozzleDiameter=(eNOZZLE_DIAMETER)eeprom_read_byte((uint8_t*)EEPROM_NOZZLE_DIAMETER);
if((eNozzleDiameter==e_NOZZLE_DIAMETER_NULL)&& !farm_mode)
{
eNozzleDiameter=e_NOZZLE_DIAMETER_400;
eeprom_update_byte((uint8_t*)EEPROM_NOZZLE_DIAMETER,(uint8_t)eNozzleDiameter);
eeprom_update_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM,400);
}
}
void nozzle_diameter_check(uint16_t nDiameter)
{
uint16_t nDiameter_um;
nDiameter_um=eeprom_read_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM);
if(nDiameter==nDiameter_um)
return;
switch(eCheckMode)
{
case e_CHECK_MODE_warn:
lcd_show_fullscreen_message_and_wait_P(_i("Nozzle diameter doesn't match! Press the knob to continue."));
break;
case e_CHECK_MODE_strict:
lcd_show_fullscreen_message_and_wait_P(_i("Nozzle diameter doesn't match! Print is aborted, press the knob."));
lcd_print_stop();
break;
}
}

View File

@ -33,4 +33,29 @@ inline void eeprom_update_int8(unsigned char* addr, int8_t v) {
eeprom_update_byte(addr, *reinterpret_cast<uint8_t*>(&v));
}
//-//
#define e_CHECK_MODE_NULL 0xFF
#define e_NOZZLE_DIAMETER_NULL 0xFF
typedef enum
{
e_NOZZLE_DIAMETER_250,
e_NOZZLE_DIAMETER_400,
e_NOZZLE_DIAMETER_600
} eNOZZLE_DIAMETER;
typedef enum
{
e_CHECK_MODE_none,
e_CHECK_MODE_warn,
e_CHECK_MODE_strict
} eCHECK_MODE;
extern eNOZZLE_DIAMETER eNozzleDiameter;
extern eCHECK_MODE eCheckMode;
void fCheckModeInit();
void nozzle_diameter_check(uint16_t nDiameter);
#endif /* UTIL_H */

View File

@ -315,7 +315,7 @@ PREHEAT SETTINGS
*------------------------------------*/
#define FARM_PREHEAT_HOTEND_TEMP 250
#define FARM_PREHEAT_HPB_TEMP 40
#define FARM_PREHEAT_HPB_TEMP 80
#define FARM_PREHEAT_FAN_SPEED 0
#define PLA_PREHEAT_HOTEND_TEMP 215
@ -438,6 +438,7 @@ THERMISTORS SETTINGS
// Safety timer
#define SAFETYTIMER
#define DEFAULT_SAFETYTIMER_TIME_MINS 30
#define FARM_DEFAULT_SAFETYTIMER_TIME_ms (45*60*1000ul)
#define M600_TIMEOUT 600 //seconds

View File

@ -314,7 +314,7 @@ PREHEAT SETTINGS
*------------------------------------*/
#define FARM_PREHEAT_HOTEND_TEMP 250
#define FARM_PREHEAT_HPB_TEMP 40
#define FARM_PREHEAT_HPB_TEMP 80
#define FARM_PREHEAT_FAN_SPEED 0
#define PLA_PREHEAT_HOTEND_TEMP 215
@ -437,6 +437,7 @@ THERMISTORS SETTINGS
// Safety timer
#define SAFETYTIMER
#define DEFAULT_SAFETYTIMER_TIME_MINS 30
#define FARM_DEFAULT_SAFETYTIMER_TIME_ms (45*60*1000ul)
#define M600_TIMEOUT 600 //seconds

View File

@ -112,6 +112,7 @@
// Safety timer
#define SAFETYTIMER
#define DEFAULT_SAFETYTIMER_TIME_MINS 30
#define FARM_DEFAULT_SAFETYTIMER_TIME_ms (45*60*1000ul)
// Filament sensor
#define FILAMENT_SENSOR
@ -371,7 +372,7 @@
*------------------------------------*/
#define FARM_PREHEAT_HOTEND_TEMP 250
#define FARM_PREHEAT_HPB_TEMP 40
#define FARM_PREHEAT_HPB_TEMP 80
#define FARM_PREHEAT_FAN_SPEED 0
#define PLA_PREHEAT_HOTEND_TEMP 215

View File

@ -113,6 +113,7 @@
// Safety timer
#define SAFETYTIMER
#define DEFAULT_SAFETYTIMER_TIME_MINS 30
#define FARM_DEFAULT_SAFETYTIMER_TIME_ms (45*60*1000ul)
// Filament sensor
#define FILAMENT_SENSOR
@ -372,7 +373,7 @@
*------------------------------------*/
#define FARM_PREHEAT_HOTEND_TEMP 250
#define FARM_PREHEAT_HPB_TEMP 40
#define FARM_PREHEAT_HPB_TEMP 80
#define FARM_PREHEAT_FAN_SPEED 0
#define PLA_PREHEAT_HOTEND_TEMP 215

View File

@ -112,6 +112,7 @@
// Safety timer
#define SAFETYTIMER
#define DEFAULT_SAFETYTIMER_TIME_MINS 30
#define FARM_DEFAULT_SAFETYTIMER_TIME_ms (45*60*1000ul)
// Filament sensor
#define FILAMENT_SENSOR
@ -371,7 +372,7 @@
*------------------------------------*/
#define FARM_PREHEAT_HOTEND_TEMP 250
#define FARM_PREHEAT_HPB_TEMP 40
#define FARM_PREHEAT_HPB_TEMP 80
#define FARM_PREHEAT_FAN_SPEED 0
#define PLA_PREHEAT_HOTEND_TEMP 215

View File

@ -113,6 +113,7 @@
// Safety timer
#define SAFETYTIMER
#define DEFAULT_SAFETYTIMER_TIME_MINS 30
#define FARM_DEFAULT_SAFETYTIMER_TIME_ms (45*60*1000ul)
// Filament sensor
#define FILAMENT_SENSOR
@ -372,7 +373,7 @@
*------------------------------------*/
#define FARM_PREHEAT_HOTEND_TEMP 250
#define FARM_PREHEAT_HPB_TEMP 40
#define FARM_PREHEAT_HPB_TEMP 80
#define FARM_PREHEAT_FAN_SPEED 0
#define PLA_PREHEAT_HOTEND_TEMP 215

View File

@ -131,6 +131,7 @@
// Safety timer
#define SAFETYTIMER
#define DEFAULT_SAFETYTIMER_TIME_MINS 30
#define FARM_DEFAULT_SAFETYTIMER_TIME_ms (45*60*1000ul)
// Filament sensor
#define FILAMENT_SENSOR
@ -480,7 +481,7 @@
*------------------------------------*/
#define FARM_PREHEAT_HOTEND_TEMP 250
#define FARM_PREHEAT_HPB_TEMP 60
#define FARM_PREHEAT_HPB_TEMP 80
#define FARM_PREHEAT_FAN_SPEED 0
#define PLA_PREHEAT_HOTEND_TEMP 215

View File

@ -131,6 +131,7 @@
// Safety timer
#define SAFETYTIMER
#define DEFAULT_SAFETYTIMER_TIME_MINS 30
#define FARM_DEFAULT_SAFETYTIMER_TIME_ms (45*60*1000ul)
// Filament sensor
#define FILAMENT_SENSOR
@ -480,7 +481,7 @@
*------------------------------------*/
#define FARM_PREHEAT_HOTEND_TEMP 250
#define FARM_PREHEAT_HPB_TEMP 60
#define FARM_PREHEAT_HPB_TEMP 80
#define FARM_PREHEAT_FAN_SPEED 0
#define PLA_PREHEAT_HOTEND_TEMP 215

View File

@ -38,7 +38,7 @@ def parse_txt(lang, no_warning):
if rows is None:
rows = 1
if len(translation) > cols*rows:
if len(translation)-2 > cols*rows:
stderr.write(
"[E]: Text %s is longer then definiton on line %d\n" %
(translation, lines))
@ -56,7 +56,7 @@ def main():
usage="$(prog)s lang")
parser.add_argument(
"lang", nargs='?', default="en", type=str,
help="Check lang file (en|cs|de|es|fr|it)")
help="Check lang file (en|cs|de|es|fr|it|pl)")
parser.add_argument(
"--no-warning", action="store_true",
help="Disable warnings")