commit
f5ca79926e
43 changed files with 12148 additions and 15726 deletions
|
@ -16,8 +16,8 @@ extern uint16_t nPrinterType;
|
|||
extern PGM_P sPrinterName;
|
||||
|
||||
// Firmware version
|
||||
#define FW_VERSION "3.10.0-RC2"
|
||||
#define FW_COMMIT_NR 4104
|
||||
#define FW_VERSION "3.10.0"
|
||||
#define FW_COMMIT_NR 4481
|
||||
// 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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
@ -743,7 +743,7 @@ static void factory_reset(char level)
|
|||
factory_reset_stats();
|
||||
// [[fallthrough]] // there is no break intentionally
|
||||
|
||||
case 4: // Level 4: Preparation after being serviced
|
||||
case 3: // Level 3: Preparation after being serviced
|
||||
// Force language selection at the next boot up.
|
||||
lang_reset();
|
||||
// Force the "Follow calibration flow" message at the next boot up.
|
||||
|
@ -758,7 +758,7 @@ static void factory_reset(char level)
|
|||
#endif //FILAMENT_SENSOR
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case 4:
|
||||
menu_progressbar_init(EEPROM_TOP, PSTR("ERASING all data"));
|
||||
// Erase EEPROM
|
||||
for (uint16_t i = 0; i < EEPROM_TOP; i++) {
|
||||
|
@ -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
|
||||
|
@ -1054,11 +1054,6 @@ void setup()
|
|||
selectedSerialPort = 1;
|
||||
#endif //HAS_SECOND_SERIAL_PORT
|
||||
MYSERIAL.begin(BAUDRATE);
|
||||
#ifdef TMC2130
|
||||
//increased extruder current (PFW363)
|
||||
tmc2130_current_h[E_AXIS] = 36;
|
||||
tmc2130_current_r[E_AXIS] = 36;
|
||||
#endif //TMC2130
|
||||
#ifdef FILAMENT_SENSOR
|
||||
//disabled filament autoload (PFW360)
|
||||
fsensor_autoload_set(false);
|
||||
|
@ -1068,6 +1063,14 @@ void setup()
|
|||
eeprom_update_byte((unsigned char *)EEPROM_FAN_CHECK_ENABLED,true);
|
||||
}
|
||||
|
||||
#ifdef TMC2130
|
||||
if( FarmOrUserECool() ){
|
||||
//increased extruder current (PFW363)
|
||||
tmc2130_current_h[E_AXIS] = TMC2130_CURRENTS_FARM;
|
||||
tmc2130_current_r[E_AXIS] = TMC2130_CURRENTS_FARM;
|
||||
}
|
||||
#endif //TMC2130
|
||||
|
||||
//saved EEPROM SN is not valid. Try to retrieve it.
|
||||
//SN is valid only if it is NULL terminated. Any other character means either uninitialized or corrupted
|
||||
if (eeprom_read_byte((uint8_t*)EEPROM_PRUSA_SN + 19))
|
||||
|
@ -1337,13 +1340,12 @@ void setup()
|
|||
#endif //TMC2130_VARIABLE_RESOLUTION
|
||||
|
||||
#endif //TMC2130
|
||||
|
||||
st_init(); // Initialize stepper, this enables interrupts!
|
||||
|
||||
#ifdef TMC2130
|
||||
tmc2130_mode = silentMode?TMC2130_MODE_SILENT:TMC2130_MODE_NORMAL;
|
||||
update_mode_profile();
|
||||
tmc2130_init();
|
||||
tmc2130_init(TMCInitParams(false, FarmOrUserECool() ));
|
||||
#endif //TMC2130
|
||||
#ifdef PSU_Delta
|
||||
init_force_z(); // ! important for correct Z-axis initialization
|
||||
|
@ -1538,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) {
|
||||
|
@ -2556,7 +2558,7 @@ void force_high_power_mode(bool start_high_power_section) {
|
|||
cli();
|
||||
tmc2130_mode = (start_high_power_section == true) ? TMC2130_MODE_NORMAL : TMC2130_MODE_SILENT;
|
||||
update_mode_profile();
|
||||
tmc2130_init();
|
||||
tmc2130_init(TMCInitParams(FarmOrUserECool()));
|
||||
// We may have missed a stepper timer interrupt due to the time spent in the tmc2130_init() routine.
|
||||
// Be safe than sorry, reset the stepper timer before re-enabling interrupts.
|
||||
st_reset_timer();
|
||||
|
@ -3428,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();
|
||||
|
@ -3456,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);
|
||||
|
@ -3692,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
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3965,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
|
||||
|
||||
|
@ -4227,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();
|
||||
|
@ -5726,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();
|
||||
|
@ -5778,7 +5773,7 @@ if(eSoundMode!=e_SOUND_MODE_SILENT)
|
|||
starpos = (strchr(strchr_pointer + 4,'*'));
|
||||
if(starpos!=NULL)
|
||||
*(starpos)='\0';
|
||||
card.openFileReadFilteredGcode(strchr_pointer + 4);
|
||||
card.openFileReadFilteredGcode(strchr_pointer + 4, true);
|
||||
break;
|
||||
|
||||
/*!
|
||||
|
@ -6397,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();
|
||||
|
@ -6490,6 +6484,7 @@ Sigma_Exit:
|
|||
gcode_M105(extruder);
|
||||
|
||||
cmdqueue_pop_front(); //prevent an ok after the command since this command uses an ok at the beginning.
|
||||
cmdbuffer_front_already_processed = true;
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -6515,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')){
|
||||
|
@ -7069,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
|
||||
|
||||
|
@ -7085,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;
|
||||
|
@ -8425,6 +8417,7 @@ Sigma_Exit:
|
|||
/*!
|
||||
### M907 - Set digital trimpot motor current in mA using axis codes <a href="https://reprap.org/wiki/G-code#M907:_Set_digital_trimpot_motor">M907: Set digital trimpot motor</a>
|
||||
Set digital trimpot motor current using axis codes (X, Y, Z, E, B, S).
|
||||
M907 has no effect when the experimental Extruder motor current scaling mode is active (that applies to farm printing as well)
|
||||
#### Usage
|
||||
|
||||
M907 [ X | Y | Z | E | B | S ]
|
||||
|
@ -8441,16 +8434,20 @@ Sigma_Exit:
|
|||
{
|
||||
#ifdef TMC2130
|
||||
// See tmc2130_cur2val() for translation to 0 .. 63 range
|
||||
for (int i = 0; i < NUM_AXIS; i++)
|
||||
if(code_seen(axis_codes[i]))
|
||||
{
|
||||
long cur_mA = code_value_long();
|
||||
uint8_t val = tmc2130_cur2val(cur_mA);
|
||||
tmc2130_set_current_h(i, val);
|
||||
tmc2130_set_current_r(i, val);
|
||||
//if (i == E_AXIS) printf_P(PSTR("E-axis current=%ldmA\n"), cur_mA);
|
||||
}
|
||||
|
||||
for (uint_least8_t i = 0; i < NUM_AXIS; i++){
|
||||
if(code_seen(axis_codes[i])){
|
||||
if( i == E_AXIS && FarmOrUserECool() ){
|
||||
SERIAL_ECHORPGM(eMotorCurrentScalingEnabled);
|
||||
SERIAL_ECHOLNPGM(", M907 E ignored");
|
||||
continue;
|
||||
}
|
||||
long cur_mA = code_value_long();
|
||||
uint8_t val = tmc2130_cur2val(cur_mA);
|
||||
tmc2130_set_current_h(i, val);
|
||||
tmc2130_set_current_r(i, val);
|
||||
//if (i == E_AXIS) printf_P(PSTR("E-axis current=%ldmA\n"), cur_mA);
|
||||
}
|
||||
}
|
||||
#else //TMC2130
|
||||
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
|
||||
for(int i=0;i<NUM_AXIS;i++) if(code_seen(axis_codes[i])) st_current_set(i,code_value());
|
||||
|
@ -8675,7 +8672,7 @@ Sigma_Exit:
|
|||
case 350:
|
||||
{
|
||||
#ifdef TMC2130
|
||||
for (int i=0; i<NUM_AXIS; i++)
|
||||
for (uint_least8_t i=0; i<NUM_AXIS; i++)
|
||||
{
|
||||
if(code_seen(axis_codes[i]))
|
||||
{
|
||||
|
@ -9676,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
|
||||
|
@ -9755,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
|
||||
|
@ -9763,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())
|
||||
|
@ -11141,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();
|
||||
|
@ -11961,7 +11958,7 @@ void disable_force_z()
|
|||
#ifdef TMC2130
|
||||
tmc2130_mode=TMC2130_MODE_SILENT;
|
||||
update_mode_profile();
|
||||
tmc2130_init(true);
|
||||
tmc2130_init(TMCInitParams(true, FarmOrUserECool()));
|
||||
#endif // TMC2130
|
||||
}
|
||||
|
||||
|
@ -11975,7 +11972,7 @@ bEnableForce_z=true;
|
|||
#ifdef TMC2130
|
||||
tmc2130_mode=eeprom_read_byte((uint8_t*)EEPROM_SILENT)?TMC2130_MODE_SILENT:TMC2130_MODE_NORMAL;
|
||||
update_mode_profile();
|
||||
tmc2130_init(true);
|
||||
tmc2130_init(TMCInitParams(true, FarmOrUserECool()));
|
||||
#endif // TMC2130
|
||||
|
||||
WRITE(Z_ENABLE_PIN,Z_ENABLE_ON); // slightly redundant ;-p
|
||||
|
|
|
@ -325,6 +325,8 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
|||
| 0x0D0D 3341 | float | EEPROM_UVLO_RETRACT_ACCELL | ??? | ff ff ff ffh | Power panic saved retract acceleration | ??? | D3 Ax0d0d C4
|
||||
| 0x0D09 3337 | float | EEPROM_UVLO_TRAVEL_ACCELL | ??? | ff ff ff ffh | Power panic saved travel acceleration | ??? | D3 Ax0d09 C4
|
||||
| 0x0D05 3333 | uint32_t | EEPROM_JOB_ID | ??? | 00 00 00 00h | Job ID used by host software | D3 only | D3 Ax0d05 C4
|
||||
| 0x0D01 3329 | uint8_t | EEPROM_ECOOL_ENABLE | ffh 255 | ^ | Disable extruder motor scaling for non-farm print | LCD menu | D3 Ax0d01 FF
|
||||
| ^ | ^ | ^ | 2ah 42 | ^ | Enable extruder motor scaling for non-farm print | ^ | D3 Ax0d01 42
|
||||
|
||||
| Address begin | Bit/Type | Name | Valid values | Default/FactoryReset | Description | Gcode/Function| Debug code
|
||||
| :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--:
|
||||
|
@ -538,8 +540,10 @@ static Sheets * const EEPROM_Sheets_base = (Sheets*)(EEPROM_SHEETS_BASE);
|
|||
|
||||
#define EEPROM_JOB_ID (EEPROM_UVLO_TRAVEL_ACCELL-4) //uint32_t
|
||||
|
||||
#define EEPROM_ECOOL_ENABLE (EEPROM_JOB_ID-1) // uint8_t
|
||||
|
||||
//This is supposed to point to last item to allow EEPROM overrun check. Please update when adding new items.
|
||||
#define EEPROM_LAST_ITEM EEPROM_JOB_ID
|
||||
#define EEPROM_LAST_ITEM EEPROM_ECOOL_ENABLE
|
||||
// !!!!!
|
||||
// !!!!! this is end of EEPROM section ... all updates MUST BE inserted before this mark !!!!!
|
||||
// !!!!!
|
||||
|
@ -555,6 +559,7 @@ static Sheets * const EEPROM_Sheets_base = (Sheets*)(EEPROM_SHEETS_BASE);
|
|||
#define EEPROM_FIRMWARE_VERSION_MAJOR FW_PRUSA3D_MAGIC_LEN
|
||||
// Magic string, indicating that the current or the previous firmware running was the Prusa3D firmware.
|
||||
#define EEPROM_FIRMWARE_PRUSA_MAGIC 0
|
||||
#define EEPROM_ECOOL_MAGIC_NUMBER 42
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include "ConfigurationStore.h"
|
||||
|
|
|
@ -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")))
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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"; ////
|
||||
|
|
|
@ -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[];
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -1100,7 +1100,7 @@ FORCE_INLINE void advance_isr_scheduler() {
|
|||
void st_init()
|
||||
{
|
||||
#ifdef TMC2130
|
||||
tmc2130_init();
|
||||
tmc2130_init(TMCInitParams(false, FarmOrUserECool()));
|
||||
#endif //TMC2130
|
||||
|
||||
st_current_init(); //Initialize Digipot Motor Current
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
#include "language.h"
|
||||
#include "spi.h"
|
||||
|
||||
|
||||
|
||||
#define TMC2130_GCONF_NORMAL 0x00000000 // spreadCycle
|
||||
#define TMC2130_GCONF_SGSENS 0x00003180 // spreadCycle with stallguard (stall activates DIAG0 and DIAG1 [pushpull])
|
||||
#define TMC2130_GCONF_SILENT 0x00000004 // stealthChop
|
||||
|
@ -18,7 +16,6 @@
|
|||
|
||||
//mode
|
||||
uint8_t tmc2130_mode = TMC2130_MODE_NORMAL;
|
||||
//holding currents
|
||||
uint8_t tmc2130_current_h[4] = TMC2130_CURRENTS_H;
|
||||
//running currents
|
||||
uint8_t tmc2130_current_r[4] = TMC2130_CURRENTS_R;
|
||||
|
@ -45,6 +42,8 @@ uint8_t tmc2130_sg_thr_home[4] = TMC2130_SG_THRS_HOME;
|
|||
|
||||
uint8_t tmc2130_sg_homing_axes_mask = 0x00;
|
||||
|
||||
const char eMotorCurrentScalingEnabled[] PROGMEM = "E-motor current scaling enabled";
|
||||
|
||||
uint8_t tmc2130_sg_meassure = 0xff;
|
||||
uint32_t tmc2130_sg_meassure_cnt = 0;
|
||||
uint32_t tmc2130_sg_meassure_val = 0;
|
||||
|
@ -145,11 +144,7 @@ uint16_t __tcoolthrs(uint8_t axis)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
#ifdef PSU_Delta
|
||||
void tmc2130_init(bool bSupressFlag)
|
||||
#else
|
||||
void tmc2130_init()
|
||||
#endif
|
||||
void tmc2130_init(TMCInitParams params)
|
||||
{
|
||||
// DBG(_n("tmc2130_init(), mode=%S\n"), tmc2130_mode?_n("STEALTH"):_n("NORMAL"));
|
||||
WRITE(X_TMC2130_CS, HIGH);
|
||||
|
@ -194,7 +189,16 @@ void tmc2130_init()
|
|||
tmc2130_setup_chopper(axis, tmc2130_mres[axis], tmc2130_current_h[axis], tmc2130_current_r[axis]);
|
||||
tmc2130_wr(axis, TMC2130_REG_TPOWERDOWN, 0x00000000);
|
||||
#ifndef TMC2130_STEALTH_E
|
||||
tmc2130_wr(axis, TMC2130_REG_GCONF, TMC2130_GCONF_SGSENS);
|
||||
if( ! params.enableECool ){
|
||||
tmc2130_wr(axis, TMC2130_REG_GCONF, TMC2130_GCONF_SGSENS);
|
||||
} else {
|
||||
tmc2130_wr(axis, TMC2130_REG_COOLCONF, (((uint32_t)tmc2130_sg_thr[axis]) << 16));
|
||||
tmc2130_wr(axis, TMC2130_REG_TCOOLTHRS, 0);
|
||||
tmc2130_wr(axis, TMC2130_REG_GCONF, TMC2130_GCONF_SILENT);
|
||||
tmc2130_wr_PWMCONF(axis, TMC2130_PWM_AMPL_Ecool, TMC2130_PWM_GRAD_Ecool, tmc2130_pwm_freq[axis], TMC2130_PWM_AUTO_Ecool, 0, 0);
|
||||
tmc2130_wr_TPWMTHRS(axis, TMC2130_TPWMTHRS_E);
|
||||
SERIAL_ECHOLNRPGM(eMotorCurrentScalingEnabled);
|
||||
}
|
||||
#else //TMC2130_STEALTH_E
|
||||
tmc2130_wr(axis, TMC2130_REG_COOLCONF, (((uint32_t)tmc2130_sg_thr[axis]) << 16));
|
||||
tmc2130_wr(axis, TMC2130_REG_TCOOLTHRS, 0);
|
||||
|
@ -223,7 +227,7 @@ void tmc2130_init()
|
|||
#endif //TMC2130_LINEARITY_CORRECTION
|
||||
|
||||
#ifdef PSU_Delta
|
||||
if(!bSupressFlag)
|
||||
if(!params.bSuppressFlag)
|
||||
check_force_z();
|
||||
#endif // PSU_Delta
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#ifndef TMC2130_H
|
||||
#define TMC2130_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
//mode
|
||||
extern uint8_t tmc2130_mode;
|
||||
//holding and running currents
|
||||
extern uint8_t tmc2130_current_h[4];
|
||||
extern uint8_t tmc2130_current_r[4];
|
||||
//microstep resolution (0 means 256usteps, 8 means 1ustep
|
||||
|
@ -22,6 +22,8 @@ extern uint32_t tmc2130_sg_meassure_val;
|
|||
|
||||
extern uint8_t tmc2130_sg_homing_axes_mask;
|
||||
|
||||
extern const char eMotorCurrentScalingEnabled[];
|
||||
|
||||
#define TMC2130_MODE_NORMAL 0
|
||||
#define TMC2130_MODE_SILENT 1
|
||||
|
||||
|
@ -63,11 +65,23 @@ typedef struct
|
|||
extern tmc2130_chopper_config_t tmc2130_chopper_config[4];
|
||||
|
||||
//initialize tmc2130
|
||||
#ifdef PSU_Delta
|
||||
extern void tmc2130_init(bool bSupressFlag=false);
|
||||
|
||||
struct TMCInitParams {
|
||||
uint8_t bSuppressFlag : 1; // only relevant on MK3S with PSU_Delta
|
||||
uint8_t enableECool : 1; // experimental support for E-motor cooler operation
|
||||
inline TMCInitParams():bSuppressFlag(0), enableECool(0) { }
|
||||
inline explicit TMCInitParams(bool bSuppressFlag, bool enableECool):bSuppressFlag(bSuppressFlag), enableECool(enableECool) { }
|
||||
inline explicit TMCInitParams(bool enableECool)
|
||||
: bSuppressFlag(
|
||||
#ifdef PSU_delta
|
||||
1
|
||||
#else
|
||||
extern void tmc2130_init();
|
||||
0
|
||||
#endif
|
||||
)
|
||||
, enableECool(enableECool) { }
|
||||
};
|
||||
extern void tmc2130_init(TMCInitParams params);
|
||||
//check diag pins (called from stepper isr)
|
||||
extern void tmc2130_st_isr();
|
||||
//update stall guard (called from st_synchronize inside the loop)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -133,6 +133,9 @@ extern uint8_t farm_mode;
|
|||
extern int farm_timer;
|
||||
extern uint8_t farm_status;
|
||||
|
||||
extern bool UserECoolEnabled();
|
||||
extern bool FarmOrUserECool();
|
||||
|
||||
#ifdef TMC2130
|
||||
#define SILENT_MODE_NORMAL 0
|
||||
#define SILENT_MODE_STEALTH 1
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define CONFIGURATION_PRUSA_H
|
||||
|
||||
#include <limits.h>
|
||||
//-//
|
||||
|
||||
#include "printers.h"
|
||||
/*------------------------------------
|
||||
GENERAL SETTINGS
|
||||
|
@ -234,6 +234,11 @@
|
|||
#define TMC2130_PWM_AUTO_E 1 // PWMCONF
|
||||
#define TMC2130_PWM_FREQ_E 2 // PWMCONF
|
||||
|
||||
// experimental setting for E-motor cooler operation
|
||||
#define TMC2130_PWM_GRAD_Ecool 84 // PWMCONF 730mA @ 375mm/min 970mA phase peak at feedrate 900mm/min
|
||||
#define TMC2130_PWM_AMPL_Ecool 43 // PWMCONF 500mA phase peak at feedrate 10 mm/min
|
||||
#define TMC2130_PWM_AUTO_Ecool 0 // PWMCONF
|
||||
|
||||
#define TMC2130_TOFF_XYZ 3 // CHOPCONF // fchop = 27.778kHz
|
||||
#define TMC2130_TOFF_E 3 // CHOPCONF // fchop = 27.778kHz
|
||||
//#define TMC2130_TOFF_E 4 // CHOPCONF // fchop = 21.429kHz
|
||||
|
@ -247,6 +252,7 @@
|
|||
#define TMC2130_PWM_CLK (2 * TMC2130_FCLK / TMC2130_PWM_DIV) // PWM frequency (23.4kHz, 35.1kHz, 46.9kHz, 58.5kHz for 12MHz fclk)
|
||||
|
||||
#define TMC2130_TPWMTHRS 0 // TPWMTHRS - Sets the switching speed threshold based on TSTEP from stealthChop to spreadCycle mode
|
||||
#define TMC2130_TPWMTHRS_E 403 // Switch extruder from StealthChop to SpreadCycle at around 900mm/min
|
||||
#define TMC2130_THIGH 0 // THIGH - unused
|
||||
|
||||
//#define TMC2130_TCOOLTHRS_X 450 // TCOOLTHRS - coolstep treshold
|
||||
|
@ -265,6 +271,7 @@
|
|||
|
||||
//new settings is possible for vsense = 1, running current value > 31 set vsense to zero and shift both currents by 1 bit right (Z axis only)
|
||||
#define TMC2130_CURRENTS_H {16, 20, 35, 30} // default holding currents for all axes
|
||||
#define TMC2130_CURRENTS_FARM 36 // E 805 mA peak for ECool/farm mode
|
||||
#define TMC2130_CURRENTS_R {16, 20, 35, 30} // default running currents for all axes
|
||||
#define TMC2130_CURRENTS_R_HOME {8, 10, 20, 18} // homing running currents for all axes
|
||||
|
||||
|
|
|
@ -236,6 +236,11 @@
|
|||
#define TMC2130_PWM_AUTO_E 1 // PWMCONF
|
||||
#define TMC2130_PWM_FREQ_E 2 // PWMCONF
|
||||
|
||||
// experimental setting for E-motor cooler operation
|
||||
#define TMC2130_PWM_GRAD_Ecool 84 // PWMCONF 730mA @ 375mm/min 970mA phase peak at feedrate 900mm/min
|
||||
#define TMC2130_PWM_AMPL_Ecool 43 // PWMCONF 500mA phase peak at feedrate 10 mm/min
|
||||
#define TMC2130_PWM_AUTO_Ecool 0 // PWMCONF
|
||||
|
||||
#define TMC2130_TOFF_XYZ 3 // CHOPCONF // fchop = 27.778kHz
|
||||
#define TMC2130_TOFF_E 3 // CHOPCONF // fchop = 27.778kHz
|
||||
//#define TMC2130_TOFF_E 4 // CHOPCONF // fchop = 21.429kHz
|
||||
|
@ -249,6 +254,7 @@
|
|||
#define TMC2130_PWM_CLK (2 * TMC2130_FCLK / TMC2130_PWM_DIV) // PWM frequency (23.4kHz, 35.1kHz, 46.9kHz, 58.5kHz for 12MHz fclk)
|
||||
|
||||
#define TMC2130_TPWMTHRS 0 // TPWMTHRS - Sets the switching speed threshold based on TSTEP from stealthChop to spreadCycle mode
|
||||
#define TMC2130_TPWMTHRS_E 403 // Switch extruder from StealthChop to SpreadCycle at around 900mm/min
|
||||
#define TMC2130_THIGH 0 // THIGH - unused
|
||||
|
||||
//#define TMC2130_TCOOLTHRS_X 450 // TCOOLTHRS - coolstep treshold
|
||||
|
@ -267,6 +273,7 @@
|
|||
|
||||
//new settings is possible for vsense = 1, running current value > 31 set vsense to zero and shift both currents by 1 bit right (Z axis only)
|
||||
#define TMC2130_CURRENTS_H {16, 20, 35, 30} // default holding currents for all axes
|
||||
#define TMC2130_CURRENTS_FARM 36 // E 805 mA peak for ECool/farm mode
|
||||
#define TMC2130_CURRENTS_R {16, 20, 35, 30} // default running currents for all axes
|
||||
#define TMC2130_CURRENTS_R_HOME {8, 10, 20, 18} // homing running currents for all axes
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -45,17 +45,18 @@ rm_if_exists update_lang_de.out
|
|||
rm_if_exists update_lang_es.out
|
||||
rm_if_exists update_lang_fr.out
|
||||
rm_if_exists update_lang_it.out
|
||||
rm_if_exists update_lang_nl.out
|
||||
rm_if_exists update_lang_pl.out
|
||||
rm_if_exists lang.bin
|
||||
rm_if_exists lang.hex
|
||||
#Community language support
|
||||
#Dutch
|
||||
rm_if_exists firmware_nl.hex
|
||||
rm_if_exists update_lang_nl.out
|
||||
|
||||
#Use the 2 lines below as a template and replace 'qr'
|
||||
##New language
|
||||
#rm_if_exists firmware_qr.hex
|
||||
#rm_if_exists update_lang_qr.out
|
||||
|
||||
echo -n "fw-clean.sh finished" >&2
|
||||
if [ $result -eq 0 ]; then
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
516
lang/lang_en.txt
516
lang/lang_en.txt
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
1070
lang/po/Firmware.pot
1070
lang/po/Firmware.pot
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
3097
lang/po/new/cs.po
3097
lang/po/new/cs.po
File diff suppressed because it is too large
Load diff
1247
lang/po/new/de.po
1247
lang/po/new/de.po
File diff suppressed because it is too large
Load diff
1283
lang/po/new/es.po
1283
lang/po/new/es.po
File diff suppressed because it is too large
Load diff
1237
lang/po/new/fr.po
1237
lang/po/new/fr.po
File diff suppressed because it is too large
Load diff
1281
lang/po/new/it.po
1281
lang/po/new/it.po
File diff suppressed because it is too large
Load diff
3609
lang/po/new/nl.po
3609
lang/po/new/nl.po
File diff suppressed because it is too large
Load diff
1237
lang/po/new/pl.po
1237
lang/po/new/pl.po
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue