Merge pull request #3079 from 3d-gussner/PFW-1189

PFW-1189 Pre-release tasks
This commit is contained in:
DRracer 2021-04-29 16:33:18 +02:00 committed by GitHub
commit 80e248662c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 12014 additions and 15677 deletions

View File

@ -642,7 +642,7 @@ void crashdet_detected(uint8_t mask)
enquecommand_P(PSTR("CRASH_RECOVER"));
}else{
setTargetHotend(0, active_extruder);
bool yesno = lcd_show_fullscreen_message_yes_no_and_wait_P(_i("Crash detected. Resume print?"), false);
bool yesno = lcd_show_fullscreen_message_yes_no_and_wait_P(_i("Crash detected. Resume print?"), false);////MSG_CRASH_RESUME c=20 r=3
lcd_update_enable(true);
if (yesno)
{
@ -866,14 +866,14 @@ static void check_if_fw_is_on_right_printer(){
if((PRINTER_TYPE == PRINTER_MK3) || (PRINTER_TYPE == PRINTER_MK3S)){
#ifdef IR_SENSOR
if (pat9125_probe()){
lcd_show_fullscreen_message_and_wait_P(_i("MK3S firmware detected on MK3 printer"));}////c=20 r=3
lcd_show_fullscreen_message_and_wait_P(_i("MK3S firmware detected on MK3 printer"));}////MSG_MK3S_FIRMWARE_ON_MK3 c=20 r=4
#endif //IR_SENSOR
#ifdef PAT9125
//will return 1 only if IR can detect filament in bondtech extruder so this may fail even when we have IR sensor
const uint8_t ir_detected = !READ(IR_SENSOR_PIN);
if (ir_detected){
lcd_show_fullscreen_message_and_wait_P(_i("MK3 firmware detected on MK3S printer"));}////c=20 r=3
lcd_show_fullscreen_message_and_wait_P(_i("MK3 firmware detected on MK3S printer"));}////MSG_MK3_FIRMWARE_ON_MK3S c=20 r=4
#endif //PAT9125
}
#endif //FILAMENT_SENSOR
@ -1540,7 +1540,7 @@ void setup()
}
if (!previous_settings_retrieved) {
lcd_show_fullscreen_message_and_wait_P(_i("Old settings found. Default PID, Esteps etc. will be set.")); //if EEPROM version or printer type was changed, inform user that default setting were loaded////MSG_DEFAULT_SETTINGS_LOADED c=20 r=5
lcd_show_fullscreen_message_and_wait_P(_i("Old settings found. Default PID, Esteps etc. will be set.")); //if EEPROM version or printer type was changed, inform user that default setting were loaded////MSG_DEFAULT_SETTINGS_LOADED c=20 r=6
Config_StoreSettings();
}
if (eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE) >= 1) {
@ -3430,15 +3430,11 @@ bool gcode_M45(bool onlyZ, int8_t verbosity_level)
lcd_show_fullscreen_message_and_wait_P(_T(MSG_CONFIRM_NOZZLE_CLEAN));
if(onlyZ){
lcd_display_message_fullscreen_P(_T(MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE1));
lcd_set_cursor(0, 3);
lcd_print(1);
lcd_puts_P(_T(MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE2));
lcd_puts_at_P(0,3,_n("1/9"));
}else{
//lcd_show_fullscreen_message_and_wait_P(_T(MSG_PAPER));
lcd_display_message_fullscreen_P(_T(MSG_FIND_BED_OFFSET_AND_SKEW_LINE1));
lcd_set_cursor(0, 2);
lcd_print(1);
lcd_puts_P(_T(MSG_FIND_BED_OFFSET_AND_SKEW_LINE2));
lcd_puts_at_P(0,3,_n("1/4"));
}
refresh_cmd_timeout();
@ -3458,9 +3454,7 @@ bool gcode_M45(bool onlyZ, int8_t verbosity_level)
lcd_show_fullscreen_message_and_wait_P(_T(MSG_PAPER));
KEEPALIVE_STATE(IN_HANDLER);
lcd_display_message_fullscreen_P(_T(MSG_FIND_BED_OFFSET_AND_SKEW_LINE1));
lcd_set_cursor(0, 2);
lcd_print(1);
lcd_puts_P(_T(MSG_FIND_BED_OFFSET_AND_SKEW_LINE2));
lcd_puts_at_P(0,3,_n("1/4"));
}
bool endstops_enabled = enable_endstops(false);
@ -3694,7 +3688,7 @@ static void gcode_M600(bool automatic, float x_position, float y_position, float
current_position[X_AXIS] -= 100;
plan_buffer_line_curposXYZE(FILAMENTCHANGE_XYFEED);
st_synchronize();
lcd_show_fullscreen_message_and_wait_P(_i("Please open idler and remove filament manually."));////MSG_CHECK_IDLER c=20 r=4
lcd_show_fullscreen_message_and_wait_P(_i("Please open idler and remove filament manually."));////MSG_CHECK_IDLER c=20 r=5
}
}
@ -3967,7 +3961,6 @@ static void extended_capabilities_report()
cap_line(PSTR("AUTOREPORT_POSITION"), ENABLED(AUTO_REPORT));
// EXTENDED_M20 (support for L and T parameters)
cap_line(PSTR("EXTENDED_M20"), 1);
//@todo Update RepRap cap
}
#endif //EXTENDED_CAPABILITIES_REPORT
@ -4229,7 +4222,7 @@ void process_commands()
if (!hasP && !hasS && *src != '\0') {
lcd_setstatus(src);
} else {
LCD_MESSAGERPGM(_i("Wait for user..."));////MSG_USERWAIT
LCD_MESSAGERPGM(_i("Wait for user..."));////MSG_USERWAIT c=20
}
lcd_ignore_click(); //call lcd_ignore_click aslo for else ???
st_synchronize();
@ -5728,7 +5721,7 @@ if(eSoundMode!=e_SOUND_MODE_SILENT)
*/
case 17:
LCD_MESSAGERPGM(_i("No move."));////MSG_NO_MOVE
LCD_MESSAGERPGM(_i("No move."));////MSG_NO_MOVE c=20
enable_x();
enable_y();
enable_z();
@ -6399,7 +6392,6 @@ Sigma_Exit:
- `C` - Time to change/pause/user interaction in normal mode
- `D` - Time to change/pause/user interaction in silent mode
*/
//!@todo update RepRap Gcode wiki
case 73: //M73 show percent done, time remaining and time to change/pause
{
if(code_seen('P')) print_percent_done_normal = code_value();
@ -6518,8 +6510,6 @@ Sigma_Exit:
bit 6 = free
bit 7 = free
*/
//!@todo update RepRap Gcode wiki
//!@todo Should be temperature always? Octoprint doesn't switch to M105 if M155 timer is set
case 155:
{
if (code_seen('S')){
@ -7072,7 +7062,7 @@ Sigma_Exit:
#if (defined(FANCHECK) && (((defined(TACH_0) && (TACH_0 >-1)) || (defined(TACH_1) && (TACH_1 > -1)))))
/*!
### M123 - Tachometer value <a href="https://www.reprap.org/wiki/G-code#M123:_Tachometer_value_.28RepRap.29">M123: Tachometer value</a>
### M123 - Tachometer value <a href="https://www.reprap.org/wiki/G-code#M123:_Tachometer_value_.28RepRap_.26_Prusa.29">M123: Tachometer value</a>
This command is used to report fan speeds and fan pwm values.
#### Usage
@ -7088,7 +7078,6 @@ Sigma_Exit:
E0:3240 RPM PRN1:4560 RPM E0@:255 PRN1@:255
*/
//!@todo Update RepRap Gcode wiki
case 123:
gcode_M123();
break;
@ -9684,7 +9673,7 @@ static void handleSafetyTimer()
{
setTargetBed(0);
setAllTargetHotends(0);
lcd_show_fullscreen_message_and_wait_P(_i("Heating disabled by safety timer."));////MSG_BED_HEATING_SAFETY_DISABLED
lcd_show_fullscreen_message_and_wait_P(_i("Heating disabled by safety timer."));////MSG_BED_HEATING_SAFETY_DISABLED c=20 r=4
}
}
#endif //SAFETYTIMER
@ -9763,7 +9752,7 @@ static uint16_t nFSCheckCount=0;
if( minVolt >= IRsensor_Ldiode_TRESHOLD && minVolt <= IRsensor_Lmax_TRESHOLD
&& maxVolt >= IRsensor_Hmin_TRESHOLD && maxVolt <= IRsensor_Hopen_TRESHOLD
){
manage_inactivity_IR_ANALOG_Check(nFSCheckCount, ClFsensorPCB::_Old, ClFsensorPCB::_Rev04, _i("FS v0.4 or newer") ); ////c=18
manage_inactivity_IR_ANALOG_Check(nFSCheckCount, ClFsensorPCB::_Old, ClFsensorPCB::_Rev04, _i("FS v0.4 or newer") ); ////MSG_FS_V_04_OR_NEWER c=18
}
//! If and only if minVolt is in range <0.0, 0.3> and maxVolt is in range <4.6, 5.0V>, I'm considering a situation with the old fsensor
//! Note, we are not relying on one voltage here - getting just +5V can mean an old fsensor or a broken new sensor - that's why
@ -9771,7 +9760,7 @@ static uint16_t nFSCheckCount=0;
else if( minVolt < IRsensor_Ldiode_TRESHOLD
&& maxVolt > IRsensor_Hopen_TRESHOLD && maxVolt <= IRsensor_VMax_TRESHOLD
){
manage_inactivity_IR_ANALOG_Check(nFSCheckCount, ClFsensorPCB::_Rev04, oFsensorPCB=ClFsensorPCB::_Old, _i("FS v0.3 or older")); ////c=18
manage_inactivity_IR_ANALOG_Check(nFSCheckCount, ClFsensorPCB::_Rev04, oFsensorPCB=ClFsensorPCB::_Old, _i("FS v0.3 or older")); ////MSG_FS_V_03_OR_OLDER c=18
}
#endif // IR_SENSOR_ANALOG
if (fsensor_check_autoload())
@ -11149,7 +11138,7 @@ void recover_print(uint8_t automatic) {
char cmd[30];
lcd_update_enable(true);
lcd_update(2);
lcd_setstatuspgm(_i("Recovering print "));////MSG_RECOVERING_PRINT c=20
lcd_setstatuspgm(_i("Recovering print"));////MSG_RECOVERING_PRINT c=20
// Recover position, temperatures and extrude_multipliers
bool mbl_was_active = recover_machine_state_after_power_panic();

View File

@ -21,8 +21,6 @@
#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
#endif
#define MSG_FW_VERSION "Firmware"
#if (LANG_MODE == 0) //primary language only
#define PROGMEM_I2 __attribute__((section(".progmem0")))
#define PROGMEM_I1 __attribute__((section(".progmem1")))

View File

@ -2231,10 +2231,7 @@ BedSkewOffsetDetectionResultType find_bed_offset_and_skew(int8_t verbosity_level
}
#endif // SUPPORT_VERBOSITY
#ifdef MESH_BED_CALIBRATION_SHOW_LCD
uint8_t next_line;
lcd_display_message_fullscreen_P(_T(MSG_FIND_BED_OFFSET_AND_SKEW_LINE1), next_line);
if (next_line > 3)
next_line = 3;
lcd_display_message_fullscreen_P(_T(MSG_FIND_BED_OFFSET_AND_SKEW_LINE1));
#endif /* MESH_BED_CALIBRATION_SHOW_LCD */
// Collect the rear 2x3 points.
@ -2249,13 +2246,11 @@ BedSkewOffsetDetectionResultType find_bed_offset_and_skew(int8_t verbosity_level
// Don't let the manage_inactivity() function remove power from the motors.
refresh_cmd_timeout();
#ifdef MESH_BED_CALIBRATION_SHOW_LCD
lcd_set_cursor(0, next_line);
lcd_print(k + 1);
lcd_puts_P(_T(MSG_FIND_BED_OFFSET_AND_SKEW_LINE2));
lcd_set_cursor(0, 3);
lcd_printf_P(PSTR("%d/4"),(k+1));
if (iteration > 0) {
lcd_puts_at_P(0, next_line + 1, _i("Iteration "));////MSG_FIND_BED_OFFSET_AND_SKEW_ITERATION c=20
lcd_print(int(iteration + 1));
lcd_printf_P(PSTR(" %S %d/1"),_T(MSG_ITERATION),int(iteration + 1));
}
#endif /* MESH_BED_CALIBRATION_SHOW_LCD */
float *pt = pts + k * 2;
@ -2533,10 +2528,7 @@ BedSkewOffsetDetectionResultType improve_bed_offset_and_skew(int8_t method, int8
bool endstop_z_enabled = enable_z_endstop(false);
#ifdef MESH_BED_CALIBRATION_SHOW_LCD
uint8_t next_line;
lcd_display_message_fullscreen_P(_i("Improving bed calibration point"), next_line);////MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE1 c=60
if (next_line > 3)
next_line = 3;
lcd_display_message_fullscreen_P(_i("Improving bed calibration point"));////MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE1 c=60
#endif /* MESH_BED_CALIBRATION_SHOW_LCD */
// Collect a matrix of 9x9 points.
@ -2546,9 +2538,8 @@ BedSkewOffsetDetectionResultType improve_bed_offset_and_skew(int8_t method, int8
refresh_cmd_timeout();
// Print the decrasing ID of the measurement point.
#ifdef MESH_BED_CALIBRATION_SHOW_LCD
lcd_set_cursor(0, next_line);
lcd_print(mesh_point+1);
lcd_puts_P(_T(MSG_FIND_BED_OFFSET_AND_SKEW_LINE2));////MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE2 c=14
lcd_set_cursor(0, 3);
lcd_printf_P(PSTR("%d/4"),mesh_point+1);
#endif /* MESH_BED_CALIBRATION_SHOW_LCD */
// Move up.
@ -2846,14 +2837,9 @@ bool sample_mesh_and_store_reference()
refresh_cmd_timeout();
#ifdef MESH_BED_CALIBRATION_SHOW_LCD
uint8_t next_line;
lcd_display_message_fullscreen_P(_T(MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE1), next_line);
if (next_line > 3)
next_line = 3;
lcd_display_message_fullscreen_P(_T(MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE1));
// display "point xx of yy"
lcd_set_cursor(0, next_line);
lcd_print(1);
lcd_puts_P(_T(MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE2));
lcd_puts_at_P(0,3,_n("1/9"));
#endif /* MESH_BED_CALIBRATION_SHOW_LCD */
// Sample Z heights for the mesh bed leveling.
@ -2901,9 +2887,8 @@ bool sample_mesh_and_store_reference()
go_to_current(homing_feedrate[X_AXIS]/60);
#ifdef MESH_BED_CALIBRATION_SHOW_LCD
// display "point xx of yy"
lcd_set_cursor(0, next_line);
lcd_print(mesh_point+1);
lcd_puts_P(_T(MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE2));
lcd_set_cursor(0, 3);
lcd_printf_P(PSTR("%d/9"),mesh_point+1);
#endif /* MESH_BED_CALIBRATION_SHOW_LCD */
if (!find_bed_induction_sensor_point_z()) //Z crash or deviation > 50um
{

View File

@ -8,30 +8,31 @@
#include "Configuration_prusa.h"
//internationalized messages
const char MSG_AUTO_HOME[] PROGMEM_I1 = ISTR("Auto home"); ////
const char MSG_BABYSTEP_Z[] PROGMEM_I1 = ISTR("Live adjust Z"); //// c=18
const char MSG_AUTO_HOME[] PROGMEM_I1 = ISTR("Auto home"); ////c=18
const char MSG_BABYSTEP_Z[] PROGMEM_I1 = ISTR("Live adjust Z"); ////c=18
const char MSG_BABYSTEP_Z_NOT_SET[] PROGMEM_I1 = ISTR("Distance between tip of the nozzle and the bed surface has not been set yet. Please follow the manual, chapter First steps, section First layer calibration."); ////c=20 r=12
const char MSG_BED[] PROGMEM_I1 = ISTR("Bed"); ////
const char MSG_BED_DONE[] PROGMEM_I1 = ISTR("Bed done"); ////
const char MSG_BED_HEATING[] PROGMEM_I1 = ISTR("Bed Heating"); ////
const char MSG_BED_LEVELING_FAILED_POINT_LOW[] PROGMEM_I1 = ISTR("Bed leveling failed. Sensor didnt trigger. Debris on nozzle? Waiting for reset."); ////c=20 r=5
const char MSG_BED[] PROGMEM_I1 = ISTR("Bed"); ////c=13
const char MSG_BED_DONE[] PROGMEM_I1 = ISTR("Bed done"); ////c=20
const char MSG_BED_HEATING[] PROGMEM_I1 = ISTR("Bed Heating"); ////c=20
const char MSG_BED_LEVELING_FAILED_POINT_LOW[] PROGMEM_I1 = ISTR("Bed leveling failed. Sensor didn't trigger. Debris on nozzle? Waiting for reset."); ////c=20 r=6
const char MSG_BED_SKEW_OFFSET_DETECTION_FITTING_FAILED[] PROGMEM_I1 = ISTR("XYZ calibration failed. Please consult the manual."); ////c=20 r=8
const char MSG_BELT_STATUS[] PROGMEM_I1 = ISTR("Belt status");////c=18
const char MSG_CANCEL[] PROGMEM_I1 = ISTR(">Cancel");////c=9
const char MSG_CALIBRATE_Z_AUTO[] PROGMEM_I1 = ISTR("Calibrating Z"); ////c=20 r=2
const char MSG_CARD_MENU[] PROGMEM_I1 = ISTR("Print from SD"); ////
const char MSG_CARD_MENU[] PROGMEM_I1 = ISTR("Print from SD"); ////c=18
const char MSG_CHECKING_X[] PROGMEM_I1 = ISTR("Checking X axis"); ////c=20
const char MSG_CHECKING_Y[] PROGMEM_I1 = ISTR("Checking Y axis"); ////c=20
const char MSG_COMMUNITY_MADE[] PROGMEM_I1 = ISTR("Community made"); ////c=18
const char MSG_CONFIRM_NOZZLE_CLEAN[] PROGMEM_I1 = ISTR("Please clean the nozzle for calibration. Click when done."); ////c=20 r=8
const char MSG_COOLDOWN[] PROGMEM_I1 = ISTR("Cooldown"); ////
const char MSG_COOLDOWN[] PROGMEM_I1 = ISTR("Cooldown"); ////c=18
const char MSG_CRASH[] PROGMEM_I1 = ISTR("Crash"); ////c=7
const char MSG_CRASH_DETECTED[] PROGMEM_I1 = ISTR("Crash detected."); ////c=20 r=1
const char MSG_CRASH_DETECTED[] PROGMEM_I1 = ISTR("Crash detected."); ////c=20
const char MSG_CRASHDETECT[] PROGMEM_I1 = ISTR("Crash det."); ////c=13
const char MSG_ERROR[] PROGMEM_I1 = ISTR("ERROR:"); ////
const char MSG_ERROR[] PROGMEM_I1 = ISTR("ERROR:"); ////c=10
const char MSG_EXTRUDER[] PROGMEM_I1 = ISTR("Extruder"); ////c=17
const char MSG_FANS_CHECK[] PROGMEM_I1 = ISTR("Fans check"); ////c=13
const char MSG_FIL_RUNOUTS[] PROGMEM_I1 = ISTR("Fil. runouts"); ////c=15
const char MSG_FILAMENT[] PROGMEM_I1 = ISTR("Filament"); ////c=17 r=1
const char MSG_FILAMENT[] PROGMEM_I1 = ISTR("Filament"); ////c=17
const char MSG_FAN_SPEED[] PROGMEM_I1 = ISTR("Fan speed"); ////c=14
const char MSG_FILAMENT_CLEAN[] PROGMEM_I1 = ISTR("Filament extruding & with correct color?"); ////c=20 r=2
const char MSG_FILAMENT_LOADED[] PROGMEM_I1 = ISTR("Is filament loaded?"); ////c=20 r=2
@ -39,19 +40,19 @@ const char MSG_FILAMENT_LOADING_T0[] PROGMEM_I1 = ISTR("Insert filament into ext
const char MSG_FILAMENT_LOADING_T1[] PROGMEM_I1 = ISTR("Insert filament into extruder 2. Click when done."); ////c=20 r=4
const char MSG_FILAMENT_LOADING_T2[] PROGMEM_I1 = ISTR("Insert filament into extruder 3. Click when done."); ////c=20 r=4
const char MSG_FILAMENT_LOADING_T3[] PROGMEM_I1 = ISTR("Insert filament into extruder 4. Click when done."); ////c=20 r=4
const char MSG_FILAMENTCHANGE[] PROGMEM_I1 = ISTR("Change filament"); ////
const char MSG_FIND_BED_OFFSET_AND_SKEW_LINE1[] PROGMEM_I1 = ISTR("Searching bed calibration point"); ////c=60
const char MSG_FIND_BED_OFFSET_AND_SKEW_LINE2[] PROGMEM_I1 = ISTR(" of 4"); ////c=14
const char MSG_FILAMENTCHANGE[] PROGMEM_I1 = ISTR("Change filament"); ////c=18
const char MSG_FIND_BED_OFFSET_AND_SKEW_LINE1[] PROGMEM_I1 = ISTR("Searching bed calibration point"); ////c=20 r=3
const char MSG_FINISHING_MOVEMENTS[] PROGMEM_I1 = ISTR("Finishing movements"); ////c=20
const char MSG_FOLLOW_CALIBRATION_FLOW[] PROGMEM_I1 = ISTR("Printer has not been calibrated yet. Please follow the manual, chapter First steps, section Calibration flow."); ////c=20 r=8
const char MSG_FOLLOW_Z_CALIBRATION_FLOW[] PROGMEM_I1 = ISTR("There is still a need to make Z calibration. Please follow the manual, chapter First steps, section Calibration flow."); ////c=20 r=9
const char MSG_FSENSOR_AUTOLOAD[] PROGMEM_I1 = ISTR("F. autoload"); ////c=13
const char MSG_FSENSOR[] PROGMEM_I1 = ISTR("Fil. sensor"); ////
const char MSG_HEATING[] PROGMEM_I1 = ISTR("Heating"); ////
const char MSG_FSENSOR[] PROGMEM_I1 = ISTR("Fil. sensor"); ////c=12
const char MSG_HEATING[] PROGMEM_I1 = ISTR("Heating"); ////c=20
const char MSG_HEATING_COMPLETE[] PROGMEM_I1 = ISTR("Heating done."); ////c=20
const char MSG_HOMEYZ[] PROGMEM_I1 = ISTR("Calibrate Z"); ////
const char MSG_CHOOSE_EXTRUDER[] PROGMEM_I1 = ISTR("Choose extruder:"); ////c=20 r=1
const char MSG_CHOOSE_FILAMENT[] PROGMEM_I1 = ISTR("Choose filament:"); ////c=20 r=1
const char MSG_HOMEYZ[] PROGMEM_I1 = ISTR("Calibrate Z"); ////c=18
const char MSG_ITERATION[] PROGMEM_I1 = ISTR("Iteration"); ////c=12
const char MSG_CHOOSE_EXTRUDER[] PROGMEM_I1 = ISTR("Choose extruder:"); ////c=20
const char MSG_CHOOSE_FILAMENT[] PROGMEM_I1 = ISTR("Choose filament:"); ////c=20
const char MSG_LAST_PRINT[] PROGMEM_I1 = ISTR("Last print"); ////c=18
const char MSG_LAST_PRINT_FAILURES[] PROGMEM_I1 = ISTR("Last print failures"); ////c=20
const char MSG_LOAD_FILAMENT[] PROGMEM_I1 = ISTR("Load filament"); //// Number 1 to 5 is added behind text e.g. "Load filament 1" c=16
@ -59,20 +60,19 @@ const char MSG_LOADING_FILAMENT[] PROGMEM_I1 = ISTR("Loading filament"); ////c=2
const char MSG_EJECT_FILAMENT[] PROGMEM_I1 = ISTR("Eject filament"); //// Number 1 to 5 is added behind text e.g. "Eject filament 1" c=16
const char MSG_CUT_FILAMENT[] PROGMEM_I1 = ISTR("Cut filament"); //// Number 1 to 5 is added behind text e.g. "Cut filament 1" c=16
const char MSG_M117_V2_CALIBRATION[] PROGMEM_I1 = ISTR("M117 First layer cal."); ////c=25
const char MSG_MAIN[] PROGMEM_I1 = ISTR("Main"); ////
const char MSG_BACK[] PROGMEM_I1 = ISTR("Back"); ////
const char MSG_MAIN[] PROGMEM_I1 = ISTR("Main"); ////c=18
const char MSG_BACK[] PROGMEM_I1 = ISTR("Back"); ////c=18
const char MSG_SHEET[] PROGMEM_I1 = ISTR("Sheet"); ////c=10
const char MSG_STEEL_SHEETS[] PROGMEM_I1 = ISTR("Steel sheets"); ////c=18
const char MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE1[] PROGMEM_I1 = ISTR("Measuring reference height of calibration point"); ////c=60
const char MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE2[] PROGMEM_I1 = ISTR(" of 9"); ////c=14
const char MSG_MENU_CALIBRATION[] PROGMEM_I1 = ISTR("Calibration"); ////
const char MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE1[] PROGMEM_I1 = ISTR("Measuring reference height of calibration point"); ////c=20 r=3
const char MSG_MENU_CALIBRATION[] PROGMEM_I1 = ISTR("Calibration"); ////c=18
const char MSG_MMU_FAILS[] PROGMEM_I1 = ISTR("MMU fails"); ////c=15
const char MSG_MMU_LOAD_FAILS[] PROGMEM_I1 = ISTR("MMU load fails"); ////c=15
const char MSG_NO[] PROGMEM_I1 = ISTR("No"); ////
const char MSG_NOZZLE[] PROGMEM_I1 = ISTR("Nozzle"); ////
const char MSG_NO[] PROGMEM_I1 = ISTR("No"); ////c=4
const char MSG_NOZZLE[] PROGMEM_I1 = ISTR("Nozzle"); ////c=12
const char MSG_PAPER[] PROGMEM_I1 = ISTR("Place a sheet of paper under the nozzle during the calibration of first 4 points. If the nozzle catches the paper, power off the printer immediately."); ////c=20 r=10
const char MSG_PAUSE_PRINT[] PROGMEM_I1 = ISTR("Pause print");////c=18
const char MSG_PLACE_STEEL_SHEET[] PROGMEM_I1 = ISTR("Please place steel sheet on heatbed."); ////c=20 r=4
const char MSG_PLACE_STEEL_SHEET[] PROGMEM_I1 = ISTR("Please place steel sheet on heatbed."); ////c=20 r=5
const char MSG_PLEASE_WAIT[] PROGMEM_I1 = ISTR("Please wait"); ////c=20
const char MSG_POWER_FAILURES[] PROGMEM_I1 = ISTR("Power failures"); ////c=15
const char MSG_PREHEAT_NOZZLE[] PROGMEM_I1 = ISTR("Preheat the nozzle!"); ////c=20
@ -80,78 +80,74 @@ const char MSG_PRESS_TO_UNLOAD[] PROGMEM_I1 = ISTR("Please press the knob to unl
const char MSG_PRINT_ABORTED[] PROGMEM_I1 = ISTR("Print aborted"); ////c=20
const char MSG_PULL_OUT_FILAMENT[] PROGMEM_I1 = ISTR("Please pull out filament immediately"); ////c=20 r=4
const char MSG_RECOVER_PRINT[] PROGMEM_I1 = ISTR("Blackout occurred. Recover print?"); ////c=20 r=2
const char MSG_REFRESH[] PROGMEM_I1 = ISTR("\x04" "Refresh"); ////
const char MSG_REFRESH[] PROGMEM_I1 = ISTR("\x04Refresh"); ////c=18
const char MSG_REMOVE_STEEL_SHEET[] PROGMEM_I1 = ISTR("Please remove steel sheet from heatbed."); ////c=20 r=4
const char MSG_RESET[] PROGMEM_I1 = ISTR("Reset"); ////c=14
const char MSG_RESUME_PRINT[] PROGMEM_I1 = ISTR("Resume print"); ////c=18
const char MSG_RESUMING_PRINT[] PROGMEM_I1 = ISTR("Resuming print"); ////
const char MSG_RESUMING_PRINT[] PROGMEM_I1 = ISTR("Resuming print"); ////c=20
const char MSG_SELFTEST_COOLING_FAN[] PROGMEM_I1 = ISTR("Front print fan?"); ////c=20
const char MSG_SELFTEST_EXTRUDER_FAN[] PROGMEM_I1 = ISTR("Left hotend fan?"); ////c=20
const char MSG_SELFTEST_FAILED[] PROGMEM_I1 = ISTR("Selftest failed "); ////c=20
const char MSG_SELFTEST_FAILED[] PROGMEM_I1 = ISTR("Selftest failed"); ////c=20
const char MSG_SELFTEST_FAN[] PROGMEM_I1 = ISTR("Fan test"); ////c=20
const char MSG_SELFTEST_FAN_NO[] PROGMEM_I1 = ISTR("Not spinning"); ////c=19
const char MSG_SELFTEST_FAN_YES[] PROGMEM_I1 = ISTR("Spinning"); ////c=19
const char MSG_SELFTEST_CHECK_BED[] PROGMEM_I1 = ISTR("Checking bed "); ////c=20
const char MSG_SELFTEST_CHECK_FSENSOR[] PROGMEM_I1 = ISTR("Checking sensors "); ////c=20
const char MSG_SELFTEST_MOTOR[] PROGMEM_I1 = ISTR("Motor"); ////
const char MSG_SELFTEST_CHECK_BED[] PROGMEM_I1 = ISTR("Checking bed"); ////c=20
const char MSG_SELFTEST_CHECK_FSENSOR[] PROGMEM_I1 = ISTR("Checking sensors"); ////c=20
const char MSG_SELFTEST_MOTOR[] PROGMEM_I1 = ISTR("Motor"); ////c=18
const char MSG_SELFTEST_FILAMENT_SENSOR[] PROGMEM_I1 = ISTR("Filament sensor"); ////c=17
const char MSG_SELFTEST_WIRINGERROR[] PROGMEM_I1 = ISTR("Wiring error"); ////
const char MSG_SETTINGS[] PROGMEM_I1 = ISTR("Settings"); ////
const char MSG_SELFTEST_WIRINGERROR[] PROGMEM_I1 = ISTR("Wiring error"); ////c=18
const char MSG_SETTINGS[] PROGMEM_I1 = ISTR("Settings"); ////c=18
const char MSG_TOTAL[] PROGMEM_I1 = ISTR("Total"); ////c=6
const char MSG_TOTAL_FAILURES[] PROGMEM_I1 = ISTR("Total failures"); ////c=20
const char MSG_HW_SETUP[] PROGMEM_I1 = ISTR("HW Setup"); ////c=18
const char MSG_MODE[] PROGMEM_I1 = ISTR("Mode"); ////
const char MSG_HIGH_POWER[] PROGMEM_I1 = ISTR("High power"); ////
const char MSG_AUTO_POWER[] PROGMEM_I1 = ISTR("Auto power"); ////
const char MSG_SILENT[] PROGMEM_I1 = ISTR("Silent"); ////
const char MSG_NORMAL[] PROGMEM_I1 = ISTR("Normal"); ////
const char MSG_STEALTH[] PROGMEM_I1 = ISTR("Stealth"); ////
const char MSG_MODE[] PROGMEM_I1 = ISTR("Mode"); ////c=6
const char MSG_HIGH_POWER[] PROGMEM_I1 = ISTR("High power"); ////c=10
const char MSG_AUTO_POWER[] PROGMEM_I1 = ISTR("Auto power"); ////c=10
const char MSG_SILENT[] PROGMEM_I1 = ISTR("Silent"); ////c=7
const char MSG_NORMAL[] PROGMEM_I1 = ISTR("Normal"); ////c=7
const char MSG_STEALTH[] PROGMEM_I1 = ISTR("Stealth"); ////c=7
const char MSG_STEEL_SHEET_CHECK[] PROGMEM_I1 = ISTR("Is steel sheet on heatbed?"); ////c=20 r=2
const char MSG_STOP_PRINT[] PROGMEM_I1 = ISTR("Stop print"); ////
const char MSG_STOPPED[] PROGMEM_I1 = ISTR("STOPPED. "); ////
const char MSG_STOP_PRINT[] PROGMEM_I1 = ISTR("Stop print"); ////c=18
const char MSG_STOPPED[] PROGMEM_I1 = ISTR("STOPPED."); ////c=20
const char MSG_TEMP_CALIBRATION[] PROGMEM_I1 = ISTR("Temp. cal."); ////c=14
const char MSG_TEMP_CALIBRATION_DONE[] PROGMEM_I1 = ISTR("Temperature calibration is finished and active. Temp. calibration can be disabled in menu Settings->Temp. cal."); ////c=20 r=12
const char MSG_UNLOAD_FILAMENT[] PROGMEM_I1 = ISTR("Unload filament"); ////c=17
const char MSG_UNLOADING_FILAMENT[] PROGMEM_I1 = ISTR("Unloading filament"); ////c=20 r=1
const char MSG_WATCH[] PROGMEM_I1 = ISTR("Info screen"); ////
const char MSG_UNLOAD_FILAMENT[] PROGMEM_I1 = ISTR("Unload filament"); ////Number 1 to 5 is added behind text e.g. "Unload filament" c=16
const char MSG_UNLOADING_FILAMENT[] PROGMEM_I1 = ISTR("Unloading filament"); ////c=20
const char MSG_WATCH[] PROGMEM_I1 = ISTR("Info screen"); ////c=18
const char MSG_WIZARD_CALIBRATION_FAILED[] PROGMEM_I1 = ISTR("Please check our handbook and fix the problem. Then resume the Wizard by rebooting the printer."); ////c=20 r=8
const char MSG_WIZARD_DONE[] PROGMEM_I1 = ISTR("All is done. Happy printing!"); ////c=20 r=8
const char MSG_WIZARD_HEATING[] PROGMEM_I1 = ISTR("Preheating nozzle. Please wait."); ////c=20 r=3
const char MSG_WIZARD_QUIT[] PROGMEM_I1 = ISTR("You can always resume the Wizard from Calibration -> Wizard."); ////c=20 r=8
const char MSG_WIZARD_WELCOME[] PROGMEM_I1 = ISTR("Hi, I am your Original Prusa i3 printer. Would you like me to guide you through the setup process?"); //// c=20 r=7
const char MSG_WIZARD_WELCOME_SHIPPING[] PROGMEM_I1 = ISTR("Hi, I am your Original Prusa i3 printer. I will guide you through a short setup process, in which the Z-axis will be calibrated. Then, you will be ready to print."); ////c=20 r=16
const char MSG_YES[] PROGMEM_I1 = ISTR("Yes"); ////
const char MSG_YES[] PROGMEM_I1 = ISTR("Yes"); ////c=3
const char MSG_V2_CALIBRATION[] PROGMEM_I1 = ISTR("First layer cal."); ////c=18
const char WELCOME_MSG[] PROGMEM_I1 = ISTR(CUSTOM_MENDEL_NAME " OK."); ////c=20
const char MSG_OFF[] PROGMEM_I1 = ISTR("Off"); ////
const char MSG_ON[] PROGMEM_I1 = ISTR("On"); ////
const char MSG_NA[] PROGMEM_I1 = ISTR("N/A"); ////
const char MSG_AUTO_DEPLETE[] PROGMEM_I1 = ISTR("SpoolJoin"); ////
const char MSG_OFF[] PROGMEM_I1 = ISTR("Off"); ////c=3
const char MSG_ON[] PROGMEM_I1 = ISTR("On"); ////c=3
const char MSG_NA[] PROGMEM_I1 = ISTR("N/A"); ////c=3
const char MSG_CUTTER[] PROGMEM_I1 = ISTR("Cutter"); ////c=9
const char MSG_NONE[] PROGMEM_I1 = ISTR("None"); ////
const char MSG_WARN[] PROGMEM_I1 = ISTR("Warn"); ////
const char MSG_STRICT[] PROGMEM_I1 = ISTR("Strict"); ////
const char MSG_MODEL[] PROGMEM_I1 = ISTR("Model"); ////
const char MSG_FIRMWARE[] PROGMEM_I1 = ISTR("Firmware"); ////
const char MSG_GCODE[] PROGMEM_I1 = ISTR("Gcode"); ////
const char MSG_NONE[] PROGMEM_I1 = ISTR("None"); ////c=8
const char MSG_WARN[] PROGMEM_I1 = ISTR("Warn"); ////c=8
const char MSG_STRICT[] PROGMEM_I1 = ISTR("Strict"); ////c=8
const char MSG_MODEL[] PROGMEM_I1 = ISTR("Model"); ////c=8
const char MSG_GCODE[] PROGMEM_I1 = ISTR("Gcode"); ////c=8
const char MSG_GCODE_DIFF_PRINTER_CONTINUE[] PROGMEM_I1 = ISTR("G-code sliced for a different printer type. Continue?"); ////c=20 r=5
const char MSG_GCODE_DIFF_PRINTER_CANCELLED[] PROGMEM_I1 =ISTR("G-code sliced for a different printer type. Please re-slice the model again. Print cancelled."); ////c=20 r=7
const char MSG_NOZZLE_DIAMETER[] PROGMEM_I1 = ISTR("Nozzle d."); ////
const char MSG_MMU_MODE[] PROGMEM_I1 = ISTR("MMU Mode"); ////
const char MSG_SD_CARD[] PROGMEM_I1 = ISTR("SD card"); ////
const char MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY[] PROGMEM_I1 = ISTR("FlashAir"); ////
const char MSG_SORT[] PROGMEM_I1 = ISTR("Sort"); ////
const char MSG_SORT_TIME[] PROGMEM_I1 = ISTR("Time"); ////
const char MSG_SORT_ALPHA[] PROGMEM_I1 = ISTR("Alphabet"); ////
const char MSG_RPI_PORT[] PROGMEM_I1 = ISTR("RPi port"); ////
const char MSG_SOUND[] PROGMEM_I1 = ISTR("Sound"); ////
const char MSG_SOUND_LOUD[] PROGMEM_I1 = ISTR("Loud"); ////
const char MSG_SOUND_ONCE[] PROGMEM_I1 = ISTR("Once"); ////
const char MSG_SOUND_BLIND[] PROGMEM_I1 = ISTR("Assist"); ////
const char MSG_MESH[] PROGMEM_I1 = ISTR("Mesh"); ////
const char MSG_GCODE_DIFF_PRINTER_CANCELLED[] PROGMEM_I1 =ISTR("G-code sliced for a different printer type. Please re-slice the model again. Print cancelled."); ////c=20 r=8
const char MSG_NOZZLE_DIAMETER[] PROGMEM_I1 = ISTR("Nozzle d."); ////c=10
const char MSG_MMU_MODE[] PROGMEM_I1 = ISTR("MMU Mode"); ////c=8
const char MSG_SD_CARD[] PROGMEM_I1 = ISTR("SD card"); ////c=8
const char MSG_SORT[] PROGMEM_I1 = ISTR("Sort"); ////c=7
const char MSG_SORT_TIME[] PROGMEM_I1 = ISTR("Time"); ////c=8
const char MSG_SORT_ALPHA[] PROGMEM_I1 = ISTR("Alphabet"); ////c=8
const char MSG_RPI_PORT[] PROGMEM_I1 = ISTR("RPi port"); ////c=13
const char MSG_SOUND[] PROGMEM_I1 = ISTR("Sound"); ////c=9
const char MSG_SOUND_LOUD[] PROGMEM_I1 = ISTR("Loud"); ////c=7
const char MSG_SOUND_ONCE[] PROGMEM_I1 = ISTR("Once"); ////c=7
const char MSG_SOUND_BLIND[] PROGMEM_I1 = ISTR("Assist"); ////c=7
const char MSG_MESH[] PROGMEM_I1 = ISTR("Mesh"); ////c=12
const char MSG_MESH_BED_LEVELING[] PROGMEM_I1 = ISTR("Mesh Bed Leveling"); ////c=18
const char MSG_Z_PROBE_NR[] PROGMEM_I1 = ISTR("Z-probe nr."); ////
const char MSG_MAGNETS_COMP[] PROGMEM_I1 = ISTR("Magnets comp."); ////
const char MSG_Z_PROBE_NR[] PROGMEM_I1 = ISTR("Z-probe nr."); ////c=14
const char MSG_MAGNETS_COMP[] PROGMEM_I1 = ISTR("Magnets comp."); ////c=13
const char MSG_FS_ACTION[] PROGMEM_I1 = ISTR("FS Action"); ////c=10
const char MSG_FS_CONTINUE[] PROGMEM_I1 = ISTR("Cont."); ////c=5
const char MSG_FS_PAUSE[] PROGMEM_I1 = ISTR("Pause"); ////c=5
@ -170,6 +166,11 @@ const char MSG_IR_UNKNOWN[] PROGMEM_I1 = ISTR("unknown state");////c=18
#endif
//not internationalized messages
const char MSG_AUTO_DEPLETE[] PROGMEM_N1 = ISTR("SpoolJoin"); ////c=13
const char MSG_FIRMWARE[] PROGMEM_N1 = ISTR("Firmware"); ////c=8
const char MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY[] PROGMEM_N1 = ISTR("FlashAir"); ////c=8
const char MSG_PINDA[] PROGMEM_N1 = ISTR("PINDA");////c=5
const char WELCOME_MSG[] PROGMEM_N1 = ISTR(CUSTOM_MENDEL_NAME " OK."); ////c=20
const char MSG_SD_WORKDIR_FAIL[] PROGMEM_N1 = "workDir open failed"; ////
const char MSG_BROWNOUT_RESET[] PROGMEM_N1 = " Brown out Reset"; ////
const char MSG_EXTERNAL_RESET[] PROGMEM_N1 = " External Reset"; ////

View File

@ -18,6 +18,7 @@ extern const char MSG_BED_HEATING[];
extern const char MSG_BED_LEVELING_FAILED_POINT_LOW[];
extern const char MSG_BED_SKEW_OFFSET_DETECTION_FITTING_FAILED[];
extern const char MSG_BELT_STATUS[];
extern const char MSG_CANCEL[];
extern const char MSG_CALIBRATE_Z_AUTO[];
extern const char MSG_CARD_MENU[];
extern const char MSG_CHECKING_X[];
@ -42,7 +43,6 @@ extern const char MSG_FILAMENT_LOADING_T2[];
extern const char MSG_FILAMENT_LOADING_T3[];
extern const char MSG_FILAMENTCHANGE[];
extern const char MSG_FIND_BED_OFFSET_AND_SKEW_LINE1[];
extern const char MSG_FIND_BED_OFFSET_AND_SKEW_LINE2[];
extern const char MSG_FINISHING_MOVEMENTS[];
extern const char MSG_FOLLOW_CALIBRATION_FLOW[];
extern const char MSG_FOLLOW_Z_CALIBRATION_FLOW[];
@ -51,6 +51,7 @@ extern const char MSG_FSENSOR[];
extern const char MSG_HEATING[];
extern const char MSG_HEATING_COMPLETE[];
extern const char MSG_HOMEYZ[];
extern const char MSG_ITERATION[];
extern const char MSG_CHOOSE_EXTRUDER[];
extern const char MSG_CHOOSE_FILAMENT[];
extern const char MSG_LAST_PRINT[];
@ -63,7 +64,6 @@ extern const char MSG_BACK[];
extern const char MSG_SHEET[];
extern const char MSG_STEEL_SHEETS[];
extern const char MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE1[];
extern const char MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE2[];
extern const char MSG_MENU_CALIBRATION[];
extern const char MSG_MMU_FAILS[];
extern const char MSG_MMU_LOAD_FAILS[];
@ -71,6 +71,7 @@ extern const char MSG_NO[];
extern const char MSG_NOZZLE[];
extern const char MSG_PAPER[];
extern const char MSG_PAUSE_PRINT[];
extern const char MSG_PINDA[];
extern const char MSG_PLACE_STEEL_SHEET[];
extern const char MSG_PLEASE_WAIT[];
extern const char MSG_POWER_FAILURES[];

View File

@ -718,12 +718,12 @@ void manage_response(bool move_axes, bool turn_off_nozzle, uint8_t move)
//first three lines are used for printing multiscreen message; last line contains measured and target nozzle temperature
if (screen == 0) { //screen 0
lcd_display_message_fullscreen_P(_i("MMU needs user attention."));
lcd_display_message_fullscreen_P(_i("MMU needs user attention."));////MSG_MMU_USER_ATTENTION c=20 r=3
screen++;
}
else { //screen 1
if((degTargetHotend(active_extruder) == 0) && turn_off_nozzle) lcd_display_message_fullscreen_P(_i("Press the knob to resume nozzle temperature."));
else lcd_display_message_fullscreen_P(_i("Fix the issue and then press button on MMU unit."));
if((degTargetHotend(active_extruder) == 0) && turn_off_nozzle) lcd_display_message_fullscreen_P(_i("Press the knob to resume nozzle temperature."));////MSG_RESUME_NOZZLE_TEMP c=20 r=4
else lcd_display_message_fullscreen_P(_i("Fix the issue and then press button on MMU unit."));////MSG_MMU_FIX_ISSUE c=20 r=4
screen=0;
}
@ -1383,7 +1383,7 @@ void mmu_cut_filament(uint8_t filament_nr)
{
LcdUpdateDisabler disableLcdUpdate;
lcd_clear();
lcd_puts_at_P(0, 1, _i("Cutting filament")); //// c=18
lcd_puts_at_P(0, 1, _i("Cutting filament")); ////MSG_MMU_CUTTING_FIL c=18
lcd_print(' ');
lcd_print(filament_nr + 1);
mmu_filament_ramming();
@ -1583,7 +1583,7 @@ void mmu_continue_loading(bool blocking)
manage_response(false, true, MMU_UNLOAD_MOVE);
setAllTargetHotends(0);
lcd_setstatuspgm(_i("MMU load failed "));////c=20 r=1
lcd_setstatuspgm(_i("MMU load failed"));////MSG_MMU_LOAD_FAILED c=20
if (blocking)
{

File diff suppressed because it is too large Load Diff

View File

@ -393,13 +393,13 @@ switch(oCheckMode)
{
case ClCheckMode::_Warn:
// lcd_show_fullscreen_message_and_wait_P(_i("Printer nozzle diameter differs from the G-code. Continue?"));
lcd_display_message_fullscreen_P(_i("Printer nozzle diameter differs from the G-code. Continue?"));
lcd_display_message_fullscreen_P(_i("Printer nozzle diameter differs from the G-code. Continue?"));////MSG_NOZZLE_DIFFERS_CONTINUE c=20 r=5
lcd_wait_for_click_delay(MSG_PRINT_CHECKING_FAILED_TIMEOUT);
//???custom_message_type=CUSTOM_MSG_TYPE_STATUS; // display / status-line recovery
lcd_update_enable(true); // display / status-line recovery
break;
case ClCheckMode::_Strict:
lcd_show_fullscreen_message_and_wait_P(_i("Printer nozzle diameter differs from the G-code. Please check the value in settings. Print cancelled."));
lcd_show_fullscreen_message_and_wait_P(_i("Printer nozzle diameter differs from the G-code. Please check the value in settings. Print cancelled."));////MSG_NOZZLE_DIFFERS_CANCELLED c=20 r=9
lcd_print_stop();
break;
case ClCheckMode::_None:
@ -479,13 +479,13 @@ switch(oCheckVersion)
{
case ClCheckVersion::_Warn:
// lcd_show_fullscreen_message_and_wait_P(_i("Printer FW version differs from the G-code. Continue?"));
lcd_display_message_fullscreen_P(_i("G-code sliced for a newer firmware. Continue?"));
lcd_display_message_fullscreen_P(_i("G-code sliced for a newer firmware. Continue?"));////MSG_GCODE_NEWER_FIRMWARE_CONTINUE c=20 r=5
lcd_wait_for_click_delay(MSG_PRINT_CHECKING_FAILED_TIMEOUT);
//???custom_message_type=CUSTOM_MSG_TYPE_STATUS; // display / status-line recovery
lcd_update_enable(true); // display / status-line recovery
break;
case ClCheckVersion::_Strict:
lcd_show_fullscreen_message_and_wait_P(_i("G-code sliced for a newer firmware. Please update the firmware. Print cancelled."));
lcd_show_fullscreen_message_and_wait_P(_i("G-code sliced for a newer firmware. Please update the firmware. Print cancelled."));////MSG_GCODE_NEWER_FIRMWARE_CANCELLED c=20 r=8
lcd_print_stop();
break;
case ClCheckVersion::_None:
@ -512,13 +512,13 @@ switch(oCheckGcode)
{
case ClCheckGcode::_Warn:
// lcd_show_fullscreen_message_and_wait_P(_i("Printer G-code level differs from the G-code. Continue?"));
lcd_display_message_fullscreen_P(_i("G-code sliced for a different level. Continue?"));
lcd_display_message_fullscreen_P(_i("G-code sliced for a different level. Continue?"));////MSG_GCODE_DIFF_CONTINUE c=20 r=4
lcd_wait_for_click_delay(MSG_PRINT_CHECKING_FAILED_TIMEOUT);
//???custom_message_type=CUSTOM_MSG_TYPE_STATUS; // display / status-line recovery
lcd_update_enable(true); // display / status-line recovery
break;
case ClCheckGcode::_Strict:
lcd_show_fullscreen_message_and_wait_P(_i("G-code sliced for a different level. Please re-slice the model again. Print cancelled."));
lcd_show_fullscreen_message_and_wait_P(_i("G-code sliced for a different level. Please re-slice the model again. Print cancelled."));////MSG_GCODE_DIFF_CANCELLED c=20 r=7
lcd_print_stop();
break;
case ClCheckGcode::_None:

View File

@ -17,7 +17,9 @@ export OBJCOPY=$ARDUINO/hardware/tools/avr/bin/avr-objcopy
export OBJDUMP=$ARDUINO/hardware/tools/avr/bin/avr-objdump
#
# Output folder:
export OUTDIR="../../Prusa-Firmware-build"
if [ -z "$OUTDIR" ]; then
export OUTDIR="../../Prusa-Firmware-build"
fi
#
# Objects folder:
export OBJDIR="$OUTDIR/sketch"

View File

@ -88,7 +88,7 @@ generate_binary()
rm -f lang_$1.dat
LNG=$1
#check lang dictionary
./lang-check.py $1 --no-warning
./lang-check.py $1 #--no-warning
#create lang_xx.tmp - different processing for 'en' language
if [ "$1" = "en" ]; then
#remove comments and empty lines

View File

@ -1,69 +1,262 @@
#!/usr/bin/env python3
#
# Version 1.0.1
#
#############################################################################
# Change log:
# 7 May 2019, Ondrej Tuma, Initial
# 9 June 2020, 3d-gussner, Added version and Change log
# 9 June 2020, 3d-gussner, Wrap text to 20 char and rows
# 9 June 2020, 3d-gussner, colored output
# 2 Apr. 2021, 3d-gussner, Fix and improve text warp
# 22 Apr. 2021, DRracer , add English source to output
# 23 Apr. 2021, wavexx , improve
# 24 Apr. 2021, wavexx , improve
# 26 Apr. 2021, 3d-gussner, add character ruler
#############################################################################
#
"""Check lang files."""
from argparse import ArgumentParser
from traceback import print_exc
from sys import stderr
from sys import stdout, stderr
import textwrap
import re
def color_maybe(color_attr, text):
if stdout.isatty():
return '\033[0;' + str(color_attr) + 'm' + text + '\033[0m'
else:
return text
red = lambda text: color_maybe(31, text)
green = lambda text: color_maybe(32, text)
yellow = lambda text: color_maybe(33, text)
cyan = lambda text: color_maybe(36, text)
def parse_txt(lang, no_warning):
def print_wrapped(wrapped_text, rows, cols):
if type(wrapped_text) == str:
wrapped_text = [wrapped_text]
for r, line in enumerate(wrapped_text):
r_ = str(r + 1).rjust(3)
if r >= rows:
r_ = red(r_)
print((' {} |{:' + str(cols) + 's}|').format(r_, line))
def print_truncated(text, cols):
if len(text) <= cols:
prefix = text.ljust(cols)
suffix = ''
else:
prefix = text[0:cols]
suffix = red(text[cols:])
print(' |' + prefix + '|' + suffix)
def print_ruler(spc, cols):
print(' ' * spc + cyan(('₀₁₂₃₄₅₆₇₈₉'*4)[:cols]))
def print_source_translation(source, translation, wrapped_source, wrapped_translation, rows, cols):
if rows == 1:
print(' source text:')
print_ruler(4, cols);
print_truncated(source, cols)
print(' translated text:')
print_ruler(4, cols);
print_truncated(translation, cols)
else:
print(' source text:')
print_ruler(6, cols);
print_wrapped(wrapped_source, rows, cols)
print(' translated text:')
print_ruler(6, cols);
print_wrapped(wrapped_translation, rows, cols)
print()
def highlight_trailing_white(text):
if type(text) == str:
return re.sub(r' $', '·', text)
else:
ret = text[:]
ret[-1] = highlight_trailing_white(ret[-1])
return ret
def wrap_text(text, cols):
# wrap text
ret = list(textwrap.TextWrapper(width=cols).wrap(text))
if len(ret):
# add back trailing whitespace
ret[-1] += ' ' * (len(text) - len(text.rstrip()))
return ret
def unescape(text):
if '\\' not in text:
return text
return text.encode('ascii').decode('unicode_escape')
def ign_char_first(c):
return c.isalnum() or c in {'%', '?'}
def ign_char_last(c):
return c.isalnum() or c in {'.', "'"}
def parse_txt(lang, no_warning, warn_empty):
"""Parse txt file and check strings to display definition."""
if lang == "en":
file_path = "lang_en.txt"
else:
file_path = "lang_en_%s.txt" % lang
print(green("Start %s lang-check" % lang))
lines = 1
with open(file_path) as src:
while True:
comment = src.readline().split(' ')
src.readline() # source
translation = src.readline()[:-1]
#print (comment) #Debug
#Check if columns and rows are defined
cols = None
rows = None
for item in comment[1:]:
key, val = item.split('=')
if key == 'c':
cols = int(val)
#print ("c=",cols) #Debug
elif key == 'r':
rows = int(val)
#print ("r=",rows) #Debug
else:
raise RuntimeError(
"Unknown display definition %s on line %d" %
(' '.join(comment), lines))
if cols is None and rows is None:
if not no_warning:
print("[W]: No display definition on line %d" % lines)
print(yellow("[W]: No display definition on line %d" % lines))
cols = len(translation) # propably fullscreen
if rows is None:
rows = 1
elif rows > 1 and cols != 20:
print(yellow("[W]: Multiple rows with odd number of columns on line %d" % lines))
if len(translation)-2 > cols*rows:
stderr.write(
"[E]: Text %s is longer then definiton on line %d\n" %
(translation, lines))
stderr.flush()
#Wrap text to 20 chars and rows
source = src.readline()[:-1].strip('"')
#print (source) #Debug
translation = src.readline()[:-1].strip('"')
if translation == '\\x00':
# crude hack to handle intentionally-empty translations
translation = ''
# handle backslash sequences
source = unescape(source)
translation = unescape(translation)
#print (translation) #Debug
wrapped_source = wrap_text(source, cols)
rows_count_source = len(wrapped_source)
wrapped_translation = wrap_text(translation, cols)
rows_count_translation = len(wrapped_translation)
# Check for potential errors in the definition
if not no_warning:
# Incorrect number of rows/cols on the definition
if rows == 1 and (len(source) > cols or rows_count_source > rows):
print(yellow('[W]: Source text longer than %d cols as defined on line %d:' % (cols, lines)))
print_ruler(4, cols);
print_truncated(source, cols)
print()
elif rows_count_source > rows:
print(yellow('[W]: Wrapped source text longer than %d rows as defined on line %d:' % (rows, lines)))
print_ruler(6, cols);
print_wrapped(wrapped_source, rows, cols)
print()
# Missing translation
if len(translation) == 0 and (warn_empty or rows > 1):
if rows == 1:
print(yellow("[W]: Empty translation for \"%s\" on line %d" % (source, lines)))
else:
print(yellow("[W]: Empty translation on line %d" % lines))
print_ruler(6, cols);
print_wrapped(wrapped_source, rows, cols)
print()
# Check for translation lenght
if (rows_count_translation > rows) or (rows == 1 and len(translation) > cols):
print(red('[E]: Text is longer than definition on line %d: cols=%d rows=%d (rows diff=%d)'
% (lines, cols, rows, rows_count_translation-rows)))
print_source_translation(source, translation,
wrapped_source, wrapped_translation,
rows, cols)
# Different count of % sequences
if source.count('%') != translation.count('%') and len(translation) > 0:
print(red('[E]: Unequal count of %% escapes on line %d:' % (lines)))
print_source_translation(source, translation,
wrapped_source, wrapped_translation,
rows, cols)
# Different first/last character
if not no_warning and len(source) > 0 and len(translation) > 0:
source_end = source.rstrip()[-1]
translation_end = translation.rstrip()[-1]
start_diff = not (ign_char_first(source[0]) and ign_char_first(translation[0])) and source[0] != translation[0]
end_diff = not (ign_char_last(source_end) and ign_char_last(translation_end)) and source_end != translation_end
if start_diff or end_diff:
if start_diff:
print(yellow('[W]: Differing first punctuation character (%s => %s) on line %d:' % (source[0], translation[0], lines)))
if end_diff:
print(yellow('[W]: Differing last punctuation character (%s => %s) on line %d:' % (source[-1], translation[-1], lines)))
print_source_translation(source, translation,
wrapped_source, wrapped_translation,
rows, cols)
# Short translation
if not no_warning and len(source) > 0 and len(translation) > 0:
if len(translation.rstrip()) < len(source.rstrip()) / 2:
print(yellow('[W]: Short translation on line %d:' % (lines)))
print_source_translation(source, translation,
wrapped_source, wrapped_translation,
rows, cols)
# Incorrect trailing whitespace in translation
if not no_warning and len(translation) > 0 and \
(source.rstrip() == source or (rows == 1 and len(source) == cols)) and \
translation.rstrip() != translation and \
(rows > 1 or len(translation) != len(source)):
print(yellow('[W]: Incorrect trailing whitespace for translation on line %d:' % (lines)))
source = highlight_trailing_white(source)
translation = highlight_trailing_white(translation)
wrapped_translation = highlight_trailing_white(wrapped_translation)
print_source_translation(source, translation,
wrapped_source, wrapped_translation,
rows, cols)
if len(src.readline()) != 1: # empty line
break
lines += 4
print(green("End %s lang-check" % lang))
def main():
"""Main function."""
parser = ArgumentParser(
description=__doc__,
usage="$(prog)s lang")
usage="%(prog)s lang")
parser.add_argument(
"lang", nargs='?', default="en", type=str,
help="Check lang file (en|cs|de|es|fr|nl|it|pl)")
parser.add_argument(
"--no-warning", action="store_true",
help="Disable warnings")
parser.add_argument(
"--warn-empty", action="store_true",
help="Warn about empty translations")
args = parser.parse_args()
try:
parse_txt(args.lang, args.no_warning)
parse_txt(args.lang, args.no_warning, args.warn_empty)
return 0
except Exception as exc:
print_exc()

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff