Merge branch 'MK3' into PFW-210

This commit is contained in:
MRprusa3d 2019-02-14 00:05:50 +01:00 committed by GitHub
commit 80c3420a12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
58 changed files with 6710 additions and 4204 deletions

20
.gitignore vendored
View File

@ -16,6 +16,25 @@ Firmware/Doc
/html /html
/latex /latex
/Doxyfile /Doxyfile
/Firmware/builds/1_75mm_MK3-EINY04-E3Dv6full
/Firmware/Configuration_prusa.h.bak
/Firmware/Configuration_prusa_backup.h
/Firmware/ultralcd_implementation_hitachi_HD44780.h.bak
/Firmware/ultralcd.cpp.bak
/Firmware/temperature.cpp.bak
/Firmware/pins.h.bak
/Firmware/Marlin_main.cpp.bak
/Firmware/language_pl.h.bak
/Firmware/language_it.h.bak
/Firmware/language_es.h.bak
/Firmware/language_en.h.bak
/Firmware/language_de.h.bak
/Firmware/language_cz.h.bak
/Firmware/variants/1_75mm_MK2-MultiMaterial-RAMBo13a-E3Dv6full.h
/Firmware/variants/1_75mm_MK2-MultiMaterial-RAMBo10a-E3Dv6full.h
/Firmware/variants/1_75mm_MK2-EINY01-E3Dv6full.h.bak
/Firmware/variants/1_75mm_MK1-RAMBo13a-E3Dv6full.h
/Firmware/variants/1_75mm_MK1-RAMBo10a-E3Dv6full.h
/lang/*.bin /lang/*.bin
/lang/*.hex /lang/*.hex
/lang/*.dat /lang/*.dat
@ -30,3 +49,4 @@ Firmware/Doc
/lang/text.sym /lang/text.sym
/lang/textaddr.txt /lang/textaddr.txt
/build-env/ /build-env/
/Firmware/Firmware.vcxproj

View File

@ -7,8 +7,8 @@
#define STR(x) STR_HELPER(x) #define STR(x) STR_HELPER(x)
// Firmware version // Firmware version
#define FW_VERSION "3.5.1" #define FW_VERSION "3.5.2"
#define FW_COMMIT_NR 1778 #define FW_COMMIT_NR 1999
// FW_VERSION_UNKNOWN means this is an unofficial build. // FW_VERSION_UNKNOWN means this is an unofficial build.
// The firmware should only be checked into github with this symbol. // The firmware should only be checked into github with this symbol.
#define FW_DEV_VERSION FW_VERSION_UNKNOWN #define FW_DEV_VERSION FW_VERSION_UNKNOWN
@ -475,7 +475,8 @@ your extruder heater takes 2 minutes to hit the target on heating.
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency // which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE. // is too low, you should also increment SOFT_PWM_SCALE.
//#define FAN_SOFT_PWM #define FAN_SOFT_PWM
#define FAN_SOFT_PWM_BITS 4 //PWM bit resolution = 4bits, freq = 62.5Hz
// Incrementing this by 1 will double the software PWM frequency, // Incrementing this by 1 will double the software PWM frequency,
// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // affecting heaters, and the fan if FAN_SOFT_PWM is enabled.

View File

@ -16,8 +16,7 @@
#include <avr/pgmspace.h> #include <avr/pgmspace.h>
#include <avr/eeprom.h> #include <avr/eeprom.h>
#include <avr/interrupt.h> #include <avr/interrupt.h>
#include "system_timer.h"
#include "fastio.h" #include "fastio.h"
#include "Configuration.h" #include "Configuration.h"
#include "pins.h" #include "pins.h"
@ -259,10 +258,22 @@ void refresh_cmd_timeout(void);
// The standard Arduino timer() function returns this value atomically // The standard Arduino timer() function returns this value atomically
// by disabling / enabling interrupts. This is costly, if the interrupts are known // by disabling / enabling interrupts. This is costly, if the interrupts are known
// to be disabled. // to be disabled.
#ifdef SYSTEM_TIMER_2
extern volatile unsigned long timer2_millis;
#else //SYSTEM_TIMER_2
extern volatile unsigned long timer0_millis; extern volatile unsigned long timer0_millis;
// An unsynchronized equivalent to a standard Arduino millis() function. #endif //SYSTEM_TIMER_2
// An unsynchronized equivalent to a standard Arduino _millis() function.
// To be used inside an interrupt routine. // To be used inside an interrupt routine.
FORCE_INLINE unsigned long millis_nc() { return timer0_millis; }
FORCE_INLINE unsigned long millis_nc() {
#ifdef SYSTEM_TIMER_2
return timer2_millis;
#else //SYSTEM_TIMER_2
return timer0_millis;
#endif //SYSTEM_TIMER_2
}
#ifdef FAST_PWM_FAN #ifdef FAST_PWM_FAN
void setPwmFrequency(uint8_t pin, int val); void setPwmFrequency(uint8_t pin, int val);
@ -372,6 +383,7 @@ extern LongTimer safetyTimer;
#define PRINT_PERCENT_DONE_INIT 0xff #define PRINT_PERCENT_DONE_INIT 0xff
#define PRINTER_ACTIVE (IS_SD_PRINTING || is_usb_printing || isPrintPaused || (custom_message_type == CUSTOM_MSG_TYPE_TEMCAL) || saved_printing || (lcd_commands_type == LCD_COMMAND_V2_CAL) || card.paused || mmu_print_saved) #define PRINTER_ACTIVE (IS_SD_PRINTING || is_usb_printing || isPrintPaused || (custom_message_type == CUSTOM_MSG_TYPE_TEMCAL) || saved_printing || (lcd_commands_type == LCD_COMMAND_V2_CAL) || card.paused || mmu_print_saved)
#define CHECK_FSENSOR ((IS_SD_PRINTING || is_usb_printing) && (mcode_in_progress != 600) && !saved_printing && e_active())
extern void calculate_extruder_multipliers(); extern void calculate_extruder_multipliers();

View File

@ -142,6 +142,7 @@
#define PRINTING_TYPE_SD 0 #define PRINTING_TYPE_SD 0
#define PRINTING_TYPE_USB 1 #define PRINTING_TYPE_USB 1
#define PRINTING_TYPE_NONE 2
//filament types //filament types
#define FILAMENT_DEFAULT 0 #define FILAMENT_DEFAULT 0
@ -163,7 +164,7 @@
CardReader card; CardReader card;
#endif #endif
unsigned long PingTime = millis(); unsigned long PingTime = _millis();
unsigned long NcTime; unsigned long NcTime;
@ -196,15 +197,15 @@ bool homing_flag = false;
bool temp_cal_active = false; bool temp_cal_active = false;
unsigned long kicktime = millis()+100000; unsigned long kicktime = _millis()+100000;
unsigned int usb_printing_counter; unsigned int usb_printing_counter;
int8_t lcd_change_fil_state = 0; int8_t lcd_change_fil_state = 0;
unsigned long pause_time = 0; unsigned long pause_time = 0;
unsigned long start_pause_print = millis(); unsigned long start_pause_print = _millis();
unsigned long t_fan_rising_edge = millis(); unsigned long t_fan_rising_edge = _millis();
LongTimer safetyTimer; LongTimer safetyTimer;
static LongTimer crashDetTimer; static LongTimer crashDetTimer;
@ -912,7 +913,7 @@ void update_sec_lang_from_external_flash()
{ {
fputs_P(PSTR(ESC_H(1,3) "Language update."), lcdout); fputs_P(PSTR(ESC_H(1,3) "Language update."), lcdout);
for (uint8_t i = 0; i < state; i++) fputc('.', lcdout); for (uint8_t i = 0; i < state; i++) fputc('.', lcdout);
delay(100); _delay(100);
boot_reserved = (state + 1) | (lang << 4); boot_reserved = (state + 1) | (lang << 4);
if ((state * LANGBOOT_BLOCKSIZE) < header.size) if ((state * LANGBOOT_BLOCKSIZE) < header.size)
{ {
@ -991,6 +992,10 @@ void setup()
ultralcd_init(); ultralcd_init();
#if (LCD_BL_PIN != -1) && defined (LCD_BL_PIN)
analogWrite(LCD_BL_PIN, 255); //set full brightnes
#endif //(LCD_BL_PIN != -1) && defined (LCD_BL_PIN)
spi_init(); spi_init();
lcd_splash(); lcd_splash();
@ -1310,9 +1315,9 @@ void setup()
for (uint16_t phase = (tmc2130_rd_MSCNT(Z_AXIS) + 8) >> 4; phase > 0; -- phase) { for (uint16_t phase = (tmc2130_rd_MSCNT(Z_AXIS) + 8) >> 4; phase > 0; -- phase) {
// Until the phase counter is reset to zero. // Until the phase counter is reset to zero.
WRITE(Z_STEP_PIN, !INVERT_Z_STEP_PIN); WRITE(Z_STEP_PIN, !INVERT_Z_STEP_PIN);
delay(2); _delay(2);
WRITE(Z_STEP_PIN, INVERT_Z_STEP_PIN); WRITE(Z_STEP_PIN, INVERT_Z_STEP_PIN);
delay(2); _delay(2);
} }
} }
#endif //TMC2130 #endif //TMC2130
@ -1358,16 +1363,16 @@ void setup()
uint32_t sumw = 0; uint32_t sumw = 0;
for (int i = 0; i < 1024; i++) for (int i = 0; i < 1024; i++)
{ {
uint32_t u = micros(); uint32_t u = _micros();
bool res = card.card.readBlock(i, buff); bool res = card.card.readBlock(i, buff);
u = micros() - u; u = _micros() - u;
if (res) if (res)
{ {
printf_P(PSTR("readBlock %4d 512 bytes %lu us\n"), i, u); printf_P(PSTR("readBlock %4d 512 bytes %lu us\n"), i, u);
sumr += u; sumr += u;
u = micros(); u = _micros();
res = card.card.writeBlock(i, buff); res = card.card.writeBlock(i, buff);
u = micros() - u; u = _micros() - u;
if (res) if (res)
{ {
printf_P(PSTR("writeBlock %4d 512 bytes %lu us\n"), i, u); printf_P(PSTR("writeBlock %4d 512 bytes %lu us\n"), i, u);
@ -1478,9 +1483,9 @@ void setup()
setup_fan_interrupt(); setup_fan_interrupt();
#endif //DEBUG_DISABLE_FANCHECK #endif //DEBUG_DISABLE_FANCHECK
#ifdef FILAMENT_SENSOR #ifdef PAT9125
fsensor_setup_interrupt(); fsensor_setup_interrupt();
#endif //FILAMENT_SENSOR #endif //PAT9125
for (int i = 0; i<4; i++) EEPROM_read_B(EEPROM_BOWDEN_LENGTH + i * 2, &bowden_length[i]); for (int i = 0; i<4; i++) EEPROM_read_B(EEPROM_BOWDEN_LENGTH + i * 2, &bowden_length[i]);
#ifndef DEBUG_DISABLE_STARTMSGS #ifndef DEBUG_DISABLE_STARTMSGS
@ -1612,7 +1617,6 @@ void setup()
} }
#endif //UVLO_SUPPORT #endif //UVLO_SUPPORT
KEEPALIVE_STATE(NOT_BUSY); KEEPALIVE_STATE(NOT_BUSY);
#ifdef WATCHDOG #ifdef WATCHDOG
wdt_enable(WDTO_4S); wdt_enable(WDTO_4S);
@ -1700,7 +1704,7 @@ void serial_read_stream() {
*/ */
void host_keepalive() { void host_keepalive() {
if (farm_mode) return; if (farm_mode) return;
long ms = millis(); long ms = _millis();
if (host_keepalive_interval && busy_state != NOT_BUSY) { if (host_keepalive_interval && busy_state != NOT_BUSY) {
if ((ms - prev_busy_signal_ms) < (long)(1000L * host_keepalive_interval)) return; if ((ms - prev_busy_signal_ms) < (long)(1000L * host_keepalive_interval)) return;
switch (busy_state) { switch (busy_state) {
@ -1731,11 +1735,11 @@ void loop()
{ {
KEEPALIVE_STATE(NOT_BUSY); KEEPALIVE_STATE(NOT_BUSY);
if ((usb_printing_counter > 0) && ((millis()-_usb_timer) > 1000)) if ((usb_printing_counter > 0) && ((_millis()-_usb_timer) > 1000))
{ {
is_usb_printing = true; is_usb_printing = true;
usb_printing_counter--; usb_printing_counter--;
_usb_timer = millis(); _usb_timer = _millis();
} }
if (usb_printing_counter == 0) if (usb_printing_counter == 0)
{ {
@ -1887,7 +1891,7 @@ static int setup_for_endstop_move(bool enable_endstops_now = true) {
saved_feedrate = feedrate; saved_feedrate = feedrate;
int l_feedmultiply = feedmultiply; int l_feedmultiply = feedmultiply;
feedmultiply = 100; feedmultiply = 100;
previous_millis_cmd = millis(); previous_millis_cmd = _millis();
enable_endstops(enable_endstops_now); enable_endstops(enable_endstops_now);
return l_feedmultiply; return l_feedmultiply;
@ -1901,7 +1905,7 @@ static void clean_up_after_endstop_move(int original_feedmultiply) {
feedrate = saved_feedrate; feedrate = saved_feedrate;
feedmultiply = original_feedmultiply; feedmultiply = original_feedmultiply;
previous_millis_cmd = millis(); previous_millis_cmd = _millis();
} }
@ -2089,8 +2093,8 @@ bool calibrate_z_auto()
{ {
//lcd_display_message_fullscreen_P(_T(MSG_CALIBRATE_Z_AUTO)); //lcd_display_message_fullscreen_P(_T(MSG_CALIBRATE_Z_AUTO));
lcd_clear(); lcd_clear();
lcd_puts_at_P(0,1, _T(MSG_CALIBRATE_Z_AUTO)); lcd_puts_at_P(0, 1, _T(MSG_CALIBRATE_Z_AUTO));
bool endstops_enabled = enable_endstops(true); bool endstops_enabled = enable_endstops(true);
int axis_up_dir = -home_dir(Z_AXIS); int axis_up_dir = -home_dir(Z_AXIS);
tmc2130_home_enter(Z_AXIS_MASK); tmc2130_home_enter(Z_AXIS_MASK);
current_position[Z_AXIS] = 0; current_position[Z_AXIS] = 0;
@ -2098,21 +2102,26 @@ bool calibrate_z_auto()
set_destination_to_current(); set_destination_to_current();
destination[Z_AXIS] += (1.1 * max_length(Z_AXIS) * axis_up_dir); destination[Z_AXIS] += (1.1 * max_length(Z_AXIS) * axis_up_dir);
feedrate = homing_feedrate[Z_AXIS]; feedrate = homing_feedrate[Z_AXIS];
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate / 60, active_extruder);
st_synchronize(); st_synchronize();
// current_position[axis] = 0; // current_position[axis] = 0;
// plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); // plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
tmc2130_home_exit(); tmc2130_home_exit();
enable_endstops(false); enable_endstops(false);
current_position[Z_AXIS] = 0; current_position[Z_AXIS] = 0;
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
set_destination_to_current(); set_destination_to_current();
destination[Z_AXIS] += 10 * axis_up_dir; //10mm up destination[Z_AXIS] += 10 * axis_up_dir; //10mm up
feedrate = homing_feedrate[Z_AXIS] / 2; feedrate = homing_feedrate[Z_AXIS] / 2;
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate / 60, active_extruder);
st_synchronize(); st_synchronize();
enable_endstops(endstops_enabled); enable_endstops(endstops_enabled);
current_position[Z_AXIS] = Z_MAX_POS+2.0; if (PRINTER_TYPE == PRINTER_MK3) {
current_position[Z_AXIS] = Z_MAX_POS + 2.0;
}
else {
current_position[Z_AXIS] = Z_MAX_POS + 9.0;
}
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
return true; return true;
} }
@ -2276,7 +2285,7 @@ void home_xy()
void refresh_cmd_timeout(void) void refresh_cmd_timeout(void)
{ {
previous_millis_cmd = millis(); previous_millis_cmd = _millis();
} }
#ifdef FWRETRACT #ifdef FWRETRACT
@ -2316,10 +2325,10 @@ void refresh_cmd_timeout(void)
void trace() { void trace() {
//if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) //if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
tone(BEEPER, 440); _tone(BEEPER, 440);
delay(25); _delay(25);
noTone(BEEPER); _noTone(BEEPER);
delay(20); _delay(20);
} }
/* /*
void ramming() { void ramming() {
@ -2380,7 +2389,7 @@ void ramming() {
//plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600/60, active_extruder); //delay //plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600/60, active_extruder); //delay
//current_position[X_AXIS] -= 23; //delay //current_position[X_AXIS] -= 23; //delay
//plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600/60, active_extruder); //delay //plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600/60, active_extruder); //delay
delay(4700); _delay(4700);
max_feedrate[E_AXIS] = 80; max_feedrate[E_AXIS] = 80;
current_position[E_AXIS] -= 92; current_position[E_AXIS] -= 92;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 9900 / 60, active_extruder); plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 9900 / 60, active_extruder);
@ -2487,7 +2496,7 @@ void gcode_G28(bool home_x_axis, long home_x_value, bool home_y_axis, long home_
saved_feedrate = feedrate; saved_feedrate = feedrate;
int l_feedmultiply = feedmultiply; int l_feedmultiply = feedmultiply;
feedmultiply = 100; feedmultiply = 100;
previous_millis_cmd = millis(); previous_millis_cmd = _millis();
enable_endstops(true); enable_endstops(true);
@ -2675,7 +2684,7 @@ void gcode_G28(bool home_x_axis, long home_x_value, bool home_y_axis, long home_
feedrate = saved_feedrate; feedrate = saved_feedrate;
feedmultiply = l_feedmultiply; feedmultiply = l_feedmultiply;
previous_millis_cmd = millis(); previous_millis_cmd = _millis();
endstops_hit_on_purpose(); endstops_hit_on_purpose();
#ifndef MESH_BED_LEVELING #ifndef MESH_BED_LEVELING
// If MESH_BED_LEVELING is not active, then it is the original Prusa i3. // If MESH_BED_LEVELING is not active, then it is the original Prusa i3.
@ -3073,6 +3082,11 @@ static void gcode_M600(bool automatic, float x_position, float y_position, float
sprintf_P(cmd, PSTR("M220 S%i"), feedmultiplyBckp); sprintf_P(cmd, PSTR("M220 S%i"), feedmultiplyBckp);
enquecommand(cmd); enquecommand(cmd);
#ifdef IR_SENSOR
//this will set fsensor_watch_autoload to correct value and prevent possible M701 gcode enqueuing when M600 is finished
fsensor_check_autoload();
#endif //IR_SENSOR
lcd_setstatuspgm(_T(WELCOME_MSG)); lcd_setstatuspgm(_T(WELCOME_MSG));
custom_message_type = CUSTOM_MSG_TYPE_STATUS; custom_message_type = CUSTOM_MSG_TYPE_STATUS;
} }
@ -3110,9 +3124,9 @@ void gcode_M701()
load_filament_final_feed(); //slow sequence load_filament_final_feed(); //slow sequence
st_synchronize(); st_synchronize();
if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) tone(BEEPER, 500); if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) _tone(BEEPER, 500);
delay_keep_alive(50); delay_keep_alive(50);
noTone(BEEPER); _noTone(BEEPER);
if (!farm_mode && loading_flag) { if (!farm_mode && loading_flag) {
lcd_load_filament_color_check(); lcd_load_filament_color_check();
@ -3175,10 +3189,10 @@ static void gcode_PRUSA_SN()
putchar('\n'); putchar('\n');
#if 0 #if 0
for (int b = 0; b < 3; b++) { for (int b = 0; b < 3; b++) {
tone(BEEPER, 110); _tone(BEEPER, 110);
delay(50); _delay(50);
noTone(BEEPER); _noTone(BEEPER);
delay(50); _delay(50);
} }
#endif #endif
} else { } else {
@ -3450,15 +3464,15 @@ void process_commands()
} }
#endif //BACKLASH_Y #endif //BACKLASH_Y
#endif //TMC2130 #endif //TMC2130
#ifdef PAT9125 #ifdef FILAMENT_SENSOR
else if (code_seen("FSENSOR_RECOVER")) { //! FSENSOR_RECOVER else if (code_seen("FSENSOR_RECOVER")) { //! FSENSOR_RECOVER
fsensor_restore_print_and_continue(); fsensor_restore_print_and_continue();
} }
#endif //PAT9125 #endif //FILAMENT_SENSOR
else if(code_seen("PRUSA")){ else if(code_seen("PRUSA")){
if (code_seen("Ping")) { //! PRUSA Ping if (code_seen("Ping")) { //! PRUSA Ping
if (farm_mode) { if (farm_mode) {
PingTime = millis(); PingTime = _millis();
//MYSERIAL.print(farm_no); MYSERIAL.println(": OK"); //MYSERIAL.print(farm_no); MYSERIAL.println(": OK");
} }
} }
@ -3544,7 +3558,7 @@ void process_commands()
} else if(code_seen("Beat")) { //! PRUSA Beat } else if(code_seen("Beat")) { //! PRUSA Beat
// Kick farm link timer // Kick farm link timer
kicktime = millis(); kicktime = _millis();
} else if(code_seen("FR")) { //! PRUSA FR } else if(code_seen("FR")) { //! PRUSA FR
// Factory full reset // Factory full reset
@ -3611,7 +3625,7 @@ void process_commands()
disable_e0(); disable_e0();
disable_e1(); disable_e1();
disable_e2(); disable_e2();
delay(100); _delay(100);
//LCD_ALERTMESSAGEPGM(_T(MSG_FILAMENTCHANGE)); //LCD_ALERTMESSAGEPGM(_T(MSG_FILAMENTCHANGE));
uint8_t cnt=0; uint8_t cnt=0;
@ -3778,9 +3792,9 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
if(code_seen('S')) codenum = code_value() * 1000; // seconds to wait if(code_seen('S')) codenum = code_value() * 1000; // seconds to wait
if(codenum != 0) LCD_MESSAGERPGM(_n("Sleep..."));////MSG_DWELL c=0 r=0 if(codenum != 0) LCD_MESSAGERPGM(_n("Sleep..."));////MSG_DWELL c=0 r=0
st_synchronize(); st_synchronize();
codenum += millis(); // keep track of when we started waiting codenum += _millis(); // keep track of when we started waiting
previous_millis_cmd = millis(); previous_millis_cmd = _millis();
while(millis() < codenum) { while(_millis() < codenum) {
manage_heater(); manage_heater();
manage_inactivity(); manage_inactivity();
lcd_update(0); lcd_update(0);
@ -4606,14 +4620,15 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
} }
if (correction == 0) if (correction == 0)
continue; continue;
float offset = float(correction) * 0.001f;
if (fabs(offset) > 0.101f) { if (labs(correction) > BED_ADJUSTMENT_UM_MAX) {
SERIAL_ERROR_START; SERIAL_ERROR_START;
SERIAL_ECHOPGM("Excessive bed leveling correction: "); SERIAL_ECHOPGM("Excessive bed leveling correction: ");
SERIAL_ECHO(offset); SERIAL_ECHO(correction);
SERIAL_ECHOLNPGM(" microns"); SERIAL_ECHOLNPGM(" microns");
} }
else { else {
float offset = float(correction) * 0.001f;
switch (i) { switch (i) {
case 0: case 0:
for (uint8_t row = 0; row < 3; ++row) { for (uint8_t row = 0; row < 3; ++row) {
@ -4798,7 +4813,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
case 98: //! G98 (activate farm mode) case 98: //! G98 (activate farm mode)
farm_mode = 1; farm_mode = 1;
PingTime = millis(); PingTime = _millis();
eeprom_update_byte((unsigned char *)EEPROM_FARM_MODE, farm_mode); eeprom_update_byte((unsigned char *)EEPROM_FARM_MODE, farm_mode);
EEPROM_save_B(EEPROM_FARM_NUMBER, &farm_no); EEPROM_save_B(EEPROM_FARM_NUMBER, &farm_no);
SilentModeMenu = SILENT_MODE_OFF; SilentModeMenu = SILENT_MODE_OFF;
@ -4863,11 +4878,11 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
lcd_ignore_click(); //call lcd_ignore_click aslo for else ??? lcd_ignore_click(); //call lcd_ignore_click aslo for else ???
st_synchronize(); st_synchronize();
previous_millis_cmd = millis(); previous_millis_cmd = _millis();
if (codenum > 0){ if (codenum > 0){
codenum += millis(); // keep track of when we started waiting codenum += _millis(); // keep track of when we started waiting
KEEPALIVE_STATE(PAUSED_FOR_USER); KEEPALIVE_STATE(PAUSED_FOR_USER);
while(millis() < codenum && !lcd_clicked()){ while(_millis() < codenum && !lcd_clicked()){
manage_heater(); manage_heater();
manage_inactivity(true); manage_inactivity(true);
lcd_update(0); lcd_update(0);
@ -4924,7 +4939,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
if (!card.paused) if (!card.paused)
failstats_reset_print(); failstats_reset_print();
card.startFileprint(); card.startFileprint();
starttime=millis(); starttime=_millis();
break; break;
case 25: //M25 - Pause SD print case 25: //M25 - Pause SD print
card.pauseSDPrint(); card.pauseSDPrint();
@ -4994,7 +5009,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
card.setIndex(code_value_long()); card.setIndex(code_value_long());
card.startFileprint(); card.startFileprint();
if(!call_procedure) if(!call_procedure)
starttime=millis(); //procedure calls count as normal print time. starttime=_millis(); //procedure calls count as normal print time.
} }
} break; } break;
case 928: //M928 - Start SD write case 928: //M928 - Start SD write
@ -5011,7 +5026,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
case 31: //M31 take time since the start of the SD print or an M109 command case 31: //M31 take time since the start of the SD print or an M109 command
{ {
stoptime=millis(); stoptime=_millis();
char time[30]; char time[30];
unsigned long t=(stoptime-starttime)/1000; unsigned long t=(stoptime-starttime)/1000;
int sec,min; int sec,min;
@ -5287,9 +5302,9 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
double radius=0.0, theta=0.0, x_sweep, y_sweep; double radius=0.0, theta=0.0, x_sweep, y_sweep;
int rotational_direction, l; int rotational_direction, l;
rotational_direction = (unsigned long) millis() & 0x0001; // clockwise or counter clockwise rotational_direction = (unsigned long) _millis() & 0x0001; // clockwise or counter clockwise
radius = (unsigned long) millis() % (long) (X_MAX_LENGTH/4); // limit how far out to go radius = (unsigned long) _millis() % (long) (X_MAX_LENGTH/4); // limit how far out to go
theta = (float) ((unsigned long) millis() % (long) 360) / (360./(2*3.1415926)); // turn into radians theta = (float) ((unsigned long) _millis() % (long) 360) / (360./(2*3.1415926)); // turn into radians
//SERIAL_ECHOPAIR("starting radius: ",radius); //SERIAL_ECHOPAIR("starting radius: ",radius);
//SERIAL_ECHOPAIR(" theta: ",theta); //SERIAL_ECHOPAIR(" theta: ",theta);
@ -5298,11 +5313,11 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
for( l=0; l<n_legs-1; l++) { for( l=0; l<n_legs-1; l++) {
if (rotational_direction==1) if (rotational_direction==1)
theta += (float) ((unsigned long) millis() % (long) 20) / (360.0/(2*3.1415926)); // turn into radians theta += (float) ((unsigned long) _millis() % (long) 20) / (360.0/(2*3.1415926)); // turn into radians
else else
theta -= (float) ((unsigned long) millis() % (long) 20) / (360.0/(2*3.1415926)); // turn into radians theta -= (float) ((unsigned long) _millis() % (long) 20) / (360.0/(2*3.1415926)); // turn into radians
radius += (float) ( ((long) ((unsigned long) millis() % (long) 10)) - 5); radius += (float) ( ((long) ((unsigned long) _millis() % (long) 10)) - 5);
if ( radius<0.0 ) if ( radius<0.0 )
radius = -radius; radius = -radius;
@ -5379,7 +5394,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
} }
delay(1000); _delay(1000);
clean_up_after_endstop_move(l_feedmultiply); clean_up_after_endstop_move(l_feedmultiply);
@ -5557,7 +5572,7 @@ Sigma_Exit:
#endif #endif
setWatch(); setWatch();
codenum = millis(); codenum = _millis();
/* See if we are heating up or cooling down */ /* See if we are heating up or cooling down */
target_direction = isHeatingHotend(extruder); // true if heating, false if cooling target_direction = isHeatingHotend(extruder); // true if heating, false if cooling
@ -5573,8 +5588,8 @@ Sigma_Exit:
heating_status = 2; heating_status = 2;
if (farm_mode) { prusa_statistics(2); }; if (farm_mode) { prusa_statistics(2); };
//starttime=millis(); //starttime=_millis();
previous_millis_cmd = millis(); previous_millis_cmd = _millis();
} }
break; break;
case 190: // M190 - Wait for bed heater to reach target. case 190: // M190 - Wait for bed heater to reach target.
@ -5592,7 +5607,7 @@ Sigma_Exit:
setTargetBed(code_value()); setTargetBed(code_value());
CooldownNoWait = false; CooldownNoWait = false;
} }
codenum = millis(); codenum = _millis();
cancel_heatup = false; cancel_heatup = false;
target_direction = isHeatingBed(); // true if heating, false if cooling target_direction = isHeatingBed(); // true if heating, false if cooling
@ -5600,7 +5615,7 @@ Sigma_Exit:
KEEPALIVE_STATE(NOT_BUSY); KEEPALIVE_STATE(NOT_BUSY);
while ( (target_direction)&&(!cancel_heatup) ? (isHeatingBed()) : (isCoolingBed()&&(CooldownNoWait==false)) ) while ( (target_direction)&&(!cancel_heatup) ? (isHeatingBed()) : (isCoolingBed()&&(CooldownNoWait==false)) )
{ {
if(( millis() - codenum) > 1000 ) //Print Temp Reading every 1 second while heating up. if(( _millis() - codenum) > 1000 ) //Print Temp Reading every 1 second while heating up.
{ {
if (!farm_mode) { if (!farm_mode) {
float tt = degHotend(active_extruder); float tt = degHotend(active_extruder);
@ -5612,7 +5627,7 @@ Sigma_Exit:
SERIAL_PROTOCOL_F(degBed(), 1); SERIAL_PROTOCOL_F(degBed(), 1);
SERIAL_PROTOCOLLN(""); SERIAL_PROTOCOLLN("");
} }
codenum = millis(); codenum = _millis();
} }
manage_heater(); manage_heater();
@ -5623,7 +5638,7 @@ Sigma_Exit:
KEEPALIVE_STATE(IN_HANDLER); KEEPALIVE_STATE(IN_HANDLER);
heating_status = 4; heating_status = 4;
previous_millis_cmd = millis(); previous_millis_cmd = _millis();
#endif #endif
break; break;
@ -5668,7 +5683,7 @@ Sigma_Exit:
disable_e2(); disable_e2();
finishAndDisableSteppers(); finishAndDisableSteppers();
fanSpeed = 0; fanSpeed = 0;
delay(1000); // Wait a little before to switch off _delay(1000); // Wait a little before to switch off
#if defined(SUICIDE_PIN) && SUICIDE_PIN > -1 #if defined(SUICIDE_PIN) && SUICIDE_PIN > -1
st_synchronize(); st_synchronize();
suicide(); suicide();
@ -6221,7 +6236,7 @@ Sigma_Exit:
#endif #endif
servos[servo_index].write(servo_position); servos[servo_index].write(servo_position);
#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0) #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
delay(PROBE_SERVO_DEACTIVATION_DELAY); _delay(PROBE_SERVO_DEACTIVATION_DELAY);
servos[servo_index].detach(); servos[servo_index].detach();
#endif #endif
} }
@ -6253,14 +6268,14 @@ Sigma_Exit:
{ {
#if BEEPER > 0 #if BEEPER > 0
if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
tone(BEEPER, beepS); _tone(BEEPER, beepS);
delay(beepP); _delay(beepP);
noTone(BEEPER); _noTone(BEEPER);
#endif #endif
} }
else else
{ {
delay(beepP); _delay(beepP);
} }
} }
break; break;
@ -6319,7 +6334,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
SET_OUTPUT(CHDK); SET_OUTPUT(CHDK);
WRITE(CHDK, HIGH); WRITE(CHDK, HIGH);
chdkHigh = millis(); chdkHigh = _millis();
chdkActive = true; chdkActive = true;
#else #else
@ -6333,7 +6348,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
WRITE(PHOTOGRAPH_PIN, LOW); WRITE(PHOTOGRAPH_PIN, LOW);
_delay_ms(PULSE_LENGTH); _delay_ms(PULSE_LENGTH);
} }
delay(7.33); _delay(7.33);
for(int i=0; i < NUM_PULSES; i++) { for(int i=0; i < NUM_PULSES; i++) {
WRITE(PHOTOGRAPH_PIN, HIGH); WRITE(PHOTOGRAPH_PIN, HIGH);
_delay_ms(PULSE_LENGTH); _delay_ms(PULSE_LENGTH);
@ -6567,7 +6582,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
SERIAL_PROTOCOL(set_target_pinda); SERIAL_PROTOCOL(set_target_pinda);
SERIAL_PROTOCOLLN(""); SERIAL_PROTOCOLLN("");
codenum = millis(); codenum = _millis();
cancel_heatup = false; cancel_heatup = false;
bool is_pinda_cooling = false; bool is_pinda_cooling = false;
@ -6576,14 +6591,14 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
} }
while ( ((!is_pinda_cooling) && (!cancel_heatup) && (current_temperature_pinda < set_target_pinda)) || (is_pinda_cooling && (current_temperature_pinda > set_target_pinda)) ) { while ( ((!is_pinda_cooling) && (!cancel_heatup) && (current_temperature_pinda < set_target_pinda)) || (is_pinda_cooling && (current_temperature_pinda > set_target_pinda)) ) {
if ((millis() - codenum) > 1000) //Print Temp Reading every 1 second while waiting. if ((_millis() - codenum) > 1000) //Print Temp Reading every 1 second while waiting.
{ {
SERIAL_PROTOCOLPGM("P:"); SERIAL_PROTOCOLPGM("P:");
SERIAL_PROTOCOL_F(current_temperature_pinda, 1); SERIAL_PROTOCOL_F(current_temperature_pinda, 1);
SERIAL_PROTOCOLPGM("/"); SERIAL_PROTOCOLPGM("/");
SERIAL_PROTOCOL(set_target_pinda); SERIAL_PROTOCOL(set_target_pinda);
SERIAL_PROTOCOLLN(""); SERIAL_PROTOCOLLN("");
codenum = millis(); codenum = _millis();
} }
manage_heater(); manage_heater();
manage_inactivity(); manage_inactivity();
@ -6982,7 +6997,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
mmu_extruder = tmp_extruder; mmu_extruder = tmp_extruder;
delay(100); _delay(100);
disable_e0(); disable_e0();
disable_e1(); disable_e1();
@ -6991,7 +7006,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
pinMode(E_MUX0_PIN, OUTPUT); pinMode(E_MUX0_PIN, OUTPUT);
pinMode(E_MUX1_PIN, OUTPUT); pinMode(E_MUX1_PIN, OUTPUT);
delay(100); _delay(100);
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHO("T:"); SERIAL_ECHO("T:");
SERIAL_ECHOLN((int)tmp_extruder); SERIAL_ECHOLN((int)tmp_extruder);
@ -7017,7 +7032,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
break; break;
} }
delay(100); _delay(100);
#else //SNMM #else //SNMM
if (tmp_extruder >= EXTRUDERS) { if (tmp_extruder >= EXTRUDERS) {
@ -7105,7 +7120,6 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
dcode_8(); break; dcode_8(); break;
case 9: //! D9 - Read/Write ADC case 9: //! D9 - Read/Write ADC
dcode_9(); break; dcode_9(); break;
case 10: //! D10 - XYZ calibration = OK case 10: //! D10 - XYZ calibration = OK
dcode_10(); break; dcode_10(); break;
@ -7146,7 +7160,7 @@ void FlushSerialRequestResend()
// Execution of a command from a SD card will not be confirmed. // Execution of a command from a SD card will not be confirmed.
void ClearToSend() void ClearToSend()
{ {
previous_millis_cmd = millis(); previous_millis_cmd = _millis();
if ((CMDBUFFER_CURRENT_TYPE == CMDBUFFER_CURRENT_TYPE_USB) || (CMDBUFFER_CURRENT_TYPE == CMDBUFFER_CURRENT_TYPE_USB_WITH_LINENR)) if ((CMDBUFFER_CURRENT_TYPE == CMDBUFFER_CURRENT_TYPE_USB) || (CMDBUFFER_CURRENT_TYPE == CMDBUFFER_CURRENT_TYPE_USB_WITH_LINENR))
SERIAL_PROTOCOLLNRPGM(MSG_OK); SERIAL_PROTOCOLLNRPGM(MSG_OK);
} }
@ -7317,7 +7331,7 @@ void clamp_to_software_endstops(float target[3])
void prepare_move() void prepare_move()
{ {
clamp_to_software_endstops(destination); clamp_to_software_endstops(destination);
previous_millis_cmd = millis(); previous_millis_cmd = _millis();
// Do not use feedmultiply for E or Z only moves // Do not use feedmultiply for E or Z only moves
if( (current_position[X_AXIS] == destination [X_AXIS]) && (current_position[Y_AXIS] == destination [Y_AXIS])) { if( (current_position[X_AXIS] == destination [X_AXIS]) && (current_position[Y_AXIS] == destination [Y_AXIS])) {
@ -7348,7 +7362,7 @@ void prepare_arc_move(char isclockwise) {
for(int8_t i=0; i < NUM_AXIS; i++) { for(int8_t i=0; i < NUM_AXIS; i++) {
current_position[i] = destination[i]; current_position[i] = destination[i];
} }
previous_millis_cmd = millis(); previous_millis_cmd = _millis();
} }
#if defined(CONTROLLERFAN_PIN) && CONTROLLERFAN_PIN > -1 #if defined(CONTROLLERFAN_PIN) && CONTROLLERFAN_PIN > -1
@ -7364,9 +7378,9 @@ unsigned long lastMotorCheck = 0;
void controllerFan() void controllerFan()
{ {
if ((millis() - lastMotorCheck) >= 2500) //Not a time critical function, so we only check every 2500ms if ((_millis() - lastMotorCheck) >= 2500) //Not a time critical function, so we only check every 2500ms
{ {
lastMotorCheck = millis(); lastMotorCheck = _millis();
if(!READ(X_ENABLE_PIN) || !READ(Y_ENABLE_PIN) || !READ(Z_ENABLE_PIN) || (soft_pwm_bed > 0) if(!READ(X_ENABLE_PIN) || !READ(Y_ENABLE_PIN) || !READ(Z_ENABLE_PIN) || (soft_pwm_bed > 0)
#if EXTRUDERS > 2 #if EXTRUDERS > 2
@ -7380,10 +7394,10 @@ void controllerFan()
#endif #endif
|| !READ(E0_ENABLE_PIN)) //If any of the drivers are enabled... || !READ(E0_ENABLE_PIN)) //If any of the drivers are enabled...
{ {
lastMotor = millis(); //... set time to NOW so the fan will turn on lastMotor = _millis(); //... set time to NOW so the fan will turn on
} }
if ((millis() - lastMotor) >= (CONTROLLERFAN_SECS*1000UL) || lastMotor == 0) //If the last time any driver was enabled, is longer since than CONTROLLERSEC... if ((_millis() - lastMotor) >= (CONTROLLERFAN_SECS*1000UL) || lastMotor == 0) //If the last time any driver was enabled, is longer since than CONTROLLERSEC...
{ {
digitalWrite(CONTROLLERFAN_PIN, 0); digitalWrite(CONTROLLERFAN_PIN, 0);
analogWrite(CONTROLLERFAN_PIN, 0); analogWrite(CONTROLLERFAN_PIN, 0);
@ -7405,7 +7419,7 @@ static uint32_t stat_update = 0;
void handle_status_leds(void) { void handle_status_leds(void) {
float max_temp = 0.0; float max_temp = 0.0;
if(millis() > stat_update) { if(_millis() > stat_update) {
stat_update += 500; // Update every 0.5s stat_update += 500; // Update every 0.5s
for (int8_t cur_extruder = 0; cur_extruder < EXTRUDERS; ++cur_extruder) { for (int8_t cur_extruder = 0; cur_extruder < EXTRUDERS; ++cur_extruder) {
max_temp = max(max_temp, degHotend(cur_extruder)); max_temp = max(max_temp, degHotend(cur_extruder));
@ -7474,13 +7488,15 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
{ {
if (fsensor_check_autoload()) if (fsensor_check_autoload())
{ {
#ifdef PAT9125
fsensor_autoload_check_stop(); fsensor_autoload_check_stop();
#endif //PAT9125
if (degHotend0() > EXTRUDE_MINTEMP) if (degHotend0() > EXTRUDE_MINTEMP)
{ {
if ((eSoundMode == e_SOUND_MODE_LOUD) || (eSoundMode == e_SOUND_MODE_ONCE)) if ((eSoundMode == e_SOUND_MODE_LOUD) || (eSoundMode == e_SOUND_MODE_ONCE))
tone(BEEPER, 1000); _tone(BEEPER, 1000);
delay_keep_alive(50); delay_keep_alive(50);
noTone(BEEPER); _noTone(BEEPER);
loading_flag = true; loading_flag = true;
enquecommand_front_P((PSTR("M701"))); enquecommand_front_P((PSTR("M701")));
} }
@ -7503,7 +7519,9 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
} }
else else
{ {
#ifdef PAT9125
fsensor_autoload_check_stop(); fsensor_autoload_check_stop();
#endif //PAT9125
fsensor_update(); fsensor_update();
} }
} }
@ -7523,11 +7541,11 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
get_command(); get_command();
} }
if( (millis() - previous_millis_cmd) > max_inactive_time ) if( (_millis() - previous_millis_cmd) > max_inactive_time )
if(max_inactive_time) if(max_inactive_time)
kill(_n(""), 4); kill(_n(""), 4);
if(stepper_inactive_time) { if(stepper_inactive_time) {
if( (millis() - previous_millis_cmd) > stepper_inactive_time ) if( (_millis() - previous_millis_cmd) > stepper_inactive_time )
{ {
if(blocks_queued() == false && ignore_stepper_queue == false) { if(blocks_queued() == false && ignore_stepper_queue == false) {
disable_x(); disable_x();
@ -7541,7 +7559,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
} }
#ifdef CHDK //Check if pin should be set to LOW after M240 set it to HIGH #ifdef CHDK //Check if pin should be set to LOW after M240 set it to HIGH
if (chdkActive && (millis() - chdkHigh > CHDK_DELAY)) if (chdkActive && (_millis() - chdkHigh > CHDK_DELAY))
{ {
chdkActive = false; chdkActive = false;
WRITE(CHDK, LOW); WRITE(CHDK, LOW);
@ -7574,7 +7592,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
controllerFan(); //Check if fan should be turned on to cool stepper drivers down controllerFan(); //Check if fan should be turned on to cool stepper drivers down
#endif #endif
#ifdef EXTRUDER_RUNOUT_PREVENT #ifdef EXTRUDER_RUNOUT_PREVENT
if( (millis() - previous_millis_cmd) > EXTRUDER_RUNOUT_SECONDS*1000 ) if( (_millis() - previous_millis_cmd) > EXTRUDER_RUNOUT_SECONDS*1000 )
if(degHotend(active_extruder)>EXTRUDER_RUNOUT_MINTEMP) if(degHotend(active_extruder)>EXTRUDER_RUNOUT_MINTEMP)
{ {
bool oldstatus=READ(E0_ENABLE_PIN); bool oldstatus=READ(E0_ENABLE_PIN);
@ -7587,7 +7605,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
current_position[E_AXIS]=oldepos; current_position[E_AXIS]=oldepos;
destination[E_AXIS]=oldedes; destination[E_AXIS]=oldedes;
plan_set_e_position(oldepos); plan_set_e_position(oldepos);
previous_millis_cmd=millis(); previous_millis_cmd=_millis();
st_synchronize(); st_synchronize();
WRITE(E0_ENABLE_PIN,oldstatus); WRITE(E0_ENABLE_PIN,oldstatus);
} }
@ -7630,7 +7648,7 @@ void kill(const char *full_screen_message, unsigned char id)
sei(); // enable interrupts sei(); // enable interrupts
for ( int i=5; i--; lcd_update(0)) for ( int i=5; i--; lcd_update(0))
{ {
delay(200); _delay(200);
} }
cli(); // disable interrupts cli(); // disable interrupts
suicide(); suicide();
@ -7818,10 +7836,10 @@ void delay_keep_alive(unsigned int ms)
if (ms == 0) if (ms == 0)
break; break;
else if (ms >= 50) { else if (ms >= 50) {
delay(50); _delay(50);
ms -= 50; ms -= 50;
} else { } else {
delay(ms); _delay(ms);
ms = 0; ms = 0;
} }
} }
@ -7835,11 +7853,11 @@ static void wait_for_heater(long codenum, uint8_t extruder) {
/* continue to loop until we have reached the target temp /* continue to loop until we have reached the target temp
_and_ until TEMP_RESIDENCY_TIME hasn't passed since we reached it */ _and_ until TEMP_RESIDENCY_TIME hasn't passed since we reached it */
while ((!cancel_heatup) && ((residencyStart == -1) || while ((!cancel_heatup) && ((residencyStart == -1) ||
(residencyStart >= 0 && (((unsigned int)(millis() - residencyStart)) < (TEMP_RESIDENCY_TIME * 1000UL))))) { (residencyStart >= 0 && (((unsigned int)(_millis() - residencyStart)) < (TEMP_RESIDENCY_TIME * 1000UL))))) {
#else #else
while (target_direction ? (isHeatingHotend(tmp_extruder)) : (isCoolingHotend(tmp_extruder) && (CooldownNoWait == false))) { while (target_direction ? (isHeatingHotend(tmp_extruder)) : (isCoolingHotend(tmp_extruder) && (CooldownNoWait == false))) {
#endif //TEMP_RESIDENCY_TIME #endif //TEMP_RESIDENCY_TIME
if ((millis() - codenum) > 1000UL) if ((_millis() - codenum) > 1000UL)
{ //Print Temp Reading and remaining time every 1 second while heating up/cooling down { //Print Temp Reading and remaining time every 1 second while heating up/cooling down
if (!farm_mode) { if (!farm_mode) {
SERIAL_PROTOCOLPGM("T:"); SERIAL_PROTOCOLPGM("T:");
@ -7851,7 +7869,7 @@ static void wait_for_heater(long codenum, uint8_t extruder) {
SERIAL_PROTOCOLPGM(" W:"); SERIAL_PROTOCOLPGM(" W:");
if (residencyStart > -1) if (residencyStart > -1)
{ {
codenum = ((TEMP_RESIDENCY_TIME * 1000UL) - (millis() - residencyStart)) / 1000UL; codenum = ((TEMP_RESIDENCY_TIME * 1000UL) - (_millis() - residencyStart)) / 1000UL;
SERIAL_PROTOCOLLN(codenum); SERIAL_PROTOCOLLN(codenum);
} }
else else
@ -7862,7 +7880,7 @@ static void wait_for_heater(long codenum, uint8_t extruder) {
#else #else
SERIAL_PROTOCOLLN(""); SERIAL_PROTOCOLLN("");
#endif #endif
codenum = millis(); codenum = _millis();
} }
manage_heater(); manage_heater();
manage_inactivity(true); //do not disable steppers manage_inactivity(true); //do not disable steppers
@ -7874,7 +7892,7 @@ static void wait_for_heater(long codenum, uint8_t extruder) {
(residencyStart == -1 && !target_direction && (degHotend(extruder) <= (degTargetHotend(extruder) + TEMP_WINDOW))) || (residencyStart == -1 && !target_direction && (degHotend(extruder) <= (degTargetHotend(extruder) + TEMP_WINDOW))) ||
(residencyStart > -1 && labs(degHotend(extruder) - degTargetHotend(extruder)) > TEMP_HYSTERESIS)) (residencyStart > -1 && labs(degHotend(extruder) - degTargetHotend(extruder)) > TEMP_HYSTERESIS))
{ {
residencyStart = millis(); residencyStart = _millis();
} }
#endif //TEMP_RESIDENCY_TIME #endif //TEMP_RESIDENCY_TIME
} }
@ -8037,9 +8055,9 @@ void bed_analysis(float x_dimension, float y_dimension, int x_points_num, int y_
//MYSERIAL.println(data_wldsd); //MYSERIAL.println(data_wldsd);
//delay(1000); //_delay(1000);
//delay(3000); //_delay(3000);
//t1 = millis(); //t1 = _millis();
//while (digitalRead(D_DATACLOCK) == LOW) {} //while (digitalRead(D_DATACLOCK) == LOW) {}
//while (digitalRead(D_DATACLOCK) == HIGH) {} //while (digitalRead(D_DATACLOCK) == HIGH) {}
@ -8049,14 +8067,14 @@ void bed_analysis(float x_dimension, float y_dimension, int x_points_num, int y_
for (int i = 0; i<13; i++) for (int i = 0; i<13; i++)
{ {
//t1 = millis(); //t1 = _millis();
for (int j = 0; j < 4; j++) for (int j = 0; j < 4; j++)
{ {
while (digitalRead(D_DATACLOCK) == LOW) {} while (digitalRead(D_DATACLOCK) == LOW) {}
while (digitalRead(D_DATACLOCK) == HIGH) {} while (digitalRead(D_DATACLOCK) == HIGH) {}
bitWrite(digit[i], j, digitalRead(D_DATA)); bitWrite(digit[i], j, digitalRead(D_DATA));
} }
//t_delay = (millis() - t1); //t_delay = (_millis() - t1);
//SERIAL_PROTOCOLPGM(" "); //SERIAL_PROTOCOLPGM(" ");
//SERIAL_PROTOCOL_F(t_delay, 5); //SERIAL_PROTOCOL_F(t_delay, 5);
//SERIAL_PROTOCOLPGM(" "); //SERIAL_PROTOCOLPGM(" ");
@ -8257,7 +8275,7 @@ void long_pause() //long pause print
{ {
st_synchronize(); st_synchronize();
start_pause_print = millis(); start_pause_print = _millis();
//retract //retract
current_position[E_AXIS] -= default_retraction; current_position[E_AXIS] -= default_retraction;
@ -8296,7 +8314,7 @@ extern uint32_t sdpos_atomic;
void uvlo_() void uvlo_()
{ {
unsigned long time_start = millis(); unsigned long time_start = _millis();
bool sd_print = card.sdprinting; bool sd_print = card.sdprinting;
// Conserve power as soon as possible. // Conserve power as soon as possible.
disable_x(); disable_x();
@ -8338,8 +8356,8 @@ void uvlo_()
// are in action. // are in action.
planner_abort_hard(); planner_abort_hard();
// Store the current extruder position. // Store the current extruder position.
eeprom_update_float((float*)(EEPROM_UVLO_CURRENT_POSITION_E), st_get_position_mm(E_AXIS)); eeprom_update_float((float*)(EEPROM_UVLO_CURRENT_POSITION_E), st_get_position_mm(E_AXIS));
eeprom_update_byte((uint8_t*)EEPROM_UVLO_E_ABS, axis_relative_modes[3]?0:1); eeprom_update_byte((uint8_t*)EEPROM_UVLO_E_ABS, axis_relative_modes[3]?0:1);
// Clean the input command queue. // Clean the input command queue.
@ -8426,7 +8444,7 @@ void uvlo_()
eeprom_update_byte((uint8_t*)EEPROM_POWER_COUNT, eeprom_read_byte((uint8_t*)EEPROM_POWER_COUNT) + 1); eeprom_update_byte((uint8_t*)EEPROM_POWER_COUNT, eeprom_read_byte((uint8_t*)EEPROM_POWER_COUNT) + 1);
eeprom_update_word((uint16_t*)EEPROM_POWER_COUNT_TOT, eeprom_read_word((uint16_t*)EEPROM_POWER_COUNT_TOT) + 1); eeprom_update_word((uint16_t*)EEPROM_POWER_COUNT_TOT, eeprom_read_word((uint16_t*)EEPROM_POWER_COUNT_TOT) + 1);
printf_P(_N("UVLO - end %d\n"), millis() - time_start); printf_P(_N("UVLO - end %d\n"), _millis() - time_start);
#if 0 #if 0
// Move the print head to the side of the print until all the power stored in the power supply capacitors is depleted. // Move the print head to the side of the print until all the power stored in the power supply capacitors is depleted.
@ -8510,8 +8528,12 @@ void setup_fan_interrupt() {
// and it takes 4.24 us to process (the interrupt invocation overhead not taken into account). // and it takes 4.24 us to process (the interrupt invocation overhead not taken into account).
ISR(INT7_vect) { ISR(INT7_vect) {
//measuring speed now works for fanSpeed > 18 (approximately), which is sufficient because MIN_PRINT_FAN_SPEED is higher //measuring speed now works for fanSpeed > 18 (approximately), which is sufficient because MIN_PRINT_FAN_SPEED is higher
#ifdef FAN_SOFT_PWM
if (!fan_measuring || (fanSpeedSoftPwm < MIN_PRINT_FAN_SPEED)) return;
#else //FAN_SOFT_PWM
if (fanSpeed < MIN_PRINT_FAN_SPEED) return; if (fanSpeed < MIN_PRINT_FAN_SPEED) return;
#endif //FAN_SOFT_PWM
if ((1 << 6) & EICRB) { //interrupt was triggered by rising edge if ((1 << 6) & EICRB) { //interrupt was triggered by rising edge
t_fan_rising_edge = millis_nc(); t_fan_rising_edge = millis_nc();
} }
@ -8695,8 +8717,7 @@ void restore_print_from_eeprom() {
enquecommand(cmd); enquecommand(cmd);
uint32_t position = eeprom_read_dword((uint32_t*)(EEPROM_FILE_POSITION)); uint32_t position = eeprom_read_dword((uint32_t*)(EEPROM_FILE_POSITION));
SERIAL_ECHOPGM("Position read from eeprom:"); SERIAL_ECHOPGM("Position read from eeprom:");
MYSERIAL.println(position); MYSERIAL.println(position);
// E axis relative mode. // E axis relative mode.
enquecommand_P(PSTR("M83")); enquecommand_P(PSTR("M83"));
// Move to the XY print position in logical coordinates, where the print has been killed. // Move to the XY print position in logical coordinates, where the print has been killed.
@ -8771,7 +8792,8 @@ void stop_and_save_print_to_ram(float z_move, float e_move)
saved_printing_type = PRINTING_TYPE_USB; saved_printing_type = PRINTING_TYPE_USB;
} }
else { else {
//not sd printing nor usb printing saved_printing_type = PRINTING_TYPE_NONE;
//not sd printing nor usb printing
} }
#if 0 #if 0
@ -8936,10 +8958,12 @@ void restore_print_from_ram_and_continue(float e_move)
// for (int axis = X_AXIS; axis <= E_AXIS; axis++) // for (int axis = X_AXIS; axis <= E_AXIS; axis++)
// current_position[axis] = st_get_position_mm(axis); // current_position[axis] = st_get_position_mm(axis);
active_extruder = saved_active_extruder; //restore active_extruder active_extruder = saved_active_extruder; //restore active_extruder
setTargetHotendSafe(saved_extruder_temperature,saved_active_extruder); if (saved_extruder_temperature) {
heating_status = 1; setTargetHotendSafe(saved_extruder_temperature, saved_active_extruder);
wait_for_heater(millis(),saved_active_extruder); heating_status = 1;
heating_status = 2; wait_for_heater(_millis(), saved_active_extruder);
heating_status = 2;
}
feedrate = saved_feedrate2; //restore feedrate feedrate = saved_feedrate2; //restore feedrate
axis_relative_modes[E_AXIS] = saved_extruder_relative_mode; axis_relative_modes[E_AXIS] = saved_extruder_relative_mode;
fanSpeed = saved_fanSpeed; fanSpeed = saved_fanSpeed;
@ -9089,7 +9113,7 @@ void M600_wait_for_user(float HotendTempBckp) {
KEEPALIVE_STATE(PAUSED_FOR_USER); KEEPALIVE_STATE(PAUSED_FOR_USER);
int counterBeep = 0; int counterBeep = 0;
unsigned long waiting_start_time = millis(); unsigned long waiting_start_time = _millis();
uint8_t wait_for_user_state = 0; uint8_t wait_for_user_state = 0;
lcd_display_message_fullscreen_P(_T(MSG_PRESS_TO_UNLOAD)); lcd_display_message_fullscreen_P(_T(MSG_PRESS_TO_UNLOAD));
bool bFirst=true; bool bFirst=true;
@ -9121,7 +9145,7 @@ void M600_wait_for_user(float HotendTempBckp) {
case 0: //nozzle is hot, waiting for user to press the knob to unload filament case 0: //nozzle is hot, waiting for user to press the knob to unload filament
delay_keep_alive(4); delay_keep_alive(4);
if (millis() > waiting_start_time + (unsigned long)M600_TIMEOUT * 1000) { if (_millis() > waiting_start_time + (unsigned long)M600_TIMEOUT * 1000) {
lcd_display_message_fullscreen_P(_i("Press knob to preheat nozzle and continue."));////MSG_PRESS_TO_PREHEAT c=20 r=4 lcd_display_message_fullscreen_P(_i("Press knob to preheat nozzle and continue."));////MSG_PRESS_TO_PREHEAT c=20 r=4
wait_for_user_state = 1; wait_for_user_state = 1;
setAllTargetHotends(0); setAllTargetHotends(0);
@ -9145,7 +9169,7 @@ void M600_wait_for_user(float HotendTempBckp) {
if (abs(degTargetHotend(active_extruder) - degHotend(active_extruder)) < 1) { if (abs(degTargetHotend(active_extruder) - degHotend(active_extruder)) < 1) {
lcd_display_message_fullscreen_P(_T(MSG_PRESS_TO_UNLOAD)); lcd_display_message_fullscreen_P(_T(MSG_PRESS_TO_UNLOAD));
waiting_start_time = millis(); waiting_start_time = _millis();
wait_for_user_state = 0; wait_for_user_state = 0;
} }
else { else {
@ -9194,12 +9218,12 @@ void M600_load_filament() {
//load filament for single material and SNMM //load filament for single material and SNMM
lcd_wait_interact(); lcd_wait_interact();
//load_filament_time = millis(); //load_filament_time = _millis();
KEEPALIVE_STATE(PAUSED_FOR_USER); KEEPALIVE_STATE(PAUSED_FOR_USER);
#ifdef FILAMENT_SENSOR #ifdef PAT9125
fsensor_autoload_check_start(); fsensor_autoload_check_start();
#endif //FILAMENT_SENSOR #endif //PAT9125
while(!lcd_clicked()) while(!lcd_clicked())
{ {
manage_heater(); manage_heater();
@ -9208,16 +9232,16 @@ void M600_load_filament() {
if (fsensor_check_autoload()) if (fsensor_check_autoload())
{ {
if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
tone(BEEPER, 1000); _tone(BEEPER, 1000);
delay_keep_alive(50); delay_keep_alive(50);
noTone(BEEPER); _noTone(BEEPER);
break; break;
} }
#endif //FILAMENT_SENSOR #endif //FILAMENT_SENSOR
} }
#ifdef FILAMENT_SENSOR #ifdef PAT9125
fsensor_autoload_check_stop(); fsensor_autoload_check_stop();
#endif //FILAMENT_SENSOR #endif //PAT9125
KEEPALIVE_STATE(IN_HANDLER); KEEPALIVE_STATE(IN_HANDLER);
#ifdef FSENSOR_QUALITY #ifdef FSENSOR_QUALITY
@ -9227,9 +9251,9 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
M600_load_filament_movements(); M600_load_filament_movements();
if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
tone(BEEPER, 500); _tone(BEEPER, 500);
delay_keep_alive(50); delay_keep_alive(50);
noTone(BEEPER); _noTone(BEEPER);
#ifdef FSENSOR_QUALITY #ifdef FSENSOR_QUALITY
fsensor_oq_meassure_stop(); fsensor_oq_meassure_stop();

View File

@ -287,7 +287,7 @@ bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) {
errorCode_ = type_ = 0; errorCode_ = type_ = 0;
chipSelectPin_ = chipSelectPin; chipSelectPin_ = chipSelectPin;
// 16-bit init start time allows over a minute // 16-bit init start time allows over a minute
uint16_t t0 = (uint16_t)millis(); uint16_t t0 = (uint16_t)_millis();
uint32_t arg; uint32_t arg;
// set pin modes // set pin modes
@ -314,7 +314,7 @@ bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) {
// command to go idle in SPI mode // command to go idle in SPI mode
while ((status_ = cardCommand(CMD0, 0)) != R1_IDLE_STATE) { while ((status_ = cardCommand(CMD0, 0)) != R1_IDLE_STATE) {
if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) { if (((uint16_t)_millis() - t0) > SD_INIT_TIMEOUT) {
error(SD_CARD_ERROR_CMD0); error(SD_CARD_ERROR_CMD0);
goto fail; goto fail;
} }
@ -336,7 +336,7 @@ bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) {
while ((status_ = cardAcmd(ACMD41, arg)) != R1_READY_STATE) { while ((status_ = cardAcmd(ACMD41, arg)) != R1_READY_STATE) {
// check for timeout // check for timeout
if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) { if (((uint16_t)_millis() - t0) > SD_INIT_TIMEOUT) {
error(SD_CARD_ERROR_ACMD41); error(SD_CARD_ERROR_ACMD41);
goto fail; goto fail;
} }
@ -469,9 +469,9 @@ static uint16_t CRC_CCITT(const uint8_t* data, size_t n) {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool Sd2Card::readData(uint8_t* dst, uint16_t count) { bool Sd2Card::readData(uint8_t* dst, uint16_t count) {
// wait for start block token // wait for start block token
uint16_t t0 = millis(); uint16_t t0 = _millis();
while ((status_ = spiRec()) == 0XFF) { while ((status_ = spiRec()) == 0XFF) {
if (((uint16_t)millis() - t0) > SD_READ_TIMEOUT) { if (((uint16_t)_millis() - t0) > SD_READ_TIMEOUT) {
error(SD_CARD_ERROR_READ_TIMEOUT); error(SD_CARD_ERROR_READ_TIMEOUT);
goto fail; goto fail;
} }
@ -593,9 +593,9 @@ bool Sd2Card::setSckRate(uint8_t sckRateID) {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// wait for card to go not busy // wait for card to go not busy
bool Sd2Card::waitNotBusy(uint16_t timeoutMillis) { bool Sd2Card::waitNotBusy(uint16_t timeoutMillis) {
uint16_t t0 = millis(); uint16_t t0 = _millis();
while (spiRec() != 0XFF) { while (spiRec() != 0XFF) {
if (((uint16_t)millis() - t0) >= timeoutMillis) goto fail; if (((uint16_t)_millis() - t0) >= timeoutMillis) goto fail;
} }
return true; return true;
@ -731,9 +731,9 @@ bool Sd2Card::writeStop() {
//FIXME Vojtech: Copied from a current version of Sd2Card Arduino code. //FIXME Vojtech: Copied from a current version of Sd2Card Arduino code.
// We shall likely upgrade the rest of the Sd2Card. // We shall likely upgrade the rest of the Sd2Card.
uint8_t Sd2Card::waitStartBlock(void) { uint8_t Sd2Card::waitStartBlock(void) {
uint16_t t0 = millis(); uint16_t t0 = _millis();
while ((status_ = spiRec()) == 0XFF) { while ((status_ = spiRec()) == 0XFF) {
if (((uint16_t)millis() - t0) > SD_READ_TIMEOUT) { if (((uint16_t)_millis() - t0) > SD_READ_TIMEOUT) {
error(SD_CARD_ERROR_READ_TIMEOUT); error(SD_CARD_ERROR_READ_TIMEOUT);
goto fail; goto fail;
} }

View File

@ -4,7 +4,7 @@
*/ */
#include "Timer.h" #include "Timer.h"
#include "Arduino.h" #include "system_timer.h"
/** /**
* @brief construct Timer * @brief construct Timer
@ -23,7 +23,7 @@ Timer<T>::Timer() : m_isRunning(false), m_started()
template<typename T> template<typename T>
void Timer<T>::start() void Timer<T>::start()
{ {
m_started = millis(); m_started = _millis();
m_isRunning = true; m_isRunning = true;
} }
@ -45,7 +45,7 @@ bool Timer<T>::expired(T msPeriod)
{ {
if (!m_isRunning) return false; if (!m_isRunning) return false;
bool expired = false; bool expired = false;
const T now = millis(); const T now = _millis();
if (m_started <= m_started + msPeriod) if (m_started <= m_started + msPeriod)
{ {
if ((now >= m_started + msPeriod) || (now < m_started)) if ((now >= m_started + msPeriod) || (now < m_started))

View File

@ -8,6 +8,7 @@
#include "Timer.h" #include "Timer.h"
#include "Arduino.h" #include "Arduino.h"
#include "system_timer.h"
#include <limits.h> #include <limits.h>
class TimerRemaining : public LongTimer class TimerRemaining : public LongTimer
@ -36,7 +37,7 @@ public:
{ {
if (!running()) return 0; if (!running()) return 0;
if (expired()) return 0; if (expired()) return 0;
const unsigned long now = millis(); const unsigned long now = _millis();
return (started() + m_period - now); return (started() + m_period - now);
} }
/** /**

View File

@ -41,7 +41,7 @@ CardReader::CardReader()
WRITE(SDPOWER,HIGH); WRITE(SDPOWER,HIGH);
#endif //SDPOWER #endif //SDPOWER
autostart_atmillis=millis()+5000; autostart_atmillis=_millis()+5000;
} }
char *createFilename(char *buffer,const dir_t &p) //buffer>12characters char *createFilename(char *buffer,const dir_t &p) //buffer>12characters
@ -497,7 +497,7 @@ void CardReader::getStatus()
SERIAL_PROTOCOL(sdpos); SERIAL_PROTOCOL(sdpos);
SERIAL_PROTOCOLPGM("/"); SERIAL_PROTOCOLPGM("/");
SERIAL_PROTOCOLLN(filesize); SERIAL_PROTOCOLLN(filesize);
uint16_t time = millis()/60000 - starttime/60000; uint16_t time = _millis()/60000 - starttime/60000;
SERIAL_PROTOCOL(itostr2(time/60)); SERIAL_PROTOCOL(itostr2(time/60));
SERIAL_PROTOCOL(':'); SERIAL_PROTOCOL(':');
SERIAL_PROTOCOL(itostr2(time%60)); SERIAL_PROTOCOL(itostr2(time%60));
@ -556,7 +556,7 @@ void CardReader::checkautostart(bool force)
{ {
if(!autostart_stilltocheck) if(!autostart_stilltocheck)
return; return;
if(autostart_atmillis<millis()) if(autostart_atmillis<_millis())
return; return;
} }
autostart_stilltocheck=false; autostart_stilltocheck=false;
@ -954,7 +954,7 @@ void CardReader::presort() {
lcd_set_cursor(column, 2); lcd_set_cursor(column, 2);
lcd_print('\x01'); //simple progress bar lcd_print('\x01'); //simple progress bar
} }
delay(300); _delay(300);
lcd_set_degree(); lcd_set_degree();
lcd_clear(); lcd_clear();
#endif #endif

View File

@ -22,8 +22,8 @@ int serial_count = 0; //index of character read from serial line
boolean comment_mode = false; boolean comment_mode = false;
char *strchr_pointer; // just a pointer to find chars in the command string like X, Y, Z, E, etc char *strchr_pointer; // just a pointer to find chars in the command string like X, Y, Z, E, etc
unsigned long TimeSent = millis(); unsigned long TimeSent = _millis();
unsigned long TimeNow = millis(); unsigned long TimeNow = _millis();
long gcode_N = 0; long gcode_N = 0;
long gcode_LastN = 0; long gcode_LastN = 0;
@ -391,8 +391,8 @@ void get_command()
MYSERIAL.write(serial_char); // for debuging serial line 2 in farm_mode MYSERIAL.write(serial_char); // for debuging serial line 2 in farm_mode
selectedSerialPort = 1; selectedSerialPort = 1;
} */ //RP - removed } */ //RP - removed
TimeSent = millis(); TimeSent = _millis();
TimeNow = millis(); TimeNow = _millis();
if (serial_char < 0) if (serial_char < 0)
// Ignore extended ASCII characters. These characters have no meaning in the G-code apart from the file names // Ignore extended ASCII characters. These characters have no meaning in the G-code apart from the file names
@ -527,7 +527,7 @@ void get_command()
} // end of serial line processing loop } // end of serial line processing loop
if(farm_mode){ if(farm_mode){
TimeNow = millis(); TimeNow = _millis();
if ( ((TimeNow - TimeSent) > 800) && (serial_count > 0) ) { if ( ((TimeNow - TimeSent) > 800) && (serial_count > 0) ) {
cmdbuffer[bufindw+serial_count+CMDHDRSIZE] = 0; cmdbuffer[bufindw+serial_count+CMDHDRSIZE] = 0;
@ -576,7 +576,7 @@ void get_command()
{ {
if(card.eof()){ if(card.eof()){
SERIAL_PROTOCOLLNRPGM(_n("Done printing file"));////MSG_FILE_PRINTED c=0 r=0 SERIAL_PROTOCOLLNRPGM(_n("Done printing file"));////MSG_FILE_PRINTED c=0 r=0
stoptime=millis(); stoptime=_millis();
char time[30]; char time[30];
unsigned long t=(stoptime-starttime-pause_time)/1000; unsigned long t=(stoptime-starttime-pause_time)/1000;
pause_time = 0; pause_time = 0;

View File

@ -13,6 +13,7 @@
#include "ultralcd.h" #include "ultralcd.h"
#include "ConfigurationStore.h" #include "ConfigurationStore.h"
#include "mmu.h" #include "mmu.h"
#include "cardreader.h"
//! @name Basic parameters //! @name Basic parameters
//! @{ //! @{
@ -120,17 +121,20 @@ void fsensor_stop_and_save_print(void)
void fsensor_restore_print_and_continue(void) void fsensor_restore_print_and_continue(void)
{ {
printf_P(PSTR("fsensor_restore_print_and_continue\n")); printf_P(PSTR("fsensor_restore_print_and_continue\n"));
fsensor_watch_runout = true; fsensor_watch_runout = true;
fsensor_err_cnt = 0; fsensor_err_cnt = 0;
restore_print_from_ram_and_continue(0); //XYZ = orig, E - no change restore_print_from_ram_and_continue(0); //XYZ = orig, E - no change
} }
void fsensor_init(void) void fsensor_init(void)
{ {
#ifdef PAT9125
uint8_t pat9125 = pat9125_init(); uint8_t pat9125 = pat9125_init();
printf_P(PSTR("PAT9125_init:%hhu\n"), pat9125); printf_P(PSTR("PAT9125_init:%hhu\n"), pat9125);
#endif //PAT9125
uint8_t fsensor = eeprom_read_byte((uint8_t*)EEPROM_FSENSOR); uint8_t fsensor = eeprom_read_byte((uint8_t*)EEPROM_FSENSOR);
fsensor_autoload_enabled=eeprom_read_byte((uint8_t*)EEPROM_FSENS_AUTOLOAD_ENABLED); fsensor_autoload_enabled=eeprom_read_byte((uint8_t*)EEPROM_FSENS_AUTOLOAD_ENABLED);
#ifdef PAT9125
uint8_t oq_meassure_enabled = eeprom_read_byte((uint8_t*)EEPROM_FSENS_OQ_MEASS_ENABLED); uint8_t oq_meassure_enabled = eeprom_read_byte((uint8_t*)EEPROM_FSENS_OQ_MEASS_ENABLED);
fsensor_oq_meassure_enabled = (oq_meassure_enabled == 1)?true:false; fsensor_oq_meassure_enabled = (oq_meassure_enabled == 1)?true:false;
fsensor_chunk_len = (int16_t)(FSENSOR_CHUNK_LEN * cs.axis_steps_per_unit[E_AXIS]); fsensor_chunk_len = (int16_t)(FSENSOR_CHUNK_LEN * cs.axis_steps_per_unit[E_AXIS]);
@ -142,15 +146,19 @@ void fsensor_init(void)
} }
else else
fsensor_not_responding = false; fsensor_not_responding = false;
#endif //PAT9125
if (fsensor) if (fsensor)
fsensor_enable(); fsensor_enable();
else else
fsensor_disable(); fsensor_disable();
printf_P(PSTR("FSensor %S\n"), (fsensor_enabled?PSTR("ENABLED"):PSTR("DISABLED\n"))); printf_P(PSTR("FSensor %S\n"), (fsensor_enabled?PSTR("ENABLED"):PSTR("DISABLED\n")));
if (check_for_ir_sensor()) ir_sensor_detected = true;
} }
bool fsensor_enable(void) bool fsensor_enable(void)
{ {
#ifdef PAT9125
if (mmu_enabled == false) { //filament sensor is pat9125, enable only if it is working if (mmu_enabled == false) { //filament sensor is pat9125, enable only if it is working
uint8_t pat9125 = pat9125_init(); uint8_t pat9125 = pat9125_init();
printf_P(PSTR("PAT9125_init:%hhu\n"), pat9125); printf_P(PSTR("PAT9125_init:%hhu\n"), pat9125);
@ -172,6 +180,11 @@ bool fsensor_enable(void)
eeprom_update_byte((uint8_t*)EEPROM_FSENSOR, 0x01); eeprom_update_byte((uint8_t*)EEPROM_FSENSOR, 0x01);
FSensorStateMenu = 1; FSensorStateMenu = 1;
} }
#else // PAT9125
fsensor_enabled = true;
eeprom_update_byte((uint8_t*)EEPROM_FSENSOR, 0x01);
FSensorStateMenu = 1;
#endif // PAT9125
return fsensor_enabled; return fsensor_enabled;
} }
@ -184,7 +197,9 @@ void fsensor_disable(void)
void fsensor_autoload_set(bool State) void fsensor_autoload_set(bool State)
{ {
#ifdef PAT9125
if (!State) fsensor_autoload_check_stop(); if (!State) fsensor_autoload_check_stop();
#endif //PAT9125
fsensor_autoload_enabled = State; fsensor_autoload_enabled = State;
eeprom_update_byte((unsigned char *)EEPROM_FSENS_AUTOLOAD_ENABLED, fsensor_autoload_enabled); eeprom_update_byte((unsigned char *)EEPROM_FSENS_AUTOLOAD_ENABLED, fsensor_autoload_enabled);
} }
@ -197,6 +212,7 @@ void pciSetup(byte pin)
PCICR |= bit (digitalPinToPCICRbit(pin)); // enable interrupt for the group PCICR |= bit (digitalPinToPCICRbit(pin)); // enable interrupt for the group
} }
#ifdef PAT9125
void fsensor_autoload_check_start(void) void fsensor_autoload_check_start(void)
{ {
// puts_P(_N("fsensor_autoload_check_start\n")); // puts_P(_N("fsensor_autoload_check_start\n"));
@ -215,7 +231,7 @@ void fsensor_autoload_check_start(void)
fsensor_autoload_y = pat9125_y; //save current y value fsensor_autoload_y = pat9125_y; //save current y value
fsensor_autoload_c = 0; //reset number of changes counter fsensor_autoload_c = 0; //reset number of changes counter
fsensor_autoload_sum = 0; fsensor_autoload_sum = 0;
fsensor_autoload_last_millis = millis(); fsensor_autoload_last_millis = _millis();
fsensor_watch_runout = false; fsensor_watch_runout = false;
fsensor_watch_autoload = true; fsensor_watch_autoload = true;
fsensor_err_cnt = 0; fsensor_err_cnt = 0;
@ -223,6 +239,7 @@ void fsensor_autoload_check_start(void)
void fsensor_autoload_check_stop(void) void fsensor_autoload_check_stop(void)
{ {
// puts_P(_N("fsensor_autoload_check_stop\n")); // puts_P(_N("fsensor_autoload_check_stop\n"));
if (!fsensor_enabled) return; if (!fsensor_enabled) return;
// puts_P(_N("fsensor_autoload_check_stop 1\n")); // puts_P(_N("fsensor_autoload_check_stop 1\n"));
@ -235,11 +252,22 @@ void fsensor_autoload_check_stop(void)
fsensor_watch_runout = true; fsensor_watch_runout = true;
fsensor_err_cnt = 0; fsensor_err_cnt = 0;
} }
#endif //PAT9125
bool fsensor_check_autoload(void) bool fsensor_check_autoload(void)
{ {
if (!fsensor_enabled) return false; if (!fsensor_enabled) return false;
if (!fsensor_autoload_enabled) return false; if (!fsensor_autoload_enabled) return false;
if (ir_sensor_detected) {
if (digitalRead(IR_SENSOR_PIN) == 1) {
fsensor_watch_autoload = true;
}
else if (fsensor_watch_autoload == true) {
fsensor_watch_autoload = false;
return true;
}
}
#ifdef PAT9125
if (!fsensor_watch_autoload) if (!fsensor_watch_autoload)
{ {
fsensor_autoload_check_start(); fsensor_autoload_check_start();
@ -248,8 +276,8 @@ bool fsensor_check_autoload(void)
#if 0 #if 0
uint8_t fsensor_autoload_c_old = fsensor_autoload_c; uint8_t fsensor_autoload_c_old = fsensor_autoload_c;
#endif #endif
if ((millis() - fsensor_autoload_last_millis) < 25) return false; if ((_millis() - fsensor_autoload_last_millis) < 25) return false;
fsensor_autoload_last_millis = millis(); fsensor_autoload_last_millis = _millis();
if (!pat9125_update_y()) //update sensor if (!pat9125_update_y()) //update sensor
{ {
fsensor_disable(); fsensor_disable();
@ -283,6 +311,7 @@ bool fsensor_check_autoload(void)
// puts_P(_N("fsensor_check_autoload = true !!!\n")); // puts_P(_N("fsensor_check_autoload = true !!!\n"));
return true; return true;
} }
#endif //PAT9125
return false; return false;
} }
@ -359,10 +388,10 @@ bool fsensor_oq_result(void)
printf_P(_N("fsensor_oq_result %S\n"), (res?_OK:_NG)); printf_P(_N("fsensor_oq_result %S\n"), (res?_OK:_NG));
return res; return res;
} }
#ifdef PAT9125
ISR(FSENSOR_INT_PIN_VECT) ISR(FSENSOR_INT_PIN_VECT)
{ {
if (mmu_enabled) return; if (mmu_enabled || ir_sensor_detected) return;
if (!((fsensor_int_pin_old ^ FSENSOR_INT_PIN_PIN_REG) & FSENSOR_INT_PIN_MASK)) return; if (!((fsensor_int_pin_old ^ FSENSOR_INT_PIN_PIN_REG) & FSENSOR_INT_PIN_MASK)) return;
fsensor_int_pin_old = FSENSOR_INT_PIN_PIN_REG; fsensor_int_pin_old = FSENSOR_INT_PIN_PIN_REG;
static bool _lock = false; static bool _lock = false;
@ -446,6 +475,23 @@ ISR(FSENSOR_INT_PIN_VECT)
return; return;
} }
void fsensor_setup_interrupt(void)
{
pinMode(FSENSOR_INT_PIN, OUTPUT);
digitalWrite(FSENSOR_INT_PIN, LOW);
fsensor_int_pin_old = 0;
//pciSetup(FSENSOR_INT_PIN);
// !!! "pciSetup()" does not provide the correct results for some MCU pins
// so interrupt registers settings:
FSENSOR_INT_PIN_PCMSK_REG |= bit(FSENSOR_INT_PIN_PCMSK_BIT); // enable corresponding PinChangeInterrupt (individual pin)
PCIFR |= bit(FSENSOR_INT_PIN_PCICR_BIT); // clear previous occasional interrupt (set of pins)
PCICR |= bit(FSENSOR_INT_PIN_PCICR_BIT); // enable corresponding PinChangeInterrupt (set of pins)
}
#endif //PAT9125
void fsensor_st_block_begin(block_t* bl) void fsensor_st_block_begin(block_t* bl)
{ {
if (!fsensor_enabled) return; if (!fsensor_enabled) return;
@ -477,17 +523,18 @@ void fsensor_st_block_chunk(block_t* bl, int cnt)
//! If there is still no plausible signal from filament sensor plans M600 (Filament change). //! If there is still no plausible signal from filament sensor plans M600 (Filament change).
void fsensor_update(void) void fsensor_update(void)
{ {
if (fsensor_enabled && fsensor_watch_runout && (fsensor_err_cnt > FSENSOR_ERR_MAX)) #ifdef PAT9125
{ if (fsensor_enabled && fsensor_watch_runout && (fsensor_err_cnt > FSENSOR_ERR_MAX))
bool autoload_enabled_tmp = fsensor_autoload_enabled; {
fsensor_autoload_enabled = false; bool autoload_enabled_tmp = fsensor_autoload_enabled;
bool oq_meassure_enabled_tmp = fsensor_oq_meassure_enabled; fsensor_autoload_enabled = false;
fsensor_oq_meassure_enabled = true; bool oq_meassure_enabled_tmp = fsensor_oq_meassure_enabled;
fsensor_oq_meassure_enabled = true;
fsensor_stop_and_save_print(); fsensor_stop_and_save_print();
fsensor_err_cnt = 0; fsensor_err_cnt = 0;
fsensor_oq_meassure_start(0); fsensor_oq_meassure_start(0);
enquecommand_front_P((PSTR("G1 E-3 F200"))); enquecommand_front_P((PSTR("G1 E-3 F200")));
process_commands(); process_commands();
@ -495,51 +542,47 @@ void fsensor_update(void)
cmdqueue_pop_front(); cmdqueue_pop_front();
st_synchronize(); st_synchronize();
enquecommand_front_P((PSTR("G1 E3 F200"))); enquecommand_front_P((PSTR("G1 E3 F200")));
process_commands(); process_commands();
KEEPALIVE_STATE(IN_HANDLER); KEEPALIVE_STATE(IN_HANDLER);
cmdqueue_pop_front(); cmdqueue_pop_front();
st_synchronize(); st_synchronize();
uint8_t err_cnt = fsensor_err_cnt; uint8_t err_cnt = fsensor_err_cnt;
fsensor_oq_meassure_stop(); fsensor_oq_meassure_stop();
bool err = false; bool err = false;
err |= (err_cnt > 1); err |= (err_cnt > 1);
err |= (fsensor_oq_er_sum > 2); err |= (fsensor_oq_er_sum > 2);
err |= (fsensor_oq_yd_sum < (4 * FSENSOR_OQ_MIN_YD)); err |= (fsensor_oq_yd_sum < (4 * FSENSOR_OQ_MIN_YD));
if (!err) if (!err)
{ {
printf_P(PSTR("fsensor_err_cnt = 0\n")); printf_P(PSTR("fsensor_err_cnt = 0\n"));
fsensor_restore_print_and_continue(); fsensor_restore_print_and_continue();
} }
else else
{ {
printf_P(PSTR("fsensor_update - M600\n")); printf_P(PSTR("fsensor_update - M600\n"));
eeprom_update_byte((uint8_t*)EEPROM_FERROR_COUNT, eeprom_read_byte((uint8_t*)EEPROM_FERROR_COUNT) + 1); eeprom_update_byte((uint8_t*)EEPROM_FERROR_COUNT, eeprom_read_byte((uint8_t*)EEPROM_FERROR_COUNT) + 1);
eeprom_update_word((uint16_t*)EEPROM_FERROR_COUNT_TOT, eeprom_read_word((uint16_t*)EEPROM_FERROR_COUNT_TOT) + 1); eeprom_update_word((uint16_t*)EEPROM_FERROR_COUNT_TOT, eeprom_read_word((uint16_t*)EEPROM_FERROR_COUNT_TOT) + 1);
enquecommand_front_P(PSTR("FSENSOR_RECOVER")); enquecommand_front_P(PSTR("FSENSOR_RECOVER"));
enquecommand_front_P((PSTR("M600"))); enquecommand_front_P((PSTR("M600")));
fsensor_watch_runout = false; fsensor_watch_runout = false;
} }
fsensor_autoload_enabled = autoload_enabled_tmp; fsensor_autoload_enabled = autoload_enabled_tmp;
fsensor_oq_meassure_enabled = oq_meassure_enabled_tmp; fsensor_oq_meassure_enabled = oq_meassure_enabled_tmp;
} }
} #else //PAT9125
if ((digitalRead(IR_SENSOR_PIN) == 1) && CHECK_FSENSOR && fsensor_enabled && ir_sensor_detected)
void fsensor_setup_interrupt(void) {
{ fsensor_stop_and_save_print();
printf_P(PSTR("fsensor_update - M600\n"));
pinMode(FSENSOR_INT_PIN, OUTPUT); eeprom_update_byte((uint8_t*)EEPROM_FERROR_COUNT, eeprom_read_byte((uint8_t*)EEPROM_FERROR_COUNT) + 1);
digitalWrite(FSENSOR_INT_PIN, LOW); eeprom_update_word((uint16_t*)EEPROM_FERROR_COUNT_TOT, eeprom_read_word((uint16_t*)EEPROM_FERROR_COUNT_TOT) + 1);
fsensor_int_pin_old = 0; enquecommand_front_P(PSTR("FSENSOR_RECOVER"));
enquecommand_front_P((PSTR("M600")));
//pciSetup(FSENSOR_INT_PIN); }
// !!! "pciSetup()" does not provide the correct results for some MCU pins #endif //PAT9125
// so interrupt registers settings:
FSENSOR_INT_PIN_PCMSK_REG |= bit(FSENSOR_INT_PIN_PCMSK_BIT); // enable corresponding PinChangeInterrupt (individual pin)
PCIFR |= bit(FSENSOR_INT_PIN_PCICR_BIT); // clear previous occasional interrupt (set of pins)
PCICR |= bit(FSENSOR_INT_PIN_PCICR_BIT); // enable corresponding PinChangeInterrupt (set of pins)
} }

View File

@ -35,14 +35,16 @@ extern bool fsensor_autoload_enabled;
extern void fsensor_autoload_set(bool State); extern void fsensor_autoload_set(bool State);
extern void fsensor_update(void); extern void fsensor_update(void);
#ifdef PAT9125
//! setup pin-change interrupt //! setup pin-change interrupt
extern void fsensor_setup_interrupt(void); extern void fsensor_setup_interrupt(void);
//! @name autoload support //! @name autoload support
//! @{ //! @{
extern void fsensor_autoload_check_start(void); extern void fsensor_autoload_check_start(void);
extern void fsensor_autoload_check_stop(void); extern void fsensor_autoload_check_stop(void);
#endif //PAT9125
extern bool fsensor_check_autoload(void); extern bool fsensor_check_autoload(void);
//! @} //! @}

View File

@ -755,7 +755,7 @@ void lcd_update_enable(uint8_t enabled)
// Reset the timeout interval. // Reset the timeout interval.
lcd_timeoutToStatus.start(); lcd_timeoutToStatus.start();
// Force the keypad update now. // Force the keypad update now.
lcd_next_update_millis = millis() - 1; lcd_next_update_millis = _millis() - 1;
// Full update. // Full update.
lcd_clear(); lcd_clear();
if (lcd_charsetup_func) if (lcd_charsetup_func)

View File

@ -284,7 +284,8 @@ void menu_draw_P<int16_t*>(char chr, const char* str, int16_t val)
if (text_len > 15) text_len = 15; if (text_len > 15) text_len = 15;
char spaces[21]; char spaces[21];
strcpy_P(spaces, menu_20x_space); strcpy_P(spaces, menu_20x_space);
spaces[15 - text_len] = 0; if (val <= -100) spaces[15 - text_len - 1] = 0;
else spaces[15 - text_len] = 0;
lcd_printf_P(menu_fmt_int3, chr, str, spaces, val); lcd_printf_P(menu_fmt_int3, chr, str, spaces, val);
} }

View File

@ -96,7 +96,7 @@ const char MSG_WIZARD_DONE[] PROGMEM_I1 = ISTR("All is done. Happy printing!");
const char MSG_WIZARD_HEATING[] PROGMEM_I1 = ISTR("Preheating nozzle. Please wait."); ////c=20 r=3 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_QUIT[] PROGMEM_I1 = ISTR("You can always resume the Wizard from Calibration -> Wizard."); ////c=20 r=8
const char MSG_YES[] PROGMEM_I1 = ISTR("Yes"); ////c=0 r=0 const char MSG_YES[] PROGMEM_I1 = ISTR("Yes"); ////c=0 r=0
const char WELCOME_MSG[] PROGMEM_I1 = ISTR(CUSTOM_MENDEL_NAME " ready."); ////c=20 r=0 const char WELCOME_MSG[] PROGMEM_I1 = ISTR(CUSTOM_MENDEL_NAME " OK."); ////c=20 r=0
//not internationalized messages //not internationalized messages
const char MSG_SD_WORKDIR_FAIL[] PROGMEM_N1 = "workDir open failed"; ////c=0 r=0 const char MSG_SD_WORKDIR_FAIL[] PROGMEM_N1 = "workDir open failed"; ////c=0 r=0
const char MSG_BROWNOUT_RESET[] PROGMEM_N1 = " Brown out Reset"; ////c=0 r=0 const char MSG_BROWNOUT_RESET[] PROGMEM_N1 = " Brown out Reset"; ////c=0 r=0

View File

@ -20,8 +20,6 @@
#include "tmc2130.h" #include "tmc2130.h"
#endif //TMC2130 #endif //TMC2130
#define CHECK_FINDA ((IS_SD_PRINTING || is_usb_printing) && (mcode_in_progress != 600) && !saved_printing && e_active())
#define MMU_TODELAY 100 #define MMU_TODELAY 100
#define MMU_TIMEOUT 10 #define MMU_TIMEOUT 10
#define MMU_CMD_TIMEOUT 45000ul //5min timeout for mmu commands (except P0) #define MMU_CMD_TIMEOUT 45000ul //5min timeout for mmu commands (except P0)
@ -42,7 +40,7 @@ uint8_t mmu_cmd = 0;
//idler ir sensor //idler ir sensor
uint8_t mmu_idl_sens = 0; uint8_t mmu_idl_sens = 0;
bool mmu_idler_sensor_detected = false; bool ir_sensor_detected = false;
bool mmu_loading_flag = false; bool mmu_loading_flag = false;
uint8_t mmu_extruder = MMU_FILAMENT_UNKNOWN; uint8_t mmu_extruder = MMU_FILAMENT_UNKNOWN;
@ -74,7 +72,7 @@ int mmu_puts_P(const char* str)
{ {
mmu_clr_rx_buf(); //clear rx buffer mmu_clr_rx_buf(); //clear rx buffer
int r = fputs_P(str, uart2io); //send command int r = fputs_P(str, uart2io); //send command
mmu_last_request = millis(); mmu_last_request = _millis();
return r; return r;
} }
@ -86,7 +84,7 @@ int mmu_printf_P(const char* format, ...)
mmu_clr_rx_buf(); //clear rx buffer mmu_clr_rx_buf(); //clear rx buffer
int r = vfprintf_P(uart2io, format, args); //send command int r = vfprintf_P(uart2io, format, args); //send command
va_end(args); va_end(args);
mmu_last_request = millis(); mmu_last_request = _millis();
return r; return r;
} }
@ -94,7 +92,7 @@ int mmu_printf_P(const char* format, ...)
int8_t mmu_rx_ok(void) int8_t mmu_rx_ok(void)
{ {
int8_t res = uart2_rx_str_P(PSTR("ok\n")); int8_t res = uart2_rx_str_P(PSTR("ok\n"));
if (res == 1) mmu_last_response = millis(); if (res == 1) mmu_last_response = _millis();
return res; return res;
} }
@ -102,7 +100,7 @@ int8_t mmu_rx_ok(void)
int8_t mmu_rx_start(void) int8_t mmu_rx_start(void)
{ {
int8_t res = uart2_rx_str_P(PSTR("start\n")); int8_t res = uart2_rx_str_P(PSTR("start\n"));
if (res == 1) mmu_last_response = millis(); if (res == 1) mmu_last_response = _millis();
return res; return res;
} }
@ -117,25 +115,36 @@ void mmu_init(void)
_delay_ms(10); //wait 10ms for sure _delay_ms(10); //wait 10ms for sure
mmu_reset(); //reset mmu (HW or SW), do not wait for response mmu_reset(); //reset mmu (HW or SW), do not wait for response
mmu_state = -1; mmu_state = -1;
PIN_INP(MMU_IDLER_SENSOR_PIN); //input mode PIN_INP(IR_SENSOR_PIN); //input mode
PIN_SET(MMU_IDLER_SENSOR_PIN); //pullup PIN_SET(IR_SENSOR_PIN); //pullup
} }
//returns true if idler IR sensor was detected, otherwise returns false
bool check_for_idler_sensor() //if IR_SENSOR defined, always returns true
//otherwise check for ir sensor and returns true if idler IR sensor was detected, otherwise returns false
bool check_for_ir_sensor()
{ {
#ifdef IR_SENSOR
return true;
#else //IR_SENSOR
bool detected = false; bool detected = false;
//if MMU_IDLER_SENSOR_PIN input is low and pat9125sensor is not present we detected idler sensor //if IR_SENSOR_PIN input is low and pat9125sensor is not present we detected idler sensor
if ((PIN_GET(MMU_IDLER_SENSOR_PIN) == 0) && fsensor_not_responding) if ((PIN_GET(IR_SENSOR_PIN) == 0)
{ #ifdef PAT9125
detected = true; && fsensor_not_responding
//printf_P(PSTR("Idler IR sensor detected\n")); #endif //PAT9125
)
{
detected = true;
//printf_P(PSTR("Idler IR sensor detected\n"));
} }
else else
{ {
//printf_P(PSTR("Idler IR sensor not detected\n")); //printf_P(PSTR("Idler IR sensor not detected\n"));
} }
return detected; return detected;
#endif //IR_SENSOR
} }
//mmu main loop - state machine processing //mmu main loop - state machine processing
@ -158,7 +167,7 @@ void mmu_loop(void)
mmu_puts_P(PSTR("S1\n")); //send 'read version' request mmu_puts_P(PSTR("S1\n")); //send 'read version' request
mmu_state = -2; mmu_state = -2;
} }
else if (millis() > 30000) //30sec after reset disable mmu else if (_millis() > 30000) //30sec after reset disable mmu
{ {
puts_P(PSTR("MMU not responding - DISABLED")); puts_P(PSTR("MMU not responding - DISABLED"));
mmu_state = 0; mmu_state = 0;
@ -225,8 +234,6 @@ void mmu_loop(void)
#endif //MMU_DEBUG && MMU_FINDA_DEBUG #endif //MMU_DEBUG && MMU_FINDA_DEBUG
puts_P(PSTR("MMU - ENABLED")); puts_P(PSTR("MMU - ENABLED"));
mmu_enabled = true; mmu_enabled = true;
//if we have filament loaded into the nozzle, we can decide if printer has idler sensor right now; otherwise we will will wait till start of T-code so it will be detected on beginning of second T-code
if(check_for_idler_sensor()) mmu_idler_sensor_detected = true;
mmu_state = 1; mmu_state = 1;
} }
return; return;
@ -300,9 +307,11 @@ void mmu_loop(void)
mmu_last_cmd = mmu_cmd; mmu_last_cmd = mmu_cmd;
mmu_cmd = 0; mmu_cmd = 0;
} }
else if ((mmu_last_response + 300) < millis()) //request every 300ms else if ((mmu_last_response + 300) < _millis()) //request every 300ms
{ {
if(check_for_idler_sensor()) mmu_idler_sensor_detected = true; #ifndef IR_SENSOR
if(check_for_ir_sensor()) ir_sensor_detected = true;
#endif //IR_SENSOR not defined
#if defined MMU_DEBUG && defined MMU_FINDA_DEBUG #if defined MMU_DEBUG && defined MMU_FINDA_DEBUG
puts_P(PSTR("MMU <= 'P0'")); puts_P(PSTR("MMU <= 'P0'"));
#endif //MMU_DEBUG && MMU_FINDA_DEBUG #endif //MMU_DEBUG && MMU_FINDA_DEBUG
@ -318,7 +327,7 @@ void mmu_loop(void)
printf_P(PSTR("MMU => '%dok'\n"), mmu_finda); printf_P(PSTR("MMU => '%dok'\n"), mmu_finda);
#endif //MMU_DEBUG && MMU_FINDA_DEBUG #endif //MMU_DEBUG && MMU_FINDA_DEBUG
//printf_P(PSTR("Eact: %d\n"), int(e_active())); //printf_P(PSTR("Eact: %d\n"), int(e_active()));
if (!mmu_finda && CHECK_FINDA && fsensor_enabled) { if (!mmu_finda && CHECK_FSENSOR && fsensor_enabled) {
fsensor_stop_and_save_print(); fsensor_stop_and_save_print();
enquecommand_front_P(PSTR("FSENSOR_RECOVER")); //then recover enquecommand_front_P(PSTR("FSENSOR_RECOVER")); //then recover
ad_markDepleted(mmu_extruder); ad_markDepleted(mmu_extruder);
@ -335,7 +344,7 @@ void mmu_loop(void)
if (mmu_cmd == 0) if (mmu_cmd == 0)
mmu_ready = true; mmu_ready = true;
} }
else if ((mmu_last_request + MMU_P0_TIMEOUT) < millis()) else if ((mmu_last_request + MMU_P0_TIMEOUT) < _millis())
{ //resend request after timeout (30s) { //resend request after timeout (30s)
mmu_state = 1; mmu_state = 1;
} }
@ -343,7 +352,7 @@ void mmu_loop(void)
case 3: //response to mmu commands case 3: //response to mmu commands
if (mmu_idl_sens) if (mmu_idl_sens)
{ {
if (PIN_GET(MMU_IDLER_SENSOR_PIN) == 0 && mmu_loading_flag) if (PIN_GET(IR_SENSOR_PIN) == 0 && mmu_loading_flag)
{ {
#ifdef MMU_DEBUG #ifdef MMU_DEBUG
printf_P(PSTR("MMU <= 'A'\n")); printf_P(PSTR("MMU <= 'A'\n"));
@ -365,7 +374,7 @@ void mmu_loop(void)
mmu_ready = true; mmu_ready = true;
mmu_state = 1; mmu_state = 1;
} }
else if ((mmu_last_request + MMU_CMD_TIMEOUT) < millis()) else if ((mmu_last_request + MMU_CMD_TIMEOUT) < _millis())
{ //resend request after timeout (5 min) { //resend request after timeout (5 min)
if (mmu_last_cmd) if (mmu_last_cmd)
{ {
@ -395,7 +404,7 @@ void mmu_loop(void)
mmu_ready = true; mmu_ready = true;
mmu_state = 1; mmu_state = 1;
} }
else if ((mmu_last_request + MMU_CMD_TIMEOUT) < millis()) else if ((mmu_last_request + MMU_CMD_TIMEOUT) < _millis())
{ //resend request after timeout (5 min) { //resend request after timeout (5 min)
mmu_state = 1; mmu_state = 1;
} }
@ -471,7 +480,7 @@ void mmu_load_step(bool synchronize)
//! off E-stepper to prevent over-heating and allow filament pull-out if necessary //! off E-stepper to prevent over-heating and allow filament pull-out if necessary
bool can_extrude() bool can_extrude()
{ {
if ((degHotend(active_extruder) < EXTRUDE_MINTEMP) || !mmu_idler_sensor_detected) if ((degHotend(active_extruder) < EXTRUDE_MINTEMP) || !ir_sensor_detected)
{ {
disable_e0(); disable_e0();
delay_keep_alive(100); delay_keep_alive(100);
@ -501,10 +510,10 @@ bool mmu_get_response(uint8_t move)
mmu_loading_flag = true; mmu_loading_flag = true;
if (can_extrude()) mmu_load_step(); if (can_extrude()) mmu_load_step();
//don't rely on "ok" signal from mmu unit; if filament detected by idler sensor during loading stop loading movements to prevent infinite loading //don't rely on "ok" signal from mmu unit; if filament detected by idler sensor during loading stop loading movements to prevent infinite loading
if (PIN_GET(MMU_IDLER_SENSOR_PIN) == 0) move = MMU_NO_MOVE; if (PIN_GET(IR_SENSOR_PIN) == 0) move = MMU_NO_MOVE;
break; break;
case MMU_UNLOAD_MOVE: case MMU_UNLOAD_MOVE:
if (PIN_GET(MMU_IDLER_SENSOR_PIN) == 0) //filament is still detected by idler sensor, printer helps with unlading if (PIN_GET(IR_SENSOR_PIN) == 0) //filament is still detected by idler sensor, printer helps with unlading
{ {
if (can_extrude()) if (can_extrude())
{ {
@ -522,7 +531,7 @@ bool mmu_get_response(uint8_t move)
} }
break; break;
case MMU_TCODE_MOVE: //first do unload and then continue with infinite loading movements case MMU_TCODE_MOVE: //first do unload and then continue with infinite loading movements
if (PIN_GET(MMU_IDLER_SENSOR_PIN) == 0) //filament detected by idler sensor, we must unload first if (PIN_GET(IR_SENSOR_PIN) == 0) //filament detected by idler sensor, we must unload first
{ {
if (can_extrude()) if (can_extrude())
{ {
@ -700,7 +709,7 @@ void mmu_load_to_nozzle()
bool saved_e_relative_mode = axis_relative_modes[E_AXIS]; bool saved_e_relative_mode = axis_relative_modes[E_AXIS];
if (!saved_e_relative_mode) axis_relative_modes[E_AXIS] = true; if (!saved_e_relative_mode) axis_relative_modes[E_AXIS] = true;
if (mmu_idler_sensor_detected) if (ir_sensor_detected)
{ {
current_position[E_AXIS] += 3.0f; current_position[E_AXIS] += 3.0f;
} }
@ -815,7 +824,7 @@ void change_extr(int
) { //switches multiplexer for extruders ) { //switches multiplexer for extruders
#ifdef SNMM #ifdef SNMM
st_synchronize(); st_synchronize();
delay(100); _delay(100);
disable_e0(); disable_e0();
disable_e1(); disable_e1();
@ -848,7 +857,7 @@ void change_extr(int
break; break;
} }
delay(100); _delay(100);
#endif #endif
} }
@ -1362,16 +1371,16 @@ void mmu_eject_filament(uint8_t filament, bool recover)
void mmu_continue_loading() void mmu_continue_loading()
{ {
if (mmu_idler_sensor_detected) { if (ir_sensor_detected) {
for (uint8_t i = 0; i < MMU_IDLER_SENSOR_ATTEMPTS_NR; i++) { for (uint8_t i = 0; i < MMU_IDLER_SENSOR_ATTEMPTS_NR; i++) {
if (PIN_GET(MMU_IDLER_SENSOR_PIN) == 0) return; if (PIN_GET(IR_SENSOR_PIN) == 0) return;
#ifdef MMU_DEBUG #ifdef MMU_DEBUG
printf_P(PSTR("Additional load attempt nr. %d\n"), i); printf_P(PSTR("Additional load attempt nr. %d\n"), i);
#endif // MMU_DEBUG #endif // MMU_DEBUG
mmu_command(MMU_CMD_C0); mmu_command(MMU_CMD_C0);
manage_response(true, true, MMU_LOAD_MOVE); manage_response(true, true, MMU_LOAD_MOVE);
} }
if (PIN_GET(MMU_IDLER_SENSOR_PIN) != 0) { if (PIN_GET(IR_SENSOR_PIN) != 0) {
uint8_t mmu_load_fail = eeprom_read_byte((uint8_t*)EEPROM_MMU_LOAD_FAIL); uint8_t mmu_load_fail = eeprom_read_byte((uint8_t*)EEPROM_MMU_LOAD_FAIL);
uint16_t mmu_load_fail_tot = eeprom_read_word((uint16_t*)EEPROM_MMU_LOAD_FAIL_TOT); uint16_t mmu_load_fail_tot = eeprom_read_word((uint16_t*)EEPROM_MMU_LOAD_FAIL_TOT);
if(mmu_load_fail < 255) eeprom_update_byte((uint8_t*)EEPROM_MMU_LOAD_FAIL, mmu_load_fail + 1); if(mmu_load_fail < 255) eeprom_update_byte((uint8_t*)EEPROM_MMU_LOAD_FAIL, mmu_load_fail + 1);
@ -1398,7 +1407,7 @@ void mmu_continue_loading()
isPrintPaused = true; isPrintPaused = true;
} }
} }
else { //mmu_idler_sensor_detected == false else { //mmu_ir_sensor_detected == false
mmu_command(MMU_CMD_C0); mmu_command(MMU_CMD_C0);
} }
} }

View File

@ -14,7 +14,7 @@ extern uint8_t mmu_extruder;
extern uint8_t tmp_extruder; extern uint8_t tmp_extruder;
extern int8_t mmu_finda; extern int8_t mmu_finda;
extern bool mmu_idler_sensor_detected; extern bool ir_sensor_detected;
extern bool mmu_loading_flag; extern bool mmu_loading_flag;
extern int16_t mmu_version; extern int16_t mmu_version;
@ -59,7 +59,7 @@ extern int mmu_printf_P(const char* format, ...);
extern int8_t mmu_rx_ok(void); extern int8_t mmu_rx_ok(void);
extern bool check_for_idler_sensor(); extern bool check_for_ir_sensor();
extern void mmu_init(void); extern void mmu_init(void);

View File

@ -99,10 +99,7 @@
//#define KILL_PIN 32 //#define KILL_PIN 32
//#define LCD_BL_PIN 5 //backlight control pin
//#define LCD_PWM_PIN -1//32 // lcd backlight brightnes pwm control pin
//#define LCD_PWM_MAX 0x0f // lcd pwm maximum value (0x07=64Hz, 0x0f=32Hz, 0x1f=16Hz)
#define BEEPER 84 // Beeper on AUX-4 #define BEEPER 84 // Beeper on AUX-4
#define LCD_PINS_RS 82 #define LCD_PINS_RS 82
#define LCD_PINS_ENABLE 61 // !!! changed from 18 (EINY03) #define LCD_PINS_ENABLE 61 // !!! changed from 18 (EINY03)
@ -121,7 +118,7 @@
#define TACH_0 79 // !!! changed from 81 (EINY03) #define TACH_0 79 // !!! changed from 81 (EINY03)
#define TACH_1 80 #define TACH_1 80
#define MMU_IDLER_SENSOR_PIN 62 //idler sensor @PK0 (digital pin 62/A8) #define IR_SENSOR_PIN 62 //idler sensor @PK0 (digital pin 62/A8)
// Support for an 8 bit logic analyzer, for example the Saleae. // Support for an 8 bit logic analyzer, for example the Saleae.
// Channels 0-2 are fast, they could generate 2.667Mhz waveform with a software loop. // Channels 0-2 are fast, they could generate 2.667Mhz waveform with a software loop.

View File

@ -102,7 +102,7 @@
#define SDCARDDETECT 72 #define SDCARDDETECT 72
#define MMU_IDLER_SENSOR_PIN 62 //idler sensor @PK0 (digital pin 62/A8) #define IR_SENSOR_PIN 62 //idler sensor @PK0 (digital pin 62/A8)
// Support for an 8 bit logic analyzer, for example the Saleae. // Support for an 8 bit logic analyzer, for example the Saleae.
// Channels 0-2 are fast, they could generate 2.667Mhz waveform with a software loop. // Channels 0-2 are fast, they could generate 2.667Mhz waveform with a software loop.

View File

@ -102,7 +102,7 @@
#define SDCARDDETECT 15 #define SDCARDDETECT 15
#define MMU_IDLER_SENSOR_PIN 62 //idler sensor @PK0 (digital pin 62/A8) #define IR_SENSOR_PIN 23 // idler sensor @PA1 (digital pin 23, "Z-MAX" connector)
// Support for an 8 bit logic analyzer, for example the Saleae. // Support for an 8 bit logic analyzer, for example the Saleae.
// Channels 0-2 are fast, they could generate 2.667Mhz waveform with a software loop. // Channels 0-2 are fast, they could generate 2.667Mhz waveform with a software loop.

View File

@ -535,9 +535,9 @@ void check_axes_activity()
if (tail_fan_speed) { if (tail_fan_speed) {
if (fan_kick_end == 0) { if (fan_kick_end == 0) {
// Just starting up fan - run at full power. // Just starting up fan - run at full power.
fan_kick_end = millis() + FAN_KICKSTART_TIME; fan_kick_end = _millis() + FAN_KICKSTART_TIME;
tail_fan_speed = 255; tail_fan_speed = 255;
} else if (fan_kick_end > millis()) } else if (fan_kick_end > _millis())
// Fan still spinning up. // Fan still spinning up.
tail_fan_speed = 255; tail_fan_speed = 255;
} else { } else {
@ -545,7 +545,13 @@ void check_axes_activity()
} }
#endif//FAN_KICKSTART_TIME #endif//FAN_KICKSTART_TIME
#ifdef FAN_SOFT_PWM #ifdef FAN_SOFT_PWM
fanSpeedSoftPwm = tail_fan_speed; if (fan_measuring) { //if measurement is currently in process, fanSpeedSoftPwm must remain set to 255, but we must update fanSpeedBckp value
fanSpeedBckp = tail_fan_speed;
}
else {
fanSpeedSoftPwm = tail_fan_speed;
}
//printf_P(PSTR("fanspeedsoftPWM %d \n"), fanSpeedSoftPwm);
#else #else
analogWrite(FAN_PIN,tail_fan_speed); analogWrite(FAN_PIN,tail_fan_speed);
#endif//!FAN_SOFT_PWM #endif//!FAN_SOFT_PWM

View File

@ -8,7 +8,9 @@
#define PRINTER_MK2_SNMM 201 #define PRINTER_MK2_SNMM 201
#define PRINTER_MK25 250 #define PRINTER_MK25 250
#define PRINTER_MK25_SNMM 251 #define PRINTER_MK25_SNMM 251
#define PRINTER_MK25S 252
#define PRINTER_MK3 300 #define PRINTER_MK3 300
#define PRINTER_MK3_SNMM 301 #define PRINTER_MK3_SNMM 301
#define PRINTER_MK3S 302
#endif //PRINTERS_H #endif //PRINTERS_H

View File

@ -1537,7 +1537,7 @@ void digitalPotWrite(int address, int value) // From Arduino DigitalPotControl e
SPI.transfer(address); // send in the address and value via SPI: SPI.transfer(address); // send in the address and value via SPI:
SPI.transfer(value); SPI.transfer(value);
digitalWrite(DIGIPOTSS_PIN,HIGH); // take the SS pin high to de-select the chip: digitalWrite(DIGIPOTSS_PIN,HIGH); // take the SS pin high to de-select the chip:
//delay(10); //_delay(10);
} }
#endif #endif

25
Firmware/system_timer.h Normal file
View File

@ -0,0 +1,25 @@
//! @file
#ifndef FIRMWARE_SYSTEM_TIMER_H_
#define FIRMWARE_SYSTEM_TIMER_H_
#include "Arduino.h"
#define SYSTEM_TIMER_2
#ifdef SYSTEM_TIMER_2
#include "timer02.h"
#define _millis millis2
#define _micros micros2
#define _delay delay2
#define _tone tone2
#define _noTone noTone2
#else //SYSTEM_TIMER_2
#define _millis millis
#define _micros micros
#define _delay delay
#define _tone tone
#define _noTone noTone
#define timer02_set_pwm0(pwm0)
#endif //SYSTEM_TIMER_2
#endif /* FIRMWARE_SYSTEM_TIMER_H_ */

View File

@ -45,6 +45,7 @@
#include "Configuration_prusa.h" #include "Configuration_prusa.h"
//=========================================================================== //===========================================================================
//=============================public variables============================ //=============================public variables============================
//=========================================================================== //===========================================================================
@ -141,7 +142,10 @@ static volatile bool temp_meas_ready = false;
#if (defined(EXTRUDER_0_AUTO_FAN_PIN) && EXTRUDER_0_AUTO_FAN_PIN > -1) || \ #if (defined(EXTRUDER_0_AUTO_FAN_PIN) && EXTRUDER_0_AUTO_FAN_PIN > -1) || \
(defined(EXTRUDER_1_AUTO_FAN_PIN) && EXTRUDER_1_AUTO_FAN_PIN > -1) || \ (defined(EXTRUDER_1_AUTO_FAN_PIN) && EXTRUDER_1_AUTO_FAN_PIN > -1) || \
(defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN > -1) (defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN > -1)
static unsigned long extruder_autofan_last_check; unsigned long extruder_autofan_last_check = _millis();
uint8_t fanSpeedBckp = 255;
bool fan_measuring = false;
#endif #endif
@ -220,7 +224,7 @@ static void temp_runaway_stop(bool isPreheat, bool isBed);
pid_cycle=0; pid_cycle=0;
bool heating = true; bool heating = true;
unsigned long temp_millis = millis(); unsigned long temp_millis = _millis();
unsigned long t1=temp_millis; unsigned long t1=temp_millis;
unsigned long t2=temp_millis; unsigned long t2=temp_millis;
long t_high = 0; long t_high = 0;
@ -236,7 +240,7 @@ static void temp_runaway_stop(bool isPreheat, bool isBed);
#if (defined(EXTRUDER_0_AUTO_FAN_PIN) && EXTRUDER_0_AUTO_FAN_PIN > -1) || \ #if (defined(EXTRUDER_0_AUTO_FAN_PIN) && EXTRUDER_0_AUTO_FAN_PIN > -1) || \
(defined(EXTRUDER_1_AUTO_FAN_PIN) && EXTRUDER_1_AUTO_FAN_PIN > -1) || \ (defined(EXTRUDER_1_AUTO_FAN_PIN) && EXTRUDER_1_AUTO_FAN_PIN > -1) || \
(defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN > -1) (defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN > -1)
unsigned long extruder_autofan_last_check = millis(); unsigned long extruder_autofan_last_check = _millis();
#endif #endif
if ((extruder >= EXTRUDERS) if ((extruder >= EXTRUDERS)
@ -257,6 +261,7 @@ static void temp_runaway_stop(bool isPreheat, bool isBed);
if (extruder<0) if (extruder<0)
{ {
soft_pwm_bed = (MAX_BED_POWER)/2; soft_pwm_bed = (MAX_BED_POWER)/2;
timer02_set_pwm0(soft_pwm_bed << 1);
bias = d = (MAX_BED_POWER)/2; bias = d = (MAX_BED_POWER)/2;
} }
else else
@ -283,28 +288,31 @@ static void temp_runaway_stop(bool isPreheat, bool isBed);
#if (defined(EXTRUDER_0_AUTO_FAN_PIN) && EXTRUDER_0_AUTO_FAN_PIN > -1) || \ #if (defined(EXTRUDER_0_AUTO_FAN_PIN) && EXTRUDER_0_AUTO_FAN_PIN > -1) || \
(defined(EXTRUDER_1_AUTO_FAN_PIN) && EXTRUDER_1_AUTO_FAN_PIN > -1) || \ (defined(EXTRUDER_1_AUTO_FAN_PIN) && EXTRUDER_1_AUTO_FAN_PIN > -1) || \
(defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN > -1) (defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN > -1)
if(millis() - extruder_autofan_last_check > 2500) { if(_millis() - extruder_autofan_last_check > 2500) {
checkExtruderAutoFans(); checkExtruderAutoFans();
extruder_autofan_last_check = millis(); extruder_autofan_last_check = _millis();
} }
#endif #endif
if(heating == true && input > temp) { if(heating == true && input > temp) {
if(millis() - t2 > 5000) { if(_millis() - t2 > 5000) {
heating=false; heating=false;
if (extruder<0) if (extruder<0)
{
soft_pwm_bed = (bias - d) >> 1; soft_pwm_bed = (bias - d) >> 1;
timer02_set_pwm0(soft_pwm_bed << 1);
}
else else
soft_pwm[extruder] = (bias - d) >> 1; soft_pwm[extruder] = (bias - d) >> 1;
t1=millis(); t1=_millis();
t_high=t1 - t2; t_high=t1 - t2;
max=temp; max=temp;
} }
} }
if(heating == false && input < temp) { if(heating == false && input < temp) {
if(millis() - t1 > 5000) { if(_millis() - t1 > 5000) {
heating=true; heating=true;
t2=millis(); t2=_millis();
t_low=t2 - t1; t_low=t2 - t1;
if(pid_cycle > 0) { if(pid_cycle > 0) {
bias += (d*(t_high - t_low))/(t_low + t_high); bias += (d*(t_high - t_low))/(t_low + t_high);
@ -347,7 +355,10 @@ static void temp_runaway_stop(bool isPreheat, bool isBed);
} }
} }
if (extruder<0) if (extruder<0)
{
soft_pwm_bed = (bias + d) >> 1; soft_pwm_bed = (bias + d) >> 1;
timer02_set_pwm0(soft_pwm_bed << 1);
}
else else
soft_pwm[extruder] = (bias + d) >> 1; soft_pwm[extruder] = (bias + d) >> 1;
pid_cycle++; pid_cycle++;
@ -361,7 +372,7 @@ static void temp_runaway_stop(bool isPreheat, bool isBed);
pid_cycle = 0; pid_cycle = 0;
return; return;
} }
if(millis() - temp_millis > 2000) { if(_millis() - temp_millis > 2000) {
int p; int p;
if (extruder<0){ if (extruder<0){
p=soft_pwm_bed; p=soft_pwm_bed;
@ -396,9 +407,9 @@ static void temp_runaway_stop(bool isPreheat, bool isBed);
return; return;
} }
} }
temp_millis = millis(); temp_millis = _millis();
} }
if(((millis() - t1) + (millis() - t2)) > (10L*60L*1000L*2L)) { if(((_millis() - t1) + (_millis() - t2)) > (10L*60L*1000L*2L)) {
SERIAL_PROTOCOLLNPGM("PID Autotune failed! timeout"); SERIAL_PROTOCOLLNPGM("PID Autotune failed! timeout");
pid_tuning_finished = true; pid_tuning_finished = true;
pid_cycle = 0; pid_cycle = 0;
@ -454,7 +465,7 @@ void setExtruderAutoFanState(int pin, bool state)
// this idiom allows both digital and PWM fan outputs (see M42 handling). // this idiom allows both digital and PWM fan outputs (see M42 handling).
pinMode(pin, OUTPUT); pinMode(pin, OUTPUT);
digitalWrite(pin, newFanSpeed); digitalWrite(pin, newFanSpeed);
analogWrite(pin, newFanSpeed); //analogWrite(pin, newFanSpeed);
} }
#if (defined(FANCHECK) && (((defined(TACH_0) && (TACH_0 >-1)) || (defined(TACH_1) && (TACH_1 > -1))))) #if (defined(FANCHECK) && (((defined(TACH_0) && (TACH_0 >-1)) || (defined(TACH_1) && (TACH_1 > -1)))))
@ -462,9 +473,9 @@ void setExtruderAutoFanState(int pin, bool state)
void countFanSpeed() void countFanSpeed()
{ {
//SERIAL_ECHOPGM("edge counter 1:"); MYSERIAL.println(fan_edge_counter[1]); //SERIAL_ECHOPGM("edge counter 1:"); MYSERIAL.println(fan_edge_counter[1]);
fan_speed[0] = (fan_edge_counter[0] * (float(250) / (millis() - extruder_autofan_last_check))); fan_speed[0] = (fan_edge_counter[0] * (float(250) / (_millis() - extruder_autofan_last_check)));
fan_speed[1] = (fan_edge_counter[1] * (float(250) / (millis() - extruder_autofan_last_check))); fan_speed[1] = (fan_edge_counter[1] * (float(250) / (_millis() - extruder_autofan_last_check)));
/*SERIAL_ECHOPGM("time interval: "); MYSERIAL.println(millis() - extruder_autofan_last_check); /*SERIAL_ECHOPGM("time interval: "); MYSERIAL.println(_millis() - extruder_autofan_last_check);
SERIAL_ECHOPGM("extruder fan speed:"); MYSERIAL.print(fan_speed[0]); SERIAL_ECHOPGM("; edge counter:"); MYSERIAL.println(fan_edge_counter[0]); SERIAL_ECHOPGM("extruder fan speed:"); MYSERIAL.print(fan_speed[0]); SERIAL_ECHOPGM("; edge counter:"); MYSERIAL.println(fan_edge_counter[0]);
SERIAL_ECHOPGM("print fan speed:"); MYSERIAL.print(fan_speed[1]); SERIAL_ECHOPGM("; edge counter:"); MYSERIAL.println(fan_edge_counter[1]); SERIAL_ECHOPGM("print fan speed:"); MYSERIAL.print(fan_speed[1]); SERIAL_ECHOPGM("; edge counter:"); MYSERIAL.println(fan_edge_counter[1]);
SERIAL_ECHOLNPGM(" ");*/ SERIAL_ECHOLNPGM(" ");*/
@ -476,6 +487,16 @@ extern bool fans_check_enabled;
void checkFanSpeed() void checkFanSpeed()
{ {
uint8_t max_print_fan_errors = 0;
uint8_t max_extruder_fan_errors = 0;
#ifdef FAN_SOFT_PWM
max_print_fan_errors = 3; //15 seconds
max_extruder_fan_errors = 2; //10seconds
#else //FAN_SOFT_PWM
max_print_fan_errors = 15; //15 seconds
max_extruder_fan_errors = 5; //5 seconds
#endif //FAN_SOFT_PWM
fans_check_enabled = (eeprom_read_byte((uint8_t*)EEPROM_FAN_CHECK_ENABLED) > 0); fans_check_enabled = (eeprom_read_byte((uint8_t*)EEPROM_FAN_CHECK_ENABLED) > 0);
static unsigned char fan_speed_errors[2] = { 0,0 }; static unsigned char fan_speed_errors[2] = { 0,0 };
#if (defined(FANCHECK) && defined(TACH_0) && (TACH_0 >-1)) #if (defined(FANCHECK) && defined(TACH_0) && (TACH_0 >-1))
@ -483,15 +504,15 @@ void checkFanSpeed()
else fan_speed_errors[0] = 0; else fan_speed_errors[0] = 0;
#endif #endif
#if (defined(FANCHECK) && defined(TACH_1) && (TACH_1 >-1)) #if (defined(FANCHECK) && defined(TACH_1) && (TACH_1 >-1))
if ((fan_speed[1] == 0) && ((blocks_queued() ? block_buffer[block_buffer_tail].fan_speed : fanSpeed) > MIN_PRINT_FAN_SPEED)) fan_speed_errors[1]++; if ((fan_speed[1] < 5) && ((blocks_queued() ? block_buffer[block_buffer_tail].fan_speed : fanSpeed) > MIN_PRINT_FAN_SPEED)) fan_speed_errors[1]++;
else fan_speed_errors[1] = 0; else fan_speed_errors[1] = 0;
#endif #endif
if ((fan_speed_errors[0] > 5) && fans_check_enabled) { if ((fan_speed_errors[0] > max_extruder_fan_errors) && fans_check_enabled) {
fan_speed_errors[0] = 0; fan_speed_errors[0] = 0;
fanSpeedError(0); //extruder fan fanSpeedError(0); //extruder fan
} }
if ((fan_speed_errors[1] > 15) && fans_check_enabled) { if ((fan_speed_errors[1] > max_print_fan_errors) && fans_check_enabled) {
fan_speed_errors[1] = 0; fan_speed_errors[1] = 0;
fanSpeedError(1); //print fan fanSpeedError(1); //print fan
} }
@ -698,7 +719,7 @@ void manage_heater()
} }
#ifdef WATCH_TEMP_PERIOD #ifdef WATCH_TEMP_PERIOD
if(watchmillis[e] && millis() - watchmillis[e] > WATCH_TEMP_PERIOD) if(watchmillis[e] && _millis() - watchmillis[e] > WATCH_TEMP_PERIOD)
{ {
if(degHotend(e) < watch_start_temp[e] + WATCH_TEMP_INCREASE) if(degHotend(e) < watch_start_temp[e] + WATCH_TEMP_INCREASE)
{ {
@ -726,26 +747,56 @@ void manage_heater()
#endif #endif
} // End extruder for loop } // End extruder for loop
#define FAN_CHECK_PERIOD 5000 //5s
#define FAN_CHECK_DURATION 100 //100ms
#ifndef DEBUG_DISABLE_FANCHECK #ifndef DEBUG_DISABLE_FANCHECK
#if (defined(EXTRUDER_0_AUTO_FAN_PIN) && EXTRUDER_0_AUTO_FAN_PIN > -1) || \ #if (defined(EXTRUDER_0_AUTO_FAN_PIN) && EXTRUDER_0_AUTO_FAN_PIN > -1) || \
(defined(EXTRUDER_1_AUTO_FAN_PIN) && EXTRUDER_1_AUTO_FAN_PIN > -1) || \ (defined(EXTRUDER_1_AUTO_FAN_PIN) && EXTRUDER_1_AUTO_FAN_PIN > -1) || \
(defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN > -1) (defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN > -1)
if(millis() - extruder_autofan_last_check > 1000) // only need to check fan state very infrequently
#ifdef FAN_SOFT_PWM
#ifdef FANCHECK
if ((_millis() - extruder_autofan_last_check > FAN_CHECK_PERIOD) && (!fan_measuring)) {
extruder_autofan_last_check = _millis();
fanSpeedBckp = fanSpeedSoftPwm;
if (fanSpeedSoftPwm >= MIN_PRINT_FAN_SPEED) { //if we are in rage where we are doing fan check, set full PWM range for a short time to measure fan RPM by reading tacho signal without modulation by PWM signal
// printf_P(PSTR("fanSpeedSoftPwm 1: %d\n"), fanSpeedSoftPwm);
fanSpeedSoftPwm = 255;
}
fan_measuring = true;
}
if ((_millis() - extruder_autofan_last_check > FAN_CHECK_DURATION) && (fan_measuring)) {
countFanSpeed();
checkFanSpeed();
//printf_P(PSTR("fanSpeedSoftPwm 1: %d\n"), fanSpeedSoftPwm);
fanSpeedSoftPwm = fanSpeedBckp;
//printf_P(PSTR("fan PWM: %d; extr fanSpeed measured: %d; print fan speed measured: %d \n"), fanSpeedBckp, fan_speed[0], fan_speed[1]);
extruder_autofan_last_check = _millis();
fan_measuring = false;
}
#endif //FANCHECK
checkExtruderAutoFans();
#else //FAN_SOFT_PWM
if(_millis() - extruder_autofan_last_check > 1000) // only need to check fan state very infrequently
{ {
#if (defined(FANCHECK) && ((defined(TACH_0) && (TACH_0 >-1)) || (defined(TACH_1) && (TACH_1 > -1)))) #if (defined(FANCHECK) && ((defined(TACH_0) && (TACH_0 >-1)) || (defined(TACH_1) && (TACH_1 > -1))))
countFanSpeed(); countFanSpeed();
checkFanSpeed(); checkFanSpeed();
#endif //(defined(TACH_0) && TACH_0 >-1) || (defined(TACH_1) && TACH_1 > -1) #endif //(defined(TACH_0) && TACH_0 >-1) || (defined(TACH_1) && TACH_1 > -1)
checkExtruderAutoFans(); checkExtruderAutoFans();
extruder_autofan_last_check = millis(); extruder_autofan_last_check = _millis();
} }
#endif #endif //FAN_SOFT_PWM
#endif
#endif //DEBUG_DISABLE_FANCHECK #endif //DEBUG_DISABLE_FANCHECK
#ifndef PIDTEMPBED #ifndef PIDTEMPBED
if(millis() - previous_millis_bed_heater < BED_CHECK_INTERVAL) if(_millis() - previous_millis_bed_heater < BED_CHECK_INTERVAL)
return; return;
previous_millis_bed_heater = millis(); previous_millis_bed_heater = _millis();
#endif #endif
#if TEMP_SENSOR_BED != 0 #if TEMP_SENSOR_BED != 0
@ -781,9 +832,11 @@ void manage_heater()
if(current_temperature_bed < BED_MAXTEMP) if(current_temperature_bed < BED_MAXTEMP)
{ {
soft_pwm_bed = (int)pid_output >> 1; soft_pwm_bed = (int)pid_output >> 1;
timer02_set_pwm0(soft_pwm_bed << 1);
} }
else { else {
soft_pwm_bed = 0; soft_pwm_bed = 0;
timer02_set_pwm0(soft_pwm_bed << 1);
} }
#elif !defined(BED_LIMIT_SWITCHING) #elif !defined(BED_LIMIT_SWITCHING)
@ -793,15 +846,18 @@ void manage_heater()
if(current_temperature_bed >= target_temperature_bed) if(current_temperature_bed >= target_temperature_bed)
{ {
soft_pwm_bed = 0; soft_pwm_bed = 0;
timer02_set_pwm0(soft_pwm_bed << 1);
} }
else else
{ {
soft_pwm_bed = MAX_BED_POWER>>1; soft_pwm_bed = MAX_BED_POWER>>1;
timer02_set_pwm0(soft_pwm_bed << 1);
} }
} }
else else
{ {
soft_pwm_bed = 0; soft_pwm_bed = 0;
timer02_set_pwm0(soft_pwm_bed << 1);
WRITE(HEATER_BED_PIN,LOW); WRITE(HEATER_BED_PIN,LOW);
} }
#else //#ifdef BED_LIMIT_SWITCHING #else //#ifdef BED_LIMIT_SWITCHING
@ -811,20 +867,26 @@ void manage_heater()
if(current_temperature_bed > target_temperature_bed + BED_HYSTERESIS) if(current_temperature_bed > target_temperature_bed + BED_HYSTERESIS)
{ {
soft_pwm_bed = 0; soft_pwm_bed = 0;
timer02_set_pwm0(soft_pwm_bed << 1);
} }
else if(current_temperature_bed <= target_temperature_bed - BED_HYSTERESIS) else if(current_temperature_bed <= target_temperature_bed - BED_HYSTERESIS)
{ {
soft_pwm_bed = MAX_BED_POWER>>1; soft_pwm_bed = MAX_BED_POWER>>1;
timer02_set_pwm0(soft_pwm_bed << 1);
} }
} }
else else
{ {
soft_pwm_bed = 0; soft_pwm_bed = 0;
timer02_set_pwm0(soft_pwm_bed << 1);
WRITE(HEATER_BED_PIN,LOW); WRITE(HEATER_BED_PIN,LOW);
} }
#endif #endif
if(target_temperature_bed==0) if(target_temperature_bed==0)
{
soft_pwm_bed = 0; soft_pwm_bed = 0;
timer02_set_pwm0(soft_pwm_bed << 1);
}
#endif #endif
#ifdef HOST_KEEPALIVE_FEATURE #ifdef HOST_KEEPALIVE_FEATURE
@ -996,7 +1058,6 @@ static void updateTemperaturesFromRawValues()
CRITICAL_SECTION_END; CRITICAL_SECTION_END;
} }
void tp_init() void tp_init()
{ {
#if MB(RUMBA) && ((TEMP_SENSOR_0==-1)||(TEMP_SENSOR_1==-1)||(TEMP_SENSOR_2==-1)||(TEMP_SENSOR_BED==-1)) #if MB(RUMBA) && ((TEMP_SENSOR_0==-1)||(TEMP_SENSOR_1==-1)||(TEMP_SENSOR_2==-1)||(TEMP_SENSOR_BED==-1))
@ -1037,7 +1098,7 @@ void tp_init()
setPwmFrequency(FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8 setPwmFrequency(FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
#endif #endif
#ifdef FAN_SOFT_PWM #ifdef FAN_SOFT_PWM
soft_pwm_fan = fanSpeedSoftPwm / 2; soft_pwm_fan = fanSpeedSoftPwm / (1 << (8 - FAN_SOFT_PWM_BITS));
#endif #endif
#endif #endif
@ -1063,13 +1124,21 @@ void tp_init()
adc_init(); adc_init();
#ifdef SYSTEM_TIMER_2
timer02_init();
OCR2B = 128;
TIMSK2 |= (1<<OCIE2B);
#else //SYSTEM_TIMER_2
// Use timer0 for temperature measurement // Use timer0 for temperature measurement
// Interleave temperature interrupt with millies interrupt // Interleave temperature interrupt with millies interrupt
OCR0B = 128; OCR0B = 128;
TIMSK0 |= (1<<OCIE0B); TIMSK0 |= (1<<OCIE0B);
#endif //SYSTEM_TIMER_2
// Wait for temperature measurement to settle // Wait for temperature measurement to settle
delay(250); _delay(250);
#ifdef HEATER_0_MINTEMP #ifdef HEATER_0_MINTEMP
minttemp[0] = HEATER_0_MINTEMP; minttemp[0] = HEATER_0_MINTEMP;
@ -1164,7 +1233,7 @@ void setWatch()
if(degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE * 2)) if(degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE * 2))
{ {
watch_start_temp[e] = degHotend(e); watch_start_temp[e] = degHotend(e);
watchmillis[e] = millis(); watchmillis[e] = _millis();
} }
} }
#endif #endif
@ -1181,7 +1250,7 @@ void temp_runaway_check(int _heater_id, float _target_temperature, float _curren
static int __preheat_errors[2] = { 0,0}; static int __preheat_errors[2] = { 0,0};
if (millis() - temp_runaway_timer[_heater_id] > 2000) if (_millis() - temp_runaway_timer[_heater_id] > 2000)
{ {
#ifdef TEMP_RUNAWAY_BED_TIMEOUT #ifdef TEMP_RUNAWAY_BED_TIMEOUT
@ -1199,7 +1268,7 @@ void temp_runaway_check(int _heater_id, float _target_temperature, float _curren
} }
#endif #endif
temp_runaway_timer[_heater_id] = millis(); temp_runaway_timer[_heater_id] = _millis();
if (_output == 0) if (_output == 0)
{ {
temp_runaway_check_active = false; temp_runaway_check_active = false;
@ -1329,7 +1398,12 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)||(eSoundMode
SET_OUTPUT(EXTRUDER_0_AUTO_FAN_PIN); SET_OUTPUT(EXTRUDER_0_AUTO_FAN_PIN);
SET_OUTPUT(FAN_PIN); SET_OUTPUT(FAN_PIN);
WRITE(EXTRUDER_0_AUTO_FAN_PIN, 1); WRITE(EXTRUDER_0_AUTO_FAN_PIN, 1);
#ifdef FAN_SOFT_PWM
fanSpeedSoftPwm = 255;
#else //FAN_SOFT_PWM
analogWrite(FAN_PIN, 255); analogWrite(FAN_PIN, 255);
#endif //FAN_SOFT_PWM
fanSpeed = 255; fanSpeed = 255;
delayMicroseconds(2000); delayMicroseconds(2000);
} }
@ -1374,6 +1448,7 @@ void disable_heater()
#if defined(TEMP_BED_PIN) && TEMP_BED_PIN > -1 #if defined(TEMP_BED_PIN) && TEMP_BED_PIN > -1
target_temperature_bed=0; target_temperature_bed=0;
soft_pwm_bed=0; soft_pwm_bed=0;
timer02_set_pwm0(soft_pwm_bed << 1);
#if defined(HEATER_BED_PIN) && HEATER_BED_PIN > -1 #if defined(HEATER_BED_PIN) && HEATER_BED_PIN > -1
WRITE(HEATER_BED_PIN,LOW); WRITE(HEATER_BED_PIN,LOW);
#endif #endif
@ -1465,10 +1540,10 @@ int max6675_temp = 2000;
int read_max6675() int read_max6675()
{ {
if (millis() - max6675_previous_millis < MAX6675_HEAT_INTERVAL) if (_millis() - max6675_previous_millis < MAX6675_HEAT_INTERVAL)
return max6675_temp; return max6675_temp;
max6675_previous_millis = millis(); max6675_previous_millis = _millis();
max6675_temp = 0; max6675_temp = 0;
#ifdef PRR #ifdef PRR
@ -1515,9 +1590,9 @@ int read_max6675()
#endif #endif
extern "C" { extern "C" {
void adc_ready(void) //callback from adc when sampling finished void adc_ready(void) //callback from adc when sampling finished
{ {
current_temperature_raw[0] = adc_values[ADC_PIN_IDX(TEMP_0_PIN)]; //heater current_temperature_raw[0] = adc_values[ADC_PIN_IDX(TEMP_0_PIN)]; //heater
@ -1538,8 +1613,12 @@ void adc_ready(void) //callback from adc when sampling finished
} // extern "C" } // extern "C"
// Timer 0 is shared with millies // Timer2 (originaly timer0) is shared with millies
ISR(TIMER0_COMPB_vect) // @ 1kHz ~ 1ms #ifdef SYSTEM_TIMER_2
ISR(TIMER2_COMPB_vect)
#else //SYSTEM_TIMER_2
ISR(TIMER0_COMPB_vect)
#endif //SYSTEM_TIMER_2
{ {
static bool _lock = false; static bool _lock = false;
if (_lock) return; if (_lock) return;
@ -1606,13 +1685,18 @@ ISR(TIMER0_COMPB_vect) // @ 1kHz ~ 1ms
#endif #endif
#if defined(HEATER_BED_PIN) && HEATER_BED_PIN > -1 #if defined(HEATER_BED_PIN) && HEATER_BED_PIN > -1
soft_pwm_b = soft_pwm_bed; soft_pwm_b = soft_pwm_bed;
if(soft_pwm_b > 0) WRITE(HEATER_BED_PIN,1); else WRITE(HEATER_BED_PIN,0); #ifndef SYSTEM_TIMER_2
#endif if(soft_pwm_b > 0) WRITE(HEATER_BED_PIN,1); else WRITE(HEATER_BED_PIN,0);
#ifdef FAN_SOFT_PWM #endif //SYSTEM_TIMER_2
soft_pwm_fan = fanSpeedSoftPwm / 2;
if(soft_pwm_fan > 0) WRITE(FAN_PIN,1); else WRITE(FAN_PIN,0);
#endif #endif
} }
#ifdef FAN_SOFT_PWM
if ((pwm_count & ((1 << FAN_SOFT_PWM_BITS) - 1)) == 0)
{
soft_pwm_fan = fanSpeedSoftPwm / (1 << (8 - FAN_SOFT_PWM_BITS));
if(soft_pwm_fan > 0) WRITE(FAN_PIN,1); else WRITE(FAN_PIN,0);
}
#endif
if(soft_pwm_0 < pwm_count) if(soft_pwm_0 < pwm_count)
{ {
WRITE(HEATER_0_PIN,0); WRITE(HEATER_0_PIN,0);
@ -1631,7 +1715,7 @@ ISR(TIMER0_COMPB_vect) // @ 1kHz ~ 1ms
if(soft_pwm_b < pwm_count) WRITE(HEATER_BED_PIN,0); if(soft_pwm_b < pwm_count) WRITE(HEATER_BED_PIN,0);
#endif #endif
#ifdef FAN_SOFT_PWM #ifdef FAN_SOFT_PWM
if(soft_pwm_fan < pwm_count) WRITE(FAN_PIN,0); if (soft_pwm_fan < (pwm_count & ((1 << FAN_SOFT_PWM_BITS) - 1))) WRITE(FAN_PIN,0);
#endif #endif
pwm_count += (1 << SOFT_PWM_SCALE); pwm_count += (1 << SOFT_PWM_SCALE);
@ -1740,7 +1824,7 @@ ISR(TIMER0_COMPB_vect) // @ 1kHz ~ 1ms
state_timer_heater_b = MIN_STATE_TIME; state_timer_heater_b = MIN_STATE_TIME;
} }
state_heater_b = 1; state_heater_b = 1;
WRITE(HEATER_BED_PIN, 1); //WRITE(HEATER_BED_PIN, 1);
} }
} else { } else {
// turn OFF heather only if the minimum time is up // turn OFF heather only if the minimum time is up
@ -1818,8 +1902,8 @@ ISR(TIMER0_COMPB_vect) // @ 1kHz ~ 1ms
#endif #endif
#ifdef FAN_SOFT_PWM #ifdef FAN_SOFT_PWM
if (pwm_count == 0){ if ((pwm_count & ((1 << FAN_SOFT_PWM_BITS) - 1)) == 0)
soft_pwm_fan = fanSpeedSoftPwm / 2; soft_pwm_fan = fanSpeedSoftPwm / (1 << (8 - FAN_SOFT_PWM_BITS));
if (soft_pwm_fan > 0) WRITE(FAN_PIN,1); else WRITE(FAN_PIN,0); if (soft_pwm_fan > 0) WRITE(FAN_PIN,1); else WRITE(FAN_PIN,0);
} }
if (soft_pwm_fan < pwm_count) WRITE(FAN_PIN,0); if (soft_pwm_fan < pwm_count) WRITE(FAN_PIN,0);
@ -1949,7 +2033,7 @@ if(current_temperature_raw_ambient>(OVERSAMPLENR*MINTEMP_MINAMBIENT_RAW)) // the
// * nozzle checking // * nozzle checking
if(target_temperature[active_extruder]>minttemp[active_extruder]) if(target_temperature[active_extruder]>minttemp[active_extruder])
{ // ~ nozzle heating is on { // ~ nozzle heating is on
bCheckingOnHeater=bCheckingOnHeater||(current_temperature[active_extruder]>=minttemp[active_extruder]); // for eventually delay cutting bCheckingOnHeater=bCheckingOnHeater||(current_temperature[active_extruder]>(minttemp[active_extruder]+TEMP_HYSTERESIS)); // for eventually delay cutting
if(oTimer4minTempHeater.expired(HEATER_MINTEMP_DELAY)||(!oTimer4minTempHeater.running())||bCheckingOnHeater) if(oTimer4minTempHeater.expired(HEATER_MINTEMP_DELAY)||(!oTimer4minTempHeater.running())||bCheckingOnHeater)
{ {
bCheckingOnHeater=true; // not necessary bCheckingOnHeater=true; // not necessary
@ -1963,7 +2047,7 @@ else { // ~ nozzle heating is off
// * bed checking // * bed checking
if(target_temperature_bed>BED_MINTEMP) if(target_temperature_bed>BED_MINTEMP)
{ // ~ bed heating is on { // ~ bed heating is on
bCheckingOnBed=bCheckingOnBed||(current_temperature_bed>=BED_MINTEMP); // for eventually delay cutting bCheckingOnBed=bCheckingOnBed||(current_temperature_bed>(BED_MINTEMP+TEMP_HYSTERESIS)); // for eventually delay cutting
if(oTimer4minTempBed.expired(BED_MINTEMP_DELAY)||(!oTimer4minTempBed.running())||bCheckingOnBed) if(oTimer4minTempBed.expired(BED_MINTEMP_DELAY)||(!oTimer4minTempBed.running())||bCheckingOnBed)
{ {
bCheckingOnBed=true; // not necessary bCheckingOnBed=true; // not necessary
@ -1986,10 +2070,17 @@ else { // ambient temperature is stan
#if (defined(FANCHECK) && defined(TACH_0) && (TACH_0 > -1)) #if (defined(FANCHECK) && defined(TACH_0) && (TACH_0 > -1))
void check_fans() { void check_fans() {
#ifdef FAN_SOFT_PWM
if (READ(TACH_0) != fan_state[0]) {
if(fan_measuring) fan_edge_counter[0] ++;
fan_state[0] = !fan_state[0];
}
#else //FAN_SOFT_PWM
if (READ(TACH_0) != fan_state[0]) { if (READ(TACH_0) != fan_state[0]) {
fan_edge_counter[0] ++; fan_edge_counter[0] ++;
fan_state[0] = !fan_state[0]; fan_state[0] = !fan_state[0];
} }
#endif
//if (READ(TACH_1) != fan_state[1]) { //if (READ(TACH_1) != fan_state[1]) {
// fan_edge_counter[1] ++; // fan_edge_counter[1] ++;
// fan_state[1] = !fan_state[1]; // fan_state[1] = !fan_state[1];

View File

@ -27,9 +27,20 @@
#include "stepper.h" #include "stepper.h"
#endif #endif
#ifdef SYSTEM_TIMER_2
#define ENABLE_TEMPERATURE_INTERRUPT() TIMSK2 |= (1<<OCIE2B)
#define DISABLE_TEMPERATURE_INTERRUPT() TIMSK2 &= ~(1<<OCIE2B)
#else //SYSTEM_TIMER_2
#define ENABLE_TEMPERATURE_INTERRUPT() TIMSK0 |= (1<<OCIE0B) #define ENABLE_TEMPERATURE_INTERRUPT() TIMSK0 |= (1<<OCIE0B)
#define DISABLE_TEMPERATURE_INTERRUPT() TIMSK0 &= ~(1<<OCIE0B) #define DISABLE_TEMPERATURE_INTERRUPT() TIMSK0 &= ~(1<<OCIE0B)
#endif //SYSTEM_TIMER_2
// public functions // public functions
void tp_init(); //initialize the heating void tp_init(); //initialize the heating
void manage_heater(); //it is critical that this is called periodically. void manage_heater(); //it is critical that this is called periodically.
@ -241,3 +252,7 @@ void check_max_temp();
#endif #endif
extern unsigned long extruder_autofan_last_check;
extern uint8_t fanSpeedBckp;
extern bool fan_measuring;

168
Firmware/timer02.c Normal file
View File

@ -0,0 +1,168 @@
//timer02.c
// use atmega timer2 as main system timer instead of timer0
// timer0 is used for fast pwm (OC0B output)
// original OVF handler is disabled
#include <avr/io.h>
#include <avr/interrupt.h>
#include "Arduino.h"
#include "io_atmega2560.h"
#define BEEPER 84
uint8_t timer02_pwm0 = 0;
void timer02_set_pwm0(uint8_t pwm0)
{
if (timer02_pwm0 == pwm0) return;
if (pwm0)
{
TCCR0A |= (2 << COM0B0);
OCR0B = pwm0 - 1;
}
else
{
TCCR0A &= ~(2 << COM0B0);
OCR0B = 0;
}
timer02_pwm0 = pwm0;
}
void timer02_init(void)
{
//save sreg
uint8_t _sreg = SREG;
//disable interrupts for sure
cli();
//mask timer0 interrupts - disable all
TIMSK0 &= ~(1<<TOIE0);
TIMSK0 &= ~(1<<OCIE0A);
TIMSK0 &= ~(1<<OCIE0B);
//setup timer0
TCCR0A = 0x00; //COM_A-B=00, WGM_0-1=00
TCCR0B = (1 << CS00); //WGM_2=0, CS_0-2=011
//switch timer0 to fast pwm mode
TCCR0A |= (3 << WGM00); //WGM_0-1=11
//set OCR0B register to zero
OCR0B = 0;
//disable OCR0B output (will be enabled in timer02_set_pwm0)
TCCR0A &= ~(2 << COM0B0);
//setup timer2
TCCR2A = 0x00; //COM_A-B=00, WGM_0-1=00
TCCR2B = (4 << CS20); //WGM_2=0, CS_0-2=011
//mask timer2 interrupts - enable OVF, disable others
TIMSK2 |= (1<<TOIE2);
TIMSK2 &= ~(1<<OCIE2A);
TIMSK2 &= ~(1<<OCIE2B);
//set timer2 OCR registers (OCRB interrupt generated 0.5ms after OVF interrupt)
OCR2A = 0;
OCR2B = 128;
//restore sreg (enable interrupts)
SREG = _sreg;
}
//following code is OVF handler for timer 2
//it is copy-paste from wiring.c and modified for timer2
//variables timer0_overflow_count and timer0_millis are declared in wiring.c
// the prescaler is set so that timer0 ticks every 64 clock cycles, and the
// the overflow handler is called every 256 ticks.
#define MICROSECONDS_PER_TIMER0_OVERFLOW (clockCyclesToMicroseconds(64 * 256))
// the whole number of milliseconds per timer0 overflow
#define MILLIS_INC (MICROSECONDS_PER_TIMER0_OVERFLOW / 1000)
// the fractional number of milliseconds per timer0 overflow. we shift right
// by three to fit these numbers into a byte. (for the clock speeds we care
// about - 8 and 16 MHz - this doesn't lose precision.)
#define FRACT_INC ((MICROSECONDS_PER_TIMER0_OVERFLOW % 1000) >> 3)
#define FRACT_MAX (1000 >> 3)
//extern volatile unsigned long timer0_overflow_count;
//extern volatile unsigned long timer0_millis;
//unsigned char timer0_fract = 0;
volatile unsigned long timer2_overflow_count;
volatile unsigned long timer2_millis;
unsigned char timer2_fract = 0;
ISR(TIMER2_OVF_vect)
{
// copy these to local variables so they can be stored in registers
// (volatile variables must be read from memory on every access)
unsigned long m = timer2_millis;
unsigned char f = timer2_fract;
m += MILLIS_INC;
f += FRACT_INC;
if (f >= FRACT_MAX)
{
f -= FRACT_MAX;
m += 1;
}
timer2_fract = f;
timer2_millis = m;
timer2_overflow_count++;
}
unsigned long millis2(void)
{
unsigned long m;
uint8_t oldSREG = SREG;
// disable interrupts while we read timer0_millis or we might get an
// inconsistent value (e.g. in the middle of a write to timer0_millis)
cli();
m = timer2_millis;
SREG = oldSREG;
return m;
}
unsigned long micros2(void)
{
unsigned long m;
uint8_t oldSREG = SREG, t;
cli();
m = timer2_overflow_count;
#if defined(TCNT2)
t = TCNT2;
#elif defined(TCNT2L)
t = TCNT2L;
#else
#error TIMER 2 not defined
#endif
#ifdef TIFR2
if ((TIFR2 & _BV(TOV2)) && (t < 255))
m++;
#else
if ((TIFR & _BV(TOV2)) && (t < 255))
m++;
#endif
SREG = oldSREG;
return ((m << 8) + t) * (64 / clockCyclesPerMicrosecond());
}
void delay2(unsigned long ms)
{
uint32_t start = micros2();
while (ms > 0)
{
yield();
while ( ms > 0 && (micros2() - start) >= 1000)
{
ms--;
start += 1000;
}
}
}
void tone2(uint8_t _pin, unsigned int frequency/*, unsigned long duration*/)
{
PIN_SET(BEEPER);
}
void noTone2(uint8_t _pin)
{
PIN_CLR(BEEPER);
}

36
Firmware/timer02.h Normal file
View File

@ -0,0 +1,36 @@
//timer02.h
// use atmega timer2 as main system timer instead of timer0
// timer0 is used for fast pwm (OC0B output)
// original OVF handler is disabled
#ifndef TIMER02_H
#define TIMER02_H
#include <inttypes.h>
#if defined(__cplusplus)
extern "C" {
#endif //defined(__cplusplus)
extern uint8_t timer02_pwm0;
extern void timer02_set_pwm0(uint8_t pwm0);
extern void timer02_init(void);
extern unsigned long millis2(void);
extern unsigned long micros2(void);
extern void delay2(unsigned long ms);
extern void tone2(uint8_t _pin, unsigned int frequency/*, unsigned long duration*/);
extern void noTone2(uint8_t _pin);
#if defined(__cplusplus)
}
#endif //defined(__cplusplus)
#endif //TIMER02_H

View File

@ -381,7 +381,7 @@ bool tmc2130_wait_standstill_xy(int timeout)
void tmc2130_check_overtemp() void tmc2130_check_overtemp()
{ {
static uint32_t checktime = 0; static uint32_t checktime = 0;
if (millis() - checktime > 1000 ) if (_millis() - checktime > 1000 )
{ {
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
{ {
@ -398,7 +398,7 @@ void tmc2130_check_overtemp()
} }
} }
checktime = millis(); checktime = _millis();
tmc2130_sg_change = true; tmc2130_sg_change = true;
} }
#ifdef DEBUG_CRASHDET_COUNTERS #ifdef DEBUG_CRASHDET_COUNTERS
@ -697,9 +697,9 @@ uint16_t tmc2130_get_res(uint8_t axis)
void tmc2130_set_res(uint8_t axis, uint16_t res) void tmc2130_set_res(uint8_t axis, uint16_t res)
{ {
tmc2130_mres[axis] = tmc2130_usteps2mres(res); tmc2130_mres[axis] = tmc2130_usteps2mres(res);
// uint32_t u = micros(); // uint32_t u = _micros();
tmc2130_setup_chopper(axis, tmc2130_mres[axis], tmc2130_current_h[axis], tmc2130_current_r[axis]); tmc2130_setup_chopper(axis, tmc2130_mres[axis], tmc2130_current_h[axis], tmc2130_current_r[axis]);
// u = micros() - u; // u = _micros() - u;
// printf_P(PSTR("tmc2130_setup_chopper %c %lu us"), "XYZE"[axis], u); // printf_P(PSTR("tmc2130_setup_chopper %c %lu us"), "XYZE"[axis], u);
} }

View File

@ -9,6 +9,7 @@
#include "temperature.h" #include "temperature.h"
#include "stepper.h" #include "stepper.h"
#include "ConfigurationStore.h" #include "ConfigurationStore.h"
#include "printers.h"
#include <string.h> #include <string.h>
@ -183,7 +184,9 @@ enum class testScreen
static int lcd_selftest_screen(testScreen screen, int _progress, int _progress_scale, bool _clear, int _delay); static int lcd_selftest_screen(testScreen screen, int _progress, int _progress_scale, bool _clear, int _delay);
static void lcd_selftest_screen_step(int _row, int _col, int _state, const char *_name, const char *_indicator); static void lcd_selftest_screen_step(int _row, int _col, int _state, const char *_name, const char *_indicator);
static bool lcd_selftest_manual_fan_check(int _fan, bool check_opposite); static bool lcd_selftest_manual_fan_check(int _fan, bool check_opposite);
#ifdef FANCHECK
static bool lcd_selftest_fan_dialog(int _fan); static bool lcd_selftest_fan_dialog(int _fan);
#endif //FANCHECK
static bool lcd_selftest_fsensor(); static bool lcd_selftest_fsensor();
static bool selftest_irsensor(); static bool selftest_irsensor();
static void lcd_selftest_error(int _error_no, const char *_error_1, const char *_error_2); static void lcd_selftest_error(int _error_no, const char *_error_1, const char *_error_2);
@ -303,8 +306,8 @@ static void lcd_implementation_drawmenu_sdfile_selected(uint8_t row, char* longF
j = 0; j = 0;
break; break;
}else{ }else{
if (j == 1) delay(3); //wait around 1.2 s to start scrolling text if (j == 1) _delay_ms(3); //wait around 1.2 s to start scrolling text
delay(1); //then scroll with redrawing every 300 ms _delay_ms(1); //then scroll with redrawing every 300 ms
} }
} }
@ -598,7 +601,7 @@ void lcdui_print_farm(void)
// Beat display // Beat display
lcd_set_cursor(LCD_WIDTH - 1, 0); lcd_set_cursor(LCD_WIDTH - 1, 0);
if ( (millis() - kicktime) < 60000 ) { if ( (_millis() - kicktime) < 60000 ) {
lcd_puts_P(PSTR("L")); lcd_puts_P(PSTR("L"));
@ -639,7 +642,7 @@ void lcdui_print_time(void)
if (print_time_remaining_normal != PRINT_TIME_REMAINING_INIT) if (print_time_remaining_normal != PRINT_TIME_REMAINING_INIT)
print_t = print_time_remaining(); print_t = print_time_remaining();
else if(starttime != 0) else if(starttime != 0)
print_t = millis() / 60000 - starttime / 60000; print_t = _millis() / 60000 - starttime / 60000;
int chars = 0; int chars = 0;
if ((PRINTER_ACTIVE) && ((print_time_remaining_normal != PRINT_TIME_REMAINING_INIT) || (starttime != 0))) if ((PRINTER_ACTIVE) && ((print_time_remaining_normal != PRINT_TIME_REMAINING_INIT) || (starttime != 0)))
{ {
@ -1758,10 +1761,10 @@ void lcd_commands()
else { else {
SERIAL_ECHOPGM("Invalid PID cal. results. Not stored to EEPROM."); SERIAL_ECHOPGM("Invalid PID cal. results. Not stored to EEPROM.");
} }
display_time = millis(); display_time = _millis();
lcd_commands_step = 1; lcd_commands_step = 1;
} }
if ((lcd_commands_step == 1) && ((millis()- display_time)>2000)) { //calibration finished message if ((lcd_commands_step == 1) && ((_millis()- display_time)>2000)) { //calibration finished message
lcd_setstatuspgm(_T(WELCOME_MSG)); lcd_setstatuspgm(_T(WELCOME_MSG));
custom_message_type = CUSTOM_MSG_TYPE_STATUS; custom_message_type = CUSTOM_MSG_TYPE_STATUS;
pid_temp = DEFAULT_PID_TEMP; pid_temp = DEFAULT_PID_TEMP;
@ -1922,7 +1925,7 @@ static void lcd_menu_extruder_info()
fan_speed_RPM[1] fan_speed_RPM[1]
); );
#ifdef FILAMENT_SENSOR #ifdef PAT9125
// Display X and Y difference from Filament sensor // Display X and Y difference from Filament sensor
// Display Light intensity from Filament sensor // Display Light intensity from Filament sensor
// Frame_Avg register represents the average brightness of all pixels within a frame (324 pixels). This // Frame_Avg register represents the average brightness of all pixels within a frame (324 pixels). This
@ -1948,7 +1951,7 @@ static void lcd_menu_extruder_info()
); );
} }
} }
#endif //FILAMENT_SENSOR #endif //PAT9125
menu_back_if_clicked(); menu_back_if_clicked();
} }
@ -2264,7 +2267,7 @@ static void lcd_support_menu()
MENU_ITEM_BACK_P(STR_SEPARATOR); MENU_ITEM_BACK_P(STR_SEPARATOR);
MENU_ITEM_SUBMENU_P(_i("XYZ cal. details"), lcd_menu_xyz_y_min);////MSG_XYZ_DETAILS c=19 r=1 MENU_ITEM_SUBMENU_P(_i("XYZ cal. details"), lcd_menu_xyz_y_min);////MSG_XYZ_DETAILS c=19 r=1
MENU_ITEM_SUBMENU_P(_i("Extruder info"), lcd_menu_extruder_info);////MSG_INFO_EXTRUDER c=18 r=1 MENU_ITEM_SUBMENU_P(_i("Extruder info"), lcd_menu_extruder_info);////MSG_INFO_EXTRUDER c=18 r=1
MENU_ITEM_SUBMENU_P(_i("Show sensors"), lcd_menu_show_sensors_state);////MSG_INFO_SENSORS c=18 r=1 MENU_ITEM_SUBMENU_P(_i("Sensor info"), lcd_menu_show_sensors_state);////MSG_INFO_SENSORS c=18 r=1
#ifdef TMC2130 #ifdef TMC2130
MENU_ITEM_SUBMENU_P(_i("Belt status"), lcd_menu_belt_status);////MSG_MENU_BELT_STATUS c=18 r=1 MENU_ITEM_SUBMENU_P(_i("Belt status"), lcd_menu_belt_status);////MSG_MENU_BELT_STATUS c=18 r=1
@ -2495,9 +2498,10 @@ void lcd_wait_interact() {
#else #else
lcd_puts_P(_i("Insert filament"));////MSG_INSERT_FILAMENT c=20 r=0 lcd_puts_P(_i("Insert filament"));////MSG_INSERT_FILAMENT c=20 r=0
#endif #endif
lcd_set_cursor(0, 2); if (!fsensor_autoload_enabled) {
lcd_puts_P(_i("and press the knob"));////MSG_PRESS c=20 r=0 lcd_set_cursor(0, 2);
lcd_puts_P(_i("and press the knob"));////MSG_PRESS c=20 r=0
}
} }
@ -2558,7 +2562,7 @@ void lcd_loading_filament() {
manage_heater(); manage_heater();
manage_inactivity(true); manage_inactivity(true);
delay(153); _delay(153);
} }
@ -2638,7 +2642,7 @@ void lcd_alright() {
lcd_set_cursor(0, cursor_pos); lcd_set_cursor(0, cursor_pos);
lcd_print(">"); lcd_print(">");
enc_dif = lcd_encoder_diff; enc_dif = lcd_encoder_diff;
delay(100); _delay(100);
} }
} }
@ -2647,7 +2651,7 @@ void lcd_alright() {
if (lcd_clicked()) { if (lcd_clicked()) {
lcd_change_fil_state = cursor_pos; lcd_change_fil_state = cursor_pos;
delay(500); _delay(500);
} }
@ -2668,7 +2672,7 @@ void show_preheat_nozzle_warning()
lcd_puts_P(_T(MSG_ERROR)); lcd_puts_P(_T(MSG_ERROR));
lcd_set_cursor(0, 2); lcd_set_cursor(0, 2);
lcd_puts_P(_T(MSG_PREHEAT_NOZZLE)); lcd_puts_P(_T(MSG_PREHEAT_NOZZLE));
delay(2000); _delay(2000);
lcd_clear(); lcd_clear();
} }
@ -2746,7 +2750,7 @@ void lcd_menu_statistics()
if (IS_SD_PRINTING) if (IS_SD_PRINTING)
{ {
const float _met = ((float)total_filament_used) / (100000.f); const float _met = ((float)total_filament_used) / (100000.f);
const uint32_t _t = (millis() - starttime) / 1000ul; const uint32_t _t = (_millis() - starttime) / 1000ul;
const int _h = _t / 3600; const int _h = _t / 3600;
const int _m = (_t - (_h * 3600ul)) / 60ul; const int _m = (_t - (_h * 3600ul)) / 60ul;
const int _s = _t - ((_h * 3600ul) + (_m * 60ul)); const int _s = _t - ((_h * 3600ul) + (_m * 60ul));
@ -2795,7 +2799,7 @@ void lcd_menu_statistics()
{ {
manage_heater(); manage_heater();
manage_inactivity(true); manage_inactivity(true);
delay(100); _delay(100);
} }
KEEPALIVE_STATE(NOT_BUSY); KEEPALIVE_STATE(NOT_BUSY);
lcd_quick_feedback(); lcd_quick_feedback();
@ -3053,7 +3057,7 @@ static void _lcd_babystep(int axis, const char *msg)
} }
} }
_md->babystepMemMM[axis] = _md->babystepMem[axis]/cs.axis_steps_per_unit[axis]; _md->babystepMemMM[axis] = _md->babystepMem[axis]/cs.axis_steps_per_unit[axis];
delay(50); _delay(50);
lcd_encoder = 0; lcd_encoder = 0;
lcd_draw_update = 1; lcd_draw_update = 1;
} }
@ -3102,8 +3106,6 @@ void lcd_adjust_bed_reset(void)
_md->status = 0; _md->status = 0;
} }
#define BED_ADJUSTMENT_UM_MAX 50
void lcd_adjust_bed(void) void lcd_adjust_bed(void)
{ {
_menu_data_adjust_bed_t* _md = (_menu_data_adjust_bed_t*)&(menu_data[0]); _menu_data_adjust_bed_t* _md = (_menu_data_adjust_bed_t*)&(menu_data[0]);
@ -3216,7 +3218,7 @@ void lcd_adjust_z() {
lcd_set_cursor(0, cursor_pos); lcd_set_cursor(0, cursor_pos);
lcd_print(">"); lcd_print(">");
enc_dif = lcd_encoder_diff; enc_dif = lcd_encoder_diff;
delay(100); _delay(100);
} }
} }
@ -3236,7 +3238,7 @@ void lcd_adjust_z() {
EEPROM_save_B(EEPROM_BABYSTEP_Y, &zero); EEPROM_save_B(EEPROM_BABYSTEP_Y, &zero);
EEPROM_save_B(EEPROM_BABYSTEP_Z, &zero); EEPROM_save_B(EEPROM_BABYSTEP_Z, &zero);
} }
delay(500); _delay(500);
} }
}; };
@ -3324,22 +3326,22 @@ bool lcd_calibrate_z_end_stop_manual(bool only_z)
// Until confirmed by the confirmation dialog. // Until confirmed by the confirmation dialog.
for (;;) { for (;;) {
unsigned long previous_millis_cmd = millis(); unsigned long previous_millis_cmd = _millis();
const char *msg = only_z ? _i("Calibrating Z. Rotate the knob to move the Z carriage up to the end stoppers. Click when done.") : _i("Calibrating XYZ. Rotate the knob to move the Z carriage up to the end stoppers. Click when done.");////MSG_MOVE_CARRIAGE_TO_THE_TOP c=20 r=8////MSG_MOVE_CARRIAGE_TO_THE_TOP_Z c=20 r=8 const char *msg = only_z ? _i("Calibrating Z. Rotate the knob to move the Z carriage up to the end stoppers. Click when done.") : _i("Calibrating XYZ. Rotate the knob to move the Z carriage up to the end stoppers. Click when done.");////MSG_MOVE_CARRIAGE_TO_THE_TOP c=20 r=8////MSG_MOVE_CARRIAGE_TO_THE_TOP_Z c=20 r=8
const char *msg_next = lcd_display_message_fullscreen_P(msg); const char *msg_next = lcd_display_message_fullscreen_P(msg);
const bool multi_screen = msg_next != NULL; const bool multi_screen = msg_next != NULL;
unsigned long previous_millis_msg = millis(); unsigned long previous_millis_msg = _millis();
// Until the user finishes the z up movement. // Until the user finishes the z up movement.
lcd_encoder_diff = 0; lcd_encoder_diff = 0;
lcd_encoder = 0; lcd_encoder = 0;
for (;;) { for (;;) {
// if (millis() - previous_millis_cmd > LCD_TIMEOUT_TO_STATUS) // if (_millis() - previous_millis_cmd > LCD_TIMEOUT_TO_STATUS)
// goto canceled; // goto canceled;
manage_heater(); manage_heater();
manage_inactivity(true); manage_inactivity(true);
if (abs(lcd_encoder_diff) >= ENCODER_PULSES_PER_STEP) { if (abs(lcd_encoder_diff) >= ENCODER_PULSES_PER_STEP) {
delay(50); _delay(50);
previous_millis_cmd = millis(); previous_millis_cmd = _millis();
lcd_encoder += abs(lcd_encoder_diff / ENCODER_PULSES_PER_STEP); lcd_encoder += abs(lcd_encoder_diff / ENCODER_PULSES_PER_STEP);
lcd_encoder_diff = 0; lcd_encoder_diff = 0;
if (! planner_queue_full()) { if (! planner_queue_full()) {
@ -3353,15 +3355,15 @@ bool lcd_calibrate_z_end_stop_manual(bool only_z)
// Abort a move if in progress. // Abort a move if in progress.
planner_abort_hard(); planner_abort_hard();
while (lcd_clicked()) ; while (lcd_clicked()) ;
delay(10); _delay(10);
while (lcd_clicked()) ; while (lcd_clicked()) ;
break; break;
} }
if (multi_screen && millis() - previous_millis_msg > 5000) { if (multi_screen && _millis() - previous_millis_msg > 5000) {
if (msg_next == NULL) if (msg_next == NULL)
msg_next = msg; msg_next = msg;
msg_next = lcd_display_message_fullscreen_P(msg_next); msg_next = lcd_display_message_fullscreen_P(msg_next);
previous_millis_msg = millis(); previous_millis_msg = _millis();
} }
} }
// Let the user confirm, that the Z carriage is at the top end stoppers. // Let the user confirm, that the Z carriage is at the top end stoppers.
@ -3376,7 +3378,12 @@ bool lcd_calibrate_z_end_stop_manual(bool only_z)
calibrated: calibrated:
// Let the machine think the Z axis is a bit higher than it is, so it will not home into the bed // Let the machine think the Z axis is a bit higher than it is, so it will not home into the bed
// during the search for the induction points. // during the search for the induction points.
current_position[Z_AXIS] = Z_MAX_POS-3.f; if ((PRINTER_TYPE == PRINTER_MK25) || (PRINTER_TYPE == PRINTER_MK2) || (PRINTER_TYPE == PRINTER_MK2_SNMM)) {
current_position[Z_AXIS] = Z_MAX_POS-3.f;
}
else {
current_position[Z_AXIS] = Z_MAX_POS+4.f;
}
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
return true; return true;
@ -3531,13 +3538,13 @@ bool lcd_wait_for_click_delay(uint16_t nDelay)
// true ~ clicked, false ~ delayed // true ~ clicked, false ~ delayed
{ {
bool bDelayed; bool bDelayed;
long nTime0 = millis()/1000; long nTime0 = _millis()/1000;
lcd_consume_click(); lcd_consume_click();
KEEPALIVE_STATE(PAUSED_FOR_USER); KEEPALIVE_STATE(PAUSED_FOR_USER);
for (;;) { for (;;) {
manage_heater(); manage_heater();
manage_inactivity(true); manage_inactivity(true);
bDelayed = ((millis()/1000-nTime0) > nDelay); bDelayed = ((_millis()/1000-nTime0) > nDelay);
bDelayed = (bDelayed && (nDelay != 0)); // 0 ~ no timeout, always waiting for click bDelayed = (bDelayed && (nDelay != 0)); // 0 ~ no timeout, always waiting for click
if (lcd_clicked() || bDelayed) { if (lcd_clicked() || bDelayed) {
KEEPALIVE_STATE(IN_HANDLER); KEEPALIVE_STATE(IN_HANDLER);
@ -3579,14 +3586,14 @@ int8_t lcd_show_multiscreen_message_two_choices_and_wait_P(const char *msg, bool
bool yes = default_first ? true : false; bool yes = default_first ? true : false;
// Wait for user confirmation or a timeout. // Wait for user confirmation or a timeout.
unsigned long previous_millis_cmd = millis(); unsigned long previous_millis_cmd = _millis();
int8_t enc_dif = lcd_encoder_diff; int8_t enc_dif = lcd_encoder_diff;
lcd_consume_click(); lcd_consume_click();
//KEEPALIVE_STATE(PAUSED_FOR_USER); //KEEPALIVE_STATE(PAUSED_FOR_USER);
for (;;) { for (;;) {
for (uint8_t i = 0; i < 100; ++i) { for (uint8_t i = 0; i < 100; ++i) {
delay_keep_alive(50); delay_keep_alive(50);
if (allow_timeouting && millis() - previous_millis_cmd > LCD_TIMEOUT_TO_STATUS) if (allow_timeouting && _millis() - previous_millis_cmd > LCD_TIMEOUT_TO_STATUS)
return -1; return -1;
manage_heater(); manage_heater();
manage_inactivity(true); manage_inactivity(true);
@ -3669,12 +3676,12 @@ int8_t lcd_show_fullscreen_message_yes_no_and_wait_P(const char *msg, bool allow
bool yes = default_yes ? true : false; bool yes = default_yes ? true : false;
// Wait for user confirmation or a timeout. // Wait for user confirmation or a timeout.
unsigned long previous_millis_cmd = millis(); unsigned long previous_millis_cmd = _millis();
int8_t enc_dif = lcd_encoder_diff; int8_t enc_dif = lcd_encoder_diff;
lcd_consume_click(); lcd_consume_click();
KEEPALIVE_STATE(PAUSED_FOR_USER); KEEPALIVE_STATE(PAUSED_FOR_USER);
for (;;) { for (;;) {
if (allow_timeouting && millis() - previous_millis_cmd > LCD_TIMEOUT_TO_STATUS) if (allow_timeouting && _millis() - previous_millis_cmd > LCD_TIMEOUT_TO_STATUS)
return -1; return -1;
manage_heater(); manage_heater();
manage_inactivity(true); manage_inactivity(true);
@ -3823,10 +3830,10 @@ static void lcd_print_state(uint8_t state)
{ {
switch (state) { switch (state) {
case STATE_ON: case STATE_ON:
lcd_puts_P(_i("On ")); lcd_puts_P(_i(" 1"));
break; break;
case STATE_OFF: case STATE_OFF:
lcd_puts_P(_i("Off")); lcd_puts_P(_i(" 0"));
break; break;
default: default:
lcd_puts_P(_i("N/A")); lcd_puts_P(_i("N/A"));
@ -3846,8 +3853,8 @@ static void lcd_show_sensors_state()
if (mmu_enabled) { if (mmu_enabled) {
finda_state = mmu_finda; finda_state = mmu_finda;
} }
if (mmu_idler_sensor_detected) { if (ir_sensor_detected) {
idler_state = !PIN_GET(MMU_IDLER_SENSOR_PIN); idler_state = !PIN_GET(IR_SENSOR_PIN);
} }
lcd_puts_at_P(0, 0, _i("Sensor state")); lcd_puts_at_P(0, 0, _i("Sensor state"));
lcd_puts_at_P(1, 1, _i("PINDA:")); lcd_puts_at_P(1, 1, _i("PINDA:"));
@ -4076,7 +4083,7 @@ static void prusa_stat_printinfo()
SERIAL_ECHO("][TIM:"); SERIAL_ECHO("][TIM:");
if (starttime != 0) if (starttime != 0)
{ {
SERIAL_ECHO(millis() / 1000 - starttime / 1000); SERIAL_ECHO(_millis() / 1000 - starttime / 1000);
} }
else else
{ {
@ -4170,7 +4177,7 @@ void lcd_pick_babystep(){
enc_dif = lcd_encoder_diff; enc_dif = lcd_encoder_diff;
delay(100); _delay(100);
} }
} }
@ -4181,7 +4188,7 @@ void lcd_pick_babystep(){
EEPROM_read_B(EEPROM_BABYSTEP_Z0+((fsm-1)*2),&babyStepZ); EEPROM_read_B(EEPROM_BABYSTEP_Z0+((fsm-1)*2),&babyStepZ);
EEPROM_save_B(EEPROM_BABYSTEP_Z,&babyStepZ); EEPROM_save_B(EEPROM_BABYSTEP_Z,&babyStepZ);
calibration_status_store(CALIBRATION_STATUS_CALIBRATED); calibration_status_store(CALIBRATION_STATUS_CALIBRATED);
delay(500); _delay(500);
} }
}; };
@ -4247,10 +4254,10 @@ static void lcd_crash_mode_info()
{ {
lcd_update_enable(true); lcd_update_enable(true);
static uint32_t tim = 0; static uint32_t tim = 0;
if ((tim + 1000) < millis()) if ((tim + 1000) < _millis())
{ {
fputs_P(_i("\x1b[2JCrash detection can\x1b[1;0Hbe turned on only in\x1b[2;0HNormal mode"), lcdout);////MSG_CRASH_DET_ONLY_IN_NORMAL c=20 r=4 fputs_P(_i("\x1b[2JCrash detection can\x1b[1;0Hbe turned on only in\x1b[2;0HNormal mode"), lcdout);////MSG_CRASH_DET_ONLY_IN_NORMAL c=20 r=4
tim = millis(); tim = _millis();
} }
menu_back_if_clicked(); menu_back_if_clicked();
} }
@ -4259,10 +4266,10 @@ static void lcd_crash_mode_info2()
{ {
lcd_update_enable(true); lcd_update_enable(true);
static uint32_t tim = 0; static uint32_t tim = 0;
if ((tim + 1000) < millis()) if ((tim + 1000) < _millis())
{ {
fputs_P(_i("\x1b[2JWARNING:\x1b[1;0HCrash detection\x1b[2;0Hdisabled in\x1b[3;0HStealth mode"), lcdout);////MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4 fputs_P(_i("\x1b[2JWARNING:\x1b[1;0HCrash detection\x1b[2;0Hdisabled in\x1b[3;0HStealth mode"), lcdout);////MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4
tim = millis(); tim = _millis();
} }
menu_back_if_clicked(); menu_back_if_clicked();
} }
@ -4274,10 +4281,10 @@ static void lcd_filament_autoload_info()
uint8_t nlines; uint8_t nlines;
lcd_update_enable(true); lcd_update_enable(true);
static uint32_t tim = 0; static uint32_t tim = 0;
if ((tim + 1000) < millis()) if ((tim + 1000) < _millis())
{ {
lcd_display_message_fullscreen_nonBlocking_P(_i("Autoloading filament available only when filament sensor is turned on..."), nlines); ////MSG_AUTOLOADING_ONLY_IF_FSENS_ON c=20 r=4 lcd_display_message_fullscreen_nonBlocking_P(_i("Autoloading filament available only when filament sensor is turned on..."), nlines); ////MSG_AUTOLOADING_ONLY_IF_FSENS_ON c=20 r=4
tim = millis(); tim = _millis();
} }
menu_back_if_clicked(); menu_back_if_clicked();
} }
@ -4287,10 +4294,10 @@ static void lcd_fsensor_fail()
uint8_t nlines; uint8_t nlines;
lcd_update_enable(true); lcd_update_enable(true);
static uint32_t tim = 0; static uint32_t tim = 0;
if ((tim + 1000) < millis()) if ((tim + 1000) < _millis())
{ {
lcd_display_message_fullscreen_nonBlocking_P(_i("ERROR: Filament sensor is not responding, please check connection."), nlines);////MSG_FSENS_NOT_RESPONDING c=20 r=4 lcd_display_message_fullscreen_nonBlocking_P(_i("ERROR: Filament sensor is not responding, please check connection."), nlines);////MSG_FSENS_NOT_RESPONDING c=20 r=4
tim = millis(); tim = _millis();
} }
menu_back_if_clicked(); menu_back_if_clicked();
} }
@ -4511,20 +4518,20 @@ void lcd_calibrate_pinda() {
st_synchronize(); st_synchronize();
lcd_display_message_fullscreen_P(msg_e_cal_knob); lcd_display_message_fullscreen_P(msg_e_cal_knob);
msg_millis = millis(); msg_millis = _millis();
while (!LCD_CLICKED) { while (!LCD_CLICKED) {
if (multi_screen && millis() - msg_millis > 5000) { if (multi_screen && _millis() - msg_millis > 5000) {
if (msg_next_e_cal_knob == NULL) if (msg_next_e_cal_knob == NULL)
msg_next_e_cal_knob = msg_e_cal_knob; msg_next_e_cal_knob = msg_e_cal_knob;
msg_next_e_cal_knob = lcd_display_message_fullscreen_P(msg_next_e_cal_knob); msg_next_e_cal_knob = lcd_display_message_fullscreen_P(msg_next_e_cal_knob);
msg_millis = millis(); msg_millis = _millis();
} }
//manage_inactivity(true); //manage_inactivity(true);
manage_heater(); manage_heater();
if (abs(lcd_encoder_diff) >= ENCODER_PULSES_PER_STEP) { //adjusting mark by knob rotation if (abs(lcd_encoder_diff) >= ENCODER_PULSES_PER_STEP) { //adjusting mark by knob rotation
delay_keep_alive(50); delay_keep_alive(50);
//previous_millis_cmd = millis(); //previous_millis_cmd = _millis();
lcd_encoder += (lcd_encoder_diff / ENCODER_PULSES_PER_STEP); lcd_encoder += (lcd_encoder_diff / ENCODER_PULSES_PER_STEP);
lcd_encoder_diff = 0; lcd_encoder_diff = 0;
if (!planner_queue_full()) { if (!planner_queue_full()) {
@ -4635,7 +4642,7 @@ void lcd_language()
lcd_draw_update = 2; lcd_draw_update = 2;
while ((menu_menu != lcd_status_screen) && (!lang_is_selected())) while ((menu_menu != lcd_status_screen) && (!lang_is_selected()))
{ {
delay(50); _delay(50);
lcd_update(0); lcd_update(0);
manage_heater(); manage_heater();
manage_inactivity(true); manage_inactivity(true);
@ -5298,7 +5305,7 @@ void bowden_menu() {
lcd_print(">"); lcd_print(">");
enc_dif = lcd_encoder_diff; enc_dif = lcd_encoder_diff;
delay(100); _delay(100);
} }
if (lcd_clicked()) { if (lcd_clicked()) {
@ -5331,7 +5338,7 @@ void bowden_menu() {
enc_dif = lcd_encoder_diff; enc_dif = lcd_encoder_diff;
} }
} }
delay(100); _delay(100);
if (lcd_clicked()) { if (lcd_clicked()) {
EEPROM_save_B(EEPROM_BOWDEN_LENGTH + cursor_pos * 2, &bowden_length[cursor_pos]); EEPROM_save_B(EEPROM_BOWDEN_LENGTH + cursor_pos * 2, &bowden_length[cursor_pos]);
if (lcd_show_fullscreen_message_yes_no_and_wait_P(PSTR("Continue with another bowden?"))) { if (lcd_show_fullscreen_message_yes_no_and_wait_P(PSTR("Continue with another bowden?"))) {
@ -5390,7 +5397,7 @@ static char snmm_stop_print_menu() { //menu for choosing which filaments will be
lcd_set_cursor(0, cursor_pos); lcd_set_cursor(0, cursor_pos);
lcd_print(">"); lcd_print(">");
enc_dif = lcd_encoder_diff; enc_dif = lcd_encoder_diff;
delay(100); _delay(100);
} }
} }
if (lcd_clicked()) { if (lcd_clicked()) {
@ -5491,7 +5498,7 @@ uint8_t choose_menu_P(const char *header, const char *item, const char *last_ite
lcd_set_cursor(0, cursor_pos); lcd_set_cursor(0, cursor_pos);
lcd_print(">"); lcd_print(">");
delay(100); _delay(100);
if (lcd_clicked()) if (lcd_clicked())
{ {
@ -5573,7 +5580,7 @@ char reset_menu() {
lcd_set_cursor(0, cursor_pos); lcd_set_cursor(0, cursor_pos);
lcd_print(">"); lcd_print(">");
enc_dif = lcd_encoder_diff; enc_dif = lcd_encoder_diff;
delay(100); _delay(100);
} }
} }
@ -5721,7 +5728,7 @@ void unload_filament()
disable_e0(); disable_e0();
disable_e1(); disable_e1();
disable_e2(); disable_e2();
delay(100); _delay(100);
Sound_MakeSound(e_SOUND_TYPE_StandardPrompt); Sound_MakeSound(e_SOUND_TYPE_StandardPrompt);
uint8_t counterBeep = 0; uint8_t counterBeep = 0;
@ -5786,11 +5793,11 @@ static void lcd_farm_no()
lcd_set_cursor(step, 3); lcd_set_cursor(step, 3);
lcd_print("^"); lcd_print("^");
delay(100); _delay(100);
if (lcd_clicked()) if (lcd_clicked())
{ {
delay(200); _delay(200);
step++; step++;
if(step == 3) { if(step == 3) {
_ret = 1; _ret = 1;
@ -5871,7 +5878,7 @@ unsigned char lcd_choose_color() {
lcd_set_cursor(0, cursor_pos); lcd_set_cursor(0, cursor_pos);
lcd_print(">"); lcd_print(">");
enc_dif = lcd_encoder_diff; enc_dif = lcd_encoder_diff;
delay(100); _delay(100);
} }
@ -5925,7 +5932,7 @@ void lcd_confirm_print()
lcd_puts_P(_T(MSG_NO)); lcd_puts_P(_T(MSG_NO));
lcd_set_cursor(0, 1 + cursor_pos); lcd_set_cursor(0, 1 + cursor_pos);
lcd_print(">"); lcd_print(">");
delay(100); _delay(100);
_t = _t + 1; _t = _t + 1;
if (_t>100) if (_t>100)
@ -5943,7 +5950,7 @@ void lcd_confirm_print()
no_response = true; //we need confirmation by recieving PRUSA thx no_response = true; //we need confirmation by recieving PRUSA thx
important_status = 4; important_status = 4;
saved_filament_type = filament_type; saved_filament_type = filament_type;
NcTime = millis(); NcTime = _millis();
} }
if (cursor_pos == 2) if (cursor_pos == 2)
{ {
@ -5953,7 +5960,7 @@ void lcd_confirm_print()
no_response = true; //we need confirmation by recieving PRUSA thx no_response = true; //we need confirmation by recieving PRUSA thx
important_status = 5; important_status = 5;
saved_filament_type = filament_type; saved_filament_type = filament_type;
NcTime = millis(); NcTime = _millis();
} }
} }
@ -5986,7 +5993,7 @@ void lcd_resume_print()
lcd_setstatuspgm(_T(MSG_RESUMING_PRINT)); lcd_setstatuspgm(_T(MSG_RESUMING_PRINT));
lcd_reset_alert_level(); //for fan speed error lcd_reset_alert_level(); //for fan speed error
restore_print_from_ram_and_continue(0.0); restore_print_from_ram_and_continue(0.0);
pause_time += (millis() - start_pause_print); //accumulate time when print is paused for correct statistics calculation pause_time += (_millis() - start_pause_print); //accumulate time when print is paused for correct statistics calculation
refresh_cmd_timeout(); refresh_cmd_timeout();
isPrintPaused = false; isPrintPaused = false;
} }
@ -6018,7 +6025,7 @@ static void lcd_main_menu()
int tempScrool = 0; int tempScrool = 0;
if (lcd_draw_update == 0 && LCD_CLICKED == 0) if (lcd_draw_update == 0 && LCD_CLICKED == 0)
//delay(100); //_delay(100);
return; // nothing to do (so don't thrash the SD card) return; // nothing to do (so don't thrash the SD card)
uint16_t fileCnt = card.getnrfilenames(); uint16_t fileCnt = card.getnrfilenames();
@ -6135,8 +6142,8 @@ static void lcd_main_menu()
{ {
MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), fil_load_menu); MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), fil_load_menu);
MENU_ITEM_SUBMENU_P(_i("Load to nozzle"), mmu_load_to_nozzle_menu); MENU_ITEM_SUBMENU_P(_i("Load to nozzle"), mmu_load_to_nozzle_menu);
MENU_ITEM_FUNCTION_P(_T(MSG_UNLOAD_FILAMENT), extr_unload);
MENU_ITEM_SUBMENU_P(_i("Eject filament"), mmu_fil_eject_menu); MENU_ITEM_SUBMENU_P(_i("Eject filament"), mmu_fil_eject_menu);
MENU_ITEM_FUNCTION_P(_T(MSG_UNLOAD_FILAMENT), extr_unload);
} }
else else
{ {
@ -6185,7 +6192,7 @@ void stack_error() {
SET_OUTPUT(BEEPER); SET_OUTPUT(BEEPER);
if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)||(eSoundMode==e_SOUND_MODE_SILENT)) if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)||(eSoundMode==e_SOUND_MODE_SILENT))
WRITE(BEEPER, HIGH); WRITE(BEEPER, HIGH);
delay(1000); _delay(1000);
WRITE(BEEPER, LOW); WRITE(BEEPER, LOW);
lcd_display_message_fullscreen_P(_i("Error - static memory has been overwritten"));////MSG_STACK_ERROR c=20 r=4 lcd_display_message_fullscreen_P(_i("Error - static memory has been overwritten"));////MSG_STACK_ERROR c=20 r=4
//err_triggered = 1; //err_triggered = 1;
@ -6389,7 +6396,7 @@ void lcd_print_stop()
lcd_setstatuspgm(_T(MSG_PRINT_ABORTED)); lcd_setstatuspgm(_T(MSG_PRINT_ABORTED));
card.sdprinting = false; card.sdprinting = false;
card.closefile(); card.closefile();
stoptime = millis(); stoptime = _millis();
unsigned long t = (stoptime - starttime - pause_time) / 1000; //time in s unsigned long t = (stoptime - starttime - pause_time) / 1000; //time in s
pause_time = 0; pause_time = 0;
save_statistics(total_filament_used, t); save_statistics(total_filament_used, t);
@ -6444,7 +6451,7 @@ void lcd_sdcard_menu()
card.presort(); card.presort();
} }
if (lcd_draw_update == 0 && LCD_CLICKED == 0) if (lcd_draw_update == 0 && LCD_CLICKED == 0)
//delay(100); //_delay(100);
return; // nothing to do (so don't thrash the SD card) return; // nothing to do (so don't thrash the SD card)
uint16_t fileCnt = card.getnrfilenames(); uint16_t fileCnt = card.getnrfilenames();
@ -6508,7 +6515,7 @@ bool lcd_selftest()
#ifdef TMC2130 #ifdef TMC2130
FORCE_HIGH_POWER_START; FORCE_HIGH_POWER_START;
#endif // TMC2130 #endif // TMC2130
delay(2000); _delay(2000);
KEEPALIVE_STATE(IN_HANDLER); KEEPALIVE_STATE(IN_HANDLER);
_progress = lcd_selftest_screen(testScreen::extruderFan, _progress, 3, true, 2000); _progress = lcd_selftest_screen(testScreen::extruderFan, _progress, 3, true, 2000);
@ -6647,25 +6654,31 @@ bool lcd_selftest()
{ {
_progress = lcd_selftest_screen(testScreen::hotendOk, _progress, 3, true, 2000); //nozzle ok _progress = lcd_selftest_screen(testScreen::hotendOk, _progress, 3, true, 2000); //nozzle ok
} }
#ifdef FILAMENT_SENSOR #ifdef FILAMENT_SENSOR
if (_result) if (_result)
{ {
_progress = lcd_selftest_screen(testScreen::fsensor, _progress, 3, true, 2000); //check filaments sensor
if (mmu_enabled) if (mmu_enabled)
{ {
_progress = lcd_selftest_screen(testScreen::fsensor, _progress, 3, true, 2000); //check filaments sensor
_result = selftest_irsensor(); _result = selftest_irsensor();
if (_result)
{
_progress = lcd_selftest_screen(testScreen::fsensorOk, _progress, 3, true, 2000); //fil sensor OK
}
} else } else
{ {
#ifdef PAT9125
_progress = lcd_selftest_screen(testScreen::fsensor, _progress, 3, true, 2000); //check filaments sensor
_result = lcd_selftest_fsensor(); _result = lcd_selftest_fsensor();
if (_result)
{
_progress = lcd_selftest_screen(testScreen::fsensorOk, _progress, 3, true, 2000); //fil sensor OK
}
#endif //PAT9125
} }
} }
if (_result) #endif //FILAMENT_SENSOR
{
_progress = lcd_selftest_screen(testScreen::fsensorOk, _progress, 3, true, 2000); //fil sensor OK
}
#endif // FILAMENT_SENSOR
if (_result) if (_result)
{ {
_progress = lcd_selftest_screen(testScreen::allCorrect, _progress, 3, true, 5000); //all correct _progress = lcd_selftest_screen(testScreen::allCorrect, _progress, 3, true, 5000); //all correct
@ -6886,7 +6899,7 @@ static bool lcd_selfcheck_axis(int _axis, int _travel)
manage_heater(); manage_heater();
manage_inactivity(true); manage_inactivity(true);
//delay(100); //_delay(100);
(_travel_done <= _travel) ? _travel_done++ : _stepdone = true; (_travel_done <= _travel) ? _travel_done++ : _stepdone = true;
} while (!_stepdone); } while (!_stepdone);
@ -6959,7 +6972,7 @@ static bool lcd_selfcheck_pulleys(int axis)
return(false); return(false);
} }
} }
timeout_counter = millis() + 2500; timeout_counter = _millis() + 2500;
endstop_triggered = false; endstop_triggered = false;
manage_inactivity(true); manage_inactivity(true);
while (!endstop_triggered) { while (!endstop_triggered) {
@ -6981,7 +6994,7 @@ static bool lcd_selfcheck_pulleys(int axis)
current_position[axis] -= 1; current_position[axis] -= 1;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], manual_feedrate[0] / 60, active_extruder); plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], manual_feedrate[0] / 60, active_extruder);
st_synchronize(); st_synchronize();
if (millis() > timeout_counter) { if (_millis() > timeout_counter) {
lcd_selftest_error(8, (axis == 0) ? "X" : "Y", ""); lcd_selftest_error(8, (axis == 0) ? "X" : "Y", "");
return(false); return(false);
} }
@ -7004,7 +7017,7 @@ static bool lcd_selfcheck_endstops()
if ((READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING) == 1) current_position[2] += 10; if ((READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING) == 1) current_position[2] += 10;
} }
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[0] / 60, active_extruder); plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[0] / 60, active_extruder);
delay(500); _delay(500);
if (((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING) == 1) || if (((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING) == 1) ||
((READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING) == 1) || ((READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING) == 1) ||
@ -7199,11 +7212,11 @@ static void lcd_selftest_error(int _error_no, const char *_error_1, const char *
break; break;
} }
delay(1000); _delay(1000);
lcd_beeper_quick_feedback(); lcd_beeper_quick_feedback();
do { do {
delay(100); _delay(100);
manage_heater(); manage_heater();
manage_inactivity(); manage_inactivity();
} while (!lcd_clicked()); } while (!lcd_clicked());
@ -7233,7 +7246,7 @@ static bool lcd_selftest_fsensor(void)
//! * Pre-heat to PLA extrude temperature. //! * Pre-heat to PLA extrude temperature.
//! * Unload filament possibly present. //! * Unload filament possibly present.
//! * Move extruder idler same way as during filament load //! * Move extruder idler same way as during filament load
//! and sample MMU_IDLER_SENSOR_PIN. //! and sample IR_SENSOR_PIN.
//! * Check that pin doesn't go low. //! * Check that pin doesn't go low.
//! //!
//! @retval true passed //! @retval true passed
@ -7270,7 +7283,7 @@ static bool selftest_irsensor()
mmu_load_step(false); mmu_load_step(false);
while (blocks_queued()) while (blocks_queued())
{ {
if (PIN_GET(MMU_IDLER_SENSOR_PIN) == 0) return false; if (PIN_GET(IR_SENSOR_PIN) == 0) return false;
#ifdef TMC2130 #ifdef TMC2130
manage_heater(); manage_heater();
// Vojtech: Don't disable motors inside the planner! // Vojtech: Don't disable motors inside the planner!
@ -7313,10 +7326,15 @@ static bool lcd_selftest_manual_fan_check(int _fan, bool check_opposite)
if (check_opposite == true) lcd_puts_P(_T(MSG_SELFTEST_EXTRUDER_FAN)); if (check_opposite == true) lcd_puts_P(_T(MSG_SELFTEST_EXTRUDER_FAN));
else lcd_puts_P(_T(MSG_SELFTEST_COOLING_FAN)); else lcd_puts_P(_T(MSG_SELFTEST_COOLING_FAN));
SET_OUTPUT(FAN_PIN); SET_OUTPUT(FAN_PIN);
#ifdef FAN_SOFT_PWM
fanSpeedSoftPwm = 255;
#else //FAN_SOFT_PWM
analogWrite(FAN_PIN, 255); analogWrite(FAN_PIN, 255);
#endif //FAN_SOFT_PWM
break; break;
} }
delay(500); _delay(500);
lcd_set_cursor(1, 2); lcd_puts_P(_T(MSG_SELFTEST_FAN_YES)); lcd_set_cursor(1, 2); lcd_puts_P(_T(MSG_SELFTEST_FAN_YES));
lcd_set_cursor(0, 3); lcd_print(">"); lcd_set_cursor(0, 3); lcd_print(">");
@ -7338,7 +7356,11 @@ static bool lcd_selftest_manual_fan_check(int _fan, bool check_opposite)
case 1: case 1:
// object cooling fan // object cooling fan
SET_OUTPUT(FAN_PIN); SET_OUTPUT(FAN_PIN);
#ifdef FAN_SOFT_PWM
fanSpeedSoftPwm = 255;
#else //FAN_SOFT_PWM
analogWrite(FAN_PIN, 255); analogWrite(FAN_PIN, 255);
#endif //FAN_SOFT_PWM
break; break;
} }
@ -7364,15 +7386,18 @@ static bool lcd_selftest_manual_fan_check(int _fan, bool check_opposite)
manage_heater(); manage_heater();
delay(100); _delay(100);
} while (!lcd_clicked()); } while (!lcd_clicked());
KEEPALIVE_STATE(IN_HANDLER); KEEPALIVE_STATE(IN_HANDLER);
SET_OUTPUT(EXTRUDER_0_AUTO_FAN_PIN); SET_OUTPUT(EXTRUDER_0_AUTO_FAN_PIN);
WRITE(EXTRUDER_0_AUTO_FAN_PIN, 0); WRITE(EXTRUDER_0_AUTO_FAN_PIN, 0);
SET_OUTPUT(FAN_PIN); SET_OUTPUT(FAN_PIN);
#ifdef FAN_SOFT_PWM
fanSpeedSoftPwm = 0;
#else //FAN_SOFT_PWM
analogWrite(FAN_PIN, 0); analogWrite(FAN_PIN, 0);
#endif //FAN_SOFT_PWM
fanSpeed = 0; fanSpeed = 0;
manage_heater(); manage_heater();
@ -7380,20 +7405,29 @@ static bool lcd_selftest_manual_fan_check(int _fan, bool check_opposite)
} }
#ifdef FANCHECK
static bool lcd_selftest_fan_dialog(int _fan) static bool lcd_selftest_fan_dialog(int _fan)
{ {
bool _result = true; bool _result = true;
int _errno = 7; int _errno = 7;
switch (_fan) { switch (_fan) {
case 0: case 0:
fanSpeed = 0; fanSpeed = 0;
manage_heater(); //turn off fan manage_heater(); //turn off fan
setExtruderAutoFanState(EXTRUDER_0_AUTO_FAN_PIN, 1); //extruder fan setExtruderAutoFanState(EXTRUDER_0_AUTO_FAN_PIN, 1); //extruder fan
delay(2000); //delay_keep_alive would turn off extruder fan, because temerature is too low #ifdef FAN_SOFT_PWM
extruder_autofan_last_check = _millis();
fan_measuring = true;
#endif //FAN_SOFT_PWM
_delay(2000); //delay_keep_alive would turn off extruder fan, because temerature is too low
manage_heater(); //count average fan speed from 2s delay and turn off fans manage_heater(); //count average fan speed from 2s delay and turn off fans
if (!fan_speed[0]) _result = false; if (!fan_speed[0]) _result = false;
printf_P(PSTR("Test 1:\n"));
printf_P(PSTR("Print fan speed: %d \n"), fan_speed[1]);
printf_P(PSTR("Extr fan speed: %d \n"), fan_speed[0]);
//SERIAL_ECHOPGM("Extruder fan speed: "); //SERIAL_ECHOPGM("Extruder fan speed: ");
//MYSERIAL.println(fan_speed[0]); //MYSERIAL.println(fan_speed[0]);
//SERIAL_ECHOPGM("Print fan speed: "); //SERIAL_ECHOPGM("Print fan speed: ");
@ -7402,7 +7436,14 @@ static bool lcd_selftest_fan_dialog(int _fan)
case 1: case 1:
//will it work with Thotend > 50 C ? //will it work with Thotend > 50 C ?
#ifdef FAN_SOFT_PWM
fanSpeed = 255;
fanSpeedSoftPwm = 255;
extruder_autofan_last_check = _millis(); //store time when measurement starts
fan_measuring = true; //start fan measuring, rest is on manage_heater
#else //FAN_SOFT_PWM
fanSpeed = 150; //print fan fanSpeed = 150; //print fan
#endif //FAN_SOFT_PWM
for (uint8_t i = 0; i < 5; i++) { for (uint8_t i = 0; i < 5; i++) {
delay_keep_alive(1000); delay_keep_alive(1000);
lcd_set_cursor(18, 3); lcd_set_cursor(18, 3);
@ -7411,15 +7452,26 @@ static bool lcd_selftest_fan_dialog(int _fan)
lcd_set_cursor(18, 3); lcd_set_cursor(18, 3);
lcd_print("|"); lcd_print("|");
} }
#ifdef FAN_SOFT_PWM
fanSpeed = 0;
fanSpeedSoftPwm = 0;
#else //FAN_SOFT_PWM
fanSpeed = 0; fanSpeed = 0;
manage_heater(); //turn off fan manage_heater(); //turn off fan
manage_inactivity(true); //to turn off print fan manage_inactivity(true); //to turn off print fan
#endif //FAN_SOFT_PWM
printf_P(PSTR("Test 2:\n"));
printf_P(PSTR("Print fan speed: %d \n"), fan_speed[1]);
printf_P(PSTR("Extr fan speed: %d \n"), fan_speed[0]);
if (!fan_speed[1]) { if (!fan_speed[1]) {
_result = false; _errno = 6; //print fan not spinning _result = false; _errno = 6; //print fan not spinning
} }
#ifdef FAN_SOFT_PWM
else {
#else //FAN_SOFT_PWM
else if (fan_speed[1] < 34) { //fan is spinning, but measured RPM are too low for print fan, it must be left extruder fan else if (fan_speed[1] < 34) { //fan is spinning, but measured RPM are too low for print fan, it must be left extruder fan
#endif //FAN_SOFT_PWM
//check fans manually //check fans manually
_result = lcd_selftest_manual_fan_check(1, true); //turn on print fan and check that left extruder fan is not spinning _result = lcd_selftest_manual_fan_check(1, true); //turn on print fan and check that left extruder fan is not spinning
if (_result) { if (_result) {
_result = lcd_selftest_manual_fan_check(1, false); //print fan is stil turned on; check that it is spinning _result = lcd_selftest_manual_fan_check(1, false); //print fan is stil turned on; check that it is spinning
@ -7443,6 +7495,8 @@ static bool lcd_selftest_fan_dialog(int _fan)
return _result; return _result;
} }
#endif //FANCHECK
static int lcd_selftest_screen(testScreen screen, int _progress, int _progress_scale, bool _clear, int _delay) static int lcd_selftest_screen(testScreen screen, int _progress, int _progress_scale, bool _clear, int _delay)
{ {
@ -7668,10 +7722,10 @@ void lcd_printer_connected() {
} }
static void lcd_send_status() { static void lcd_send_status() {
if (farm_mode && no_response && ((millis() - NcTime) > (NC_TIME * 1000))) { if (farm_mode && no_response && ((_millis() - NcTime) > (NC_TIME * 1000))) {
//send important status messages periodicaly //send important status messages periodicaly
prusa_statistics(important_status, saved_filament_type); prusa_statistics(important_status, saved_filament_type);
NcTime = millis(); NcTime = _millis();
#ifdef FARM_CONNECT_MESSAGE #ifdef FARM_CONNECT_MESSAGE
lcd_connect_printer(); lcd_connect_printer();
#endif //FARM_CONNECT_MESSAGE #endif //FARM_CONNECT_MESSAGE
@ -7716,7 +7770,7 @@ static void lcd_connect_printer() {
void lcd_ping() { //chceck if printer is connected to monitoring when in farm mode void lcd_ping() { //chceck if printer is connected to monitoring when in farm mode
if (farm_mode) { if (farm_mode) {
bool empty = is_buffer_empty(); bool empty = is_buffer_empty();
if ((millis() - PingTime) * 0.001 > (empty ? PING_TIME : PING_TIME_LONG)) { //if commands buffer is empty use shorter time period if ((_millis() - PingTime) * 0.001 > (empty ? PING_TIME : PING_TIME_LONG)) { //if commands buffer is empty use shorter time period
//if there are comamnds in buffer, some long gcodes can delay execution of ping command //if there are comamnds in buffer, some long gcodes can delay execution of ping command
//therefore longer period is used //therefore longer period is used
printer_connected = false; printer_connected = false;
@ -7831,7 +7885,7 @@ void menu_lcd_lcdupdate_func(void)
} }
} }
#endif//CARDINSERTED #endif//CARDINSERTED
if (lcd_next_update_millis < millis()) if (lcd_next_update_millis < _millis())
{ {
if (abs(lcd_encoder_diff) >= ENCODER_PULSES_PER_STEP) if (abs(lcd_encoder_diff) >= ENCODER_PULSES_PER_STEP)
{ {
@ -7863,7 +7917,7 @@ void menu_lcd_lcdupdate_func(void)
} }
if (lcd_draw_update == 2) lcd_clear(); if (lcd_draw_update == 2) lcd_clear();
if (lcd_draw_update) lcd_draw_update--; if (lcd_draw_update) lcd_draw_update--;
lcd_next_update_millis = millis() + LCD_UPDATE_INTERVAL; lcd_next_update_millis = _millis() + LCD_UPDATE_INTERVAL;
} }
if (!SdFatUtil::test_stack_integrity()) stack_error(); if (!SdFatUtil::test_stack_integrity()) stack_error();
lcd_ping(); //check that we have received ping command if we are in farm mode lcd_ping(); //check that we have received ping command if we are in farm mode

View File

@ -296,14 +296,14 @@ bool show_upgrade_dialog_if_version_newer(const char *version_string)
lcd_putc(*c); lcd_putc(*c);
lcd_puts_at_P(0, 3, _i("Please upgrade."));////MSG_NEW_FIRMWARE_PLEASE_UPGRADE c=20 r=0 lcd_puts_at_P(0, 3, _i("Please upgrade."));////MSG_NEW_FIRMWARE_PLEASE_UPGRADE c=20 r=0
if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
tone(BEEPER, 1000); _tone(BEEPER, 1000);
delay_keep_alive(50); delay_keep_alive(50);
noTone(BEEPER); _noTone(BEEPER);
delay_keep_alive(500); delay_keep_alive(500);
if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
tone(BEEPER, 1000); _tone(BEEPER, 1000);
delay_keep_alive(50); delay_keep_alive(50);
noTone(BEEPER); _noTone(BEEPER);
lcd_wait_for_click(); lcd_wait_for_click();
lcd_update_enable(true); lcd_update_enable(true);
lcd_clear(); lcd_clear();

View File

@ -246,6 +246,9 @@ BED SETTINGS
#define MESH_MEAS_NUM_X_POINTS 3 #define MESH_MEAS_NUM_X_POINTS 3
#define MESH_MEAS_NUM_Y_POINTS 3 #define MESH_MEAS_NUM_Y_POINTS 3
// Maximum bed level correction value
#define BED_ADJUSTMENT_UM_MAX 100
#define MESH_HOME_Z_CALIB 0.2 #define MESH_HOME_Z_CALIB 0.2
#define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc. #define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc.

View File

@ -246,6 +246,9 @@ BED SETTINGS
#define MESH_MEAS_NUM_X_POINTS 3 #define MESH_MEAS_NUM_X_POINTS 3
#define MESH_MEAS_NUM_Y_POINTS 3 #define MESH_MEAS_NUM_Y_POINTS 3
// Maximum bed level correction value
#define BED_ADJUSTMENT_UM_MAX 100
#define MESH_HOME_Z_CALIB 0.2 #define MESH_HOME_Z_CALIB 0.2
#define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc. #define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc.

View File

@ -111,8 +111,9 @@
#define DEFAULT_SAFETYTIMER_TIME_MINS 30 #define DEFAULT_SAFETYTIMER_TIME_MINS 30
// Filament sensor // Filament sensor
#define PAT9125
#define FILAMENT_SENSOR #define FILAMENT_SENSOR
#define PAT9125
#define DEBUG_DCODE3 #define DEBUG_DCODE3
@ -301,6 +302,9 @@
#define MESH_MEAS_NUM_X_POINTS 3 #define MESH_MEAS_NUM_X_POINTS 3
#define MESH_MEAS_NUM_Y_POINTS 3 #define MESH_MEAS_NUM_Y_POINTS 3
// Maximum bed level correction value
#define BED_ADJUSTMENT_UM_MAX 100
#define MESH_HOME_Z_CALIB 0.2 #define MESH_HOME_Z_CALIB 0.2
#define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc. #define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc.

View File

@ -112,8 +112,9 @@
#define DEFAULT_SAFETYTIMER_TIME_MINS 30 #define DEFAULT_SAFETYTIMER_TIME_MINS 30
// Filament sensor // Filament sensor
#define PAT9125
#define FILAMENT_SENSOR #define FILAMENT_SENSOR
#define PAT9125
#define DEBUG_DCODE3 #define DEBUG_DCODE3
@ -302,6 +303,9 @@
#define MESH_MEAS_NUM_X_POINTS 3 #define MESH_MEAS_NUM_X_POINTS 3
#define MESH_MEAS_NUM_Y_POINTS 3 #define MESH_MEAS_NUM_Y_POINTS 3
// Maximum bed level correction value
#define BED_ADJUSTMENT_UM_MAX 100
#define MESH_HOME_Z_CALIB 0.2 #define MESH_HOME_Z_CALIB 0.2
#define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc. #define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc.

View File

@ -133,8 +133,8 @@
#define DEFAULT_SAFETYTIMER_TIME_MINS 30 #define DEFAULT_SAFETYTIMER_TIME_MINS 30
// Filament sensor // Filament sensor
#define PAT9125
#define FILAMENT_SENSOR #define FILAMENT_SENSOR
#define PAT9125
// Backlash - // Backlash -
//#define BACKLASH_X //#define BACKLASH_X
@ -412,6 +412,9 @@
#define MESH_MEAS_NUM_X_POINTS 3 #define MESH_MEAS_NUM_X_POINTS 3
#define MESH_MEAS_NUM_Y_POINTS 3 #define MESH_MEAS_NUM_Y_POINTS 3
// Maximum bed level correction value
#define BED_ADJUSTMENT_UM_MAX 100
#define MESH_HOME_Z_CALIB 0.2 #define MESH_HOME_Z_CALIB 0.2
#define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc. #define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc.
@ -623,7 +626,6 @@
#define MMU_REQUIRED_FW_BUILDNR 83 #define MMU_REQUIRED_FW_BUILDNR 83
#define MMU_HWRESET #define MMU_HWRESET
#define MMU_DEBUG //print communication between MMU2 and printer on serial #define MMU_DEBUG //print communication between MMU2 and printer on serial
#define MMU_IDLER_SENSOR_ATTEMPTS_NR 21 //max. number of attempts to load filament if first load failed; value for max bowden length and case when loading fails right at the beginning #define MMU_IDLER_SENSOR_ATTEMPTS_NR 21 //max. number of attempts to load filament if first load failed; value for max bowden length and case when loading fails right at the beginning
#endif //__CONFIGURATION_PRUSA_H #endif //__CONFIGURATION_PRUSA_H

View File

@ -152,9 +152,9 @@ bool xyzcal_lineXYZ_to(int16_t x, int16_t y, int16_t z, uint16_t delay_us, int8_
sm4_set_dir_bits(xyzcal_dm); sm4_set_dir_bits(xyzcal_dm);
sm4_stop_cb = check_pinda?((check_pinda<0)?check_pinda_0:check_pinda_1):0; sm4_stop_cb = check_pinda?((check_pinda<0)?check_pinda_0:check_pinda_1):0;
xyzcal_sm4_delay = delay_us; xyzcal_sm4_delay = delay_us;
// uint32_t u = micros(); // uint32_t u = _micros();
bool ret = sm4_line_xyze_ui(abs(x), abs(y), abs(z), 0)?true:false; bool ret = sm4_line_xyze_ui(abs(x), abs(y), abs(z), 0)?true:false;
// u = micros() - u; // u = _micros() - u;
return ret; return ret;
} }

View File

@ -15,6 +15,11 @@ unsigned long millis()
return now; return now;
} }
unsigned long millis2()
{
return now;
}
static void basicTimer() static void basicTimer()
{ {
LongTimer timer; LongTimer timer;

View File

@ -34,7 +34,7 @@ insert_xx()
#replace '[' and ']' in string with '\[' and '\]' #replace '[' and ']' in string with '\[' and '\]'
str=$(echo "$1" | sed "s/\[/\\\[/g;s/\]/\\\]/g") str=$(echo "$1" | sed "s/\[/\\\[/g;s/\]/\\\]/g")
# extract english texts, merge new text, grep line number # extract english texts, merge new text, grep line number
ln=$((cat lang_en_$2.txt; echo $1) | sed "/^$/d;/^#/d" | sed -n 'p;n' | sort | grep -n "$str" | sed "s/:.*//") ln=$((cat lang_en_$2.txt; echo "$1") | sed "/^$/d;/^#/d" | sed -n 'p;n' | sort | grep -n "$str" | sed "s/:.*//")
# calculate position for insertion # calculate position for insertion
ln=$((4*(ln-2)+1)) ln=$((4*(ln-2)+1))
# insert new text # insert new text

View File

@ -13,6 +13,9 @@
#MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4 #MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4
"\x1b[2JWARNING:\x1b[1;0HCrash detection\x1b[2;0Hdisabled in\x1b[3;0HStealth mode" "\x1b[2JWARNING:\x1b[1;0HCrash detection\x1b[2;0Hdisabled in\x1b[3;0HStealth mode"
#
">Cancel"
#MSG_BABYSTEPPING_Z c=20 r=0 #MSG_BABYSTEPPING_Z c=20 r=0
"Adjusting Z" "Adjusting Z"
@ -88,6 +91,9 @@
#MSG_RECOVER_PRINT c=20 r=2 #MSG_RECOVER_PRINT c=20 r=2
"Blackout occurred. Recover print?" "Blackout occurred. Recover print?"
#
"Calibrating home"
#MSG_CALIBRATE_BED c=0 r=0 #MSG_CALIBRATE_BED c=0 r=0
"Calibrate XYZ" "Calibrate XYZ"
@ -232,6 +238,9 @@
#MSG_MOVE_E c=0 r=0 #MSG_MOVE_E c=0 r=0
"Extruder" "Extruder"
#
"Fail stats MMU"
#MSG_FSENS_AUTOLOAD_ON c=17 r=1 #MSG_FSENS_AUTOLOAD_ON c=17 r=1
"F. autoload [on]" "F. autoload [on]"
@ -484,6 +493,15 @@
# #
"Measured skew" "Measured skew"
#
"MMU fails"
#
"MMU load failed "
#
"MMU load fails"
#MSG_MMU_OK_RESUMING c=20 r=4 #MSG_MMU_OK_RESUMING c=20 r=4
"MMU OK. Resuming..." "MMU OK. Resuming..."
@ -496,6 +514,9 @@
# #
"MMU needs user attention." "MMU needs user attention."
#
"MMU power fails"
#MSG_STEALTH_MODE_ON c=0 r=0 #MSG_STEALTH_MODE_ON c=0 r=0
"Mode [Stealth]" "Mode [Stealth]"
@ -529,6 +550,9 @@
#MSG_NO_CARD c=0 r=0 #MSG_NO_CARD c=0 r=0
"No SD card" "No SD card"
#
"N/A"
#MSG_NO c=0 r=0 #MSG_NO c=0 r=0
"No" "No"
@ -652,12 +676,21 @@
#MSG_PRINT_ABORTED c=20 r=0 #MSG_PRINT_ABORTED c=20 r=0
"Print aborted" "Print aborted"
#
"Preheating to load"
#
"Preheating to unload"
#MSG_SELFTEST_PRINT_FAN_SPEED c=18 r=0 #MSG_SELFTEST_PRINT_FAN_SPEED c=18 r=0
"Print fan:" "Print fan:"
#MSG_CARD_MENU c=0 r=0 #MSG_CARD_MENU c=0 r=0
"Print from SD" "Print from SD"
#
"Press the knob"
#MSG_PRINT_PAUSED c=20 r=1 #MSG_PRINT_PAUSED c=20 r=1
"Print paused" "Print paused"
@ -688,6 +721,9 @@
#MSG_REMOVE_OLD_FILAMENT c=20 r=4 #MSG_REMOVE_OLD_FILAMENT c=20 r=4
"Remove old filament and press the knob to start loading new filament." "Remove old filament and press the knob to start loading new filament."
#
"Prusa i3 MK3S OK."
# #
"Prusa i3 MK2 ready." "Prusa i3 MK2 ready."
@ -763,6 +799,12 @@
#MSG_SHOW_END_STOPS c=17 r=1 #MSG_SHOW_END_STOPS c=17 r=1
"Show end stops" "Show end stops"
#
"Sensor state"
#
"Sensors info"
# #
"Show pinda state" "Show pinda state"
@ -871,6 +913,12 @@
# #
"Total failures" "Total failures"
#
"to load filament"
#
"to unload filament"
#MSG_UNLOAD_FILAMENT c=17 r=0 #MSG_UNLOAD_FILAMENT c=17 r=0
"Unload filament" "Unload filament"

View File

@ -18,6 +18,10 @@
"\x1b[2JWARNING:\x1b[1;0HCrash detection\x1b[2;0Hdisabled in\x1b[3;0HStealth mode" "\x1b[2JWARNING:\x1b[1;0HCrash detection\x1b[2;0Hdisabled in\x1b[3;0HStealth mode"
"\x1b[2JPOZOR:\x1b[1;0HCrash detekce\x1b[2;0Hdeaktivovana ve\x1b[3;0HStealth modu" "\x1b[2JPOZOR:\x1b[1;0HCrash detekce\x1b[2;0Hdeaktivovana ve\x1b[3;0HStealth modu"
#
">Cancel"
">Zrusit"
#MSG_BABYSTEPPING_Z c=20 r=0 #MSG_BABYSTEPPING_Z c=20 r=0
"Adjusting Z" "Adjusting Z"
"Dostavovani Z" "Dostavovani Z"
@ -32,7 +36,7 @@
# #
"Ambient" "Ambient"
"\x00" "Okoli"
#MSG_PRESS c=20 r=0 #MSG_PRESS c=20 r=0
"and press the knob" "and press the knob"
@ -48,7 +52,7 @@
# #
"SpoolJoin [N/A]" "SpoolJoin [N/A]"
"SpoolJoin [N/A]" "\x00"
# MSG_AUTO_DEPLETE_OFF c=17 r=1 # MSG_AUTO_DEPLETE_OFF c=17 r=1
"SpoolJoin [off]" "SpoolJoin [off]"
@ -118,6 +122,10 @@
"Blackout occurred. Recover print?" "Blackout occurred. Recover print?"
"Detekovan vypadek proudu.Obnovit tisk?" "Detekovan vypadek proudu.Obnovit tisk?"
#
"Calibrating home"
"Kalibruji vychozi poz."
#MSG_CALIBRATE_BED c=0 r=0 #MSG_CALIBRATE_BED c=0 r=0
"Calibrate XYZ" "Calibrate XYZ"
"Kalibrace XYZ" "Kalibrace XYZ"
@ -180,7 +188,7 @@
#MSG_CRASHDETECT_NA c=0 r=0 #MSG_CRASHDETECT_NA c=0 r=0
"Crash det. [N/A]" "Crash det. [N/A]"
"Crash det. [N/A]" "\x00"
#MSG_CRASHDETECT_OFF c=0 r=0 #MSG_CRASHDETECT_OFF c=0 r=0
"Crash det. [off]" "Crash det. [off]"
@ -196,7 +204,7 @@
# #
"Crash" "Crash"
"\x00" "Naraz"
#MSG_CURRENT c=19 r=1 #MSG_CURRENT c=19 r=1
"Current" "Current"
@ -310,6 +318,10 @@
"Extruder" "Extruder"
"\x00" "\x00"
#
"Fail stats MMU"
"Selhani MMU"
#MSG_FSENS_AUTOLOAD_ON c=17 r=1 #MSG_FSENS_AUTOLOAD_ON c=17 r=1
"F. autoload [on]" "F. autoload [on]"
"F. autozav. [zap]" "F. autozav. [zap]"
@ -324,7 +336,7 @@
# #
"Fail stats" "Fail stats"
"\x00" "Selhani"
#MSG_FAN_SPEED c=14 r=0 #MSG_FAN_SPEED c=14 r=0
"Fan speed" "Fan speed"
@ -360,7 +372,7 @@
# #
"Filam. runouts" "Filam. runouts"
"\x00" "Vypadky filamentu"
#MSG_FILAMENT_CLEAN c=20 r=2 #MSG_FILAMENT_CLEAN c=20 r=2
"Filament extruding & with correct color?" "Filament extruding & with correct color?"
@ -572,11 +584,11 @@
# #
"Last print failures" "Last print failures"
"\x00" "Selhani posl. tisku"
# #
"Last print" "Last print"
"\x00" "Posledni tisk"
#MSG_SELFTEST_EXTRUDER_FAN c=20 r=0 #MSG_SELFTEST_EXTRUDER_FAN c=20 r=0
"Left hotend fan?" "Left hotend fan?"
@ -646,6 +658,18 @@
"Measured skew" "Measured skew"
"Merene zkoseni" "Merene zkoseni"
#
"MMU fails"
"Selhani MMU"
#
"MMU load failed "
"Zavedeni MMU selhalo"
#
"MMU load fails"
"MMU selhani zavadeni"
#MSG_MMU_OK_RESUMING c=20 r=4 #MSG_MMU_OK_RESUMING c=20 r=4
"MMU OK. Resuming..." "MMU OK. Resuming..."
"MMU OK. Pokracuji..." "MMU OK. Pokracuji..."
@ -662,6 +686,10 @@
"MMU needs user attention." "MMU needs user attention."
"MMU potrebuje zasah uzivatele." "MMU potrebuje zasah uzivatele."
#
"MMU power fails"
"MMU vypadky proudu"
#MSG_STEALTH_MODE_ON c=0 r=0 #MSG_STEALTH_MODE_ON c=0 r=0
"Mode [Stealth]" "Mode [Stealth]"
"Mod [tichy]" "Mod [tichy]"
@ -676,7 +704,7 @@
# #
"MMU2 connected" "MMU2 connected"
"\x00" "MMU2 pripojeno"
#MSG_SELFTEST_MOTOR c=0 r=0 #MSG_SELFTEST_MOTOR c=0 r=0
"Motor" "Motor"
@ -706,6 +734,10 @@
"No SD card" "No SD card"
"Zadna SD karta" "Zadna SD karta"
#
"N/A"
"\x00"
#MSG_NO c=0 r=0 #MSG_NO c=0 r=0
"No" "No"
"Ne" "Ne"
@ -748,7 +780,7 @@
# #
"Nozzle FAN" "Nozzle FAN"
"\x00" "Trysk. vent."
#MSG_PAUSE_PRINT c=0 r=0 #MSG_PAUSE_PRINT c=0 r=0
"Pause print" "Pause print"
@ -864,12 +896,20 @@
# #
"Power failures" "Power failures"
"\x00" "Vypadky proudu"
#MSG_PRINT_ABORTED c=20 r=0 #MSG_PRINT_ABORTED c=20 r=0
"Print aborted" "Print aborted"
"Tisk prerusen" "Tisk prerusen"
#
"Preheating to load"
"Predehrivam k zavedeni"
#
"Preheating to unload"
"Predehrivam k vyjmuti"
#MSG_SELFTEST_PRINT_FAN_SPEED c=18 r=0 #MSG_SELFTEST_PRINT_FAN_SPEED c=18 r=0
"Print fan:" "Print fan:"
"Tiskovy vent.:" "Tiskovy vent.:"
@ -878,6 +918,10 @@
"Print from SD" "Print from SD"
"Tisk z SD" "Tisk z SD"
#
"Press the knob"
"Stisknete hl. tlacitko"
#MSG_PRINT_PAUSED c=20 r=1 #MSG_PRINT_PAUSED c=20 r=1
"Print paused" "Print paused"
"Tisk pozastaven" "Tisk pozastaven"
@ -892,7 +936,7 @@
# #
"Print FAN" "Print FAN"
"\x00" "Tiskovy vent."
#WELCOME_MSG c=20 r=0 #WELCOME_MSG c=20 r=0
"Prusa i3 MK2.5 ready." "Prusa i3 MK2.5 ready."
@ -918,6 +962,10 @@
"Remove old filament and press the knob to start loading new filament." "Remove old filament and press the knob to start loading new filament."
"Vyjmete stary filament a stisknete tlacitko pro zavedeni noveho." "Vyjmete stary filament a stisknete tlacitko pro zavedeni noveho."
#
"Prusa i3 MK3S OK."
"\x00"
# #
"Prusa i3 MK2 ready." "Prusa i3 MK2 ready."
"Prusa i3 MK2 ok." "Prusa i3 MK2 ok."
@ -956,7 +1004,7 @@
#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_OFF c=19 r=1 #MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_OFF c=19 r=1
"SD card [normal]" "SD card [normal]"
"SD card [normal]" "\x00"
#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_ON c=19 r=1 #MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_ON c=19 r=1
"SD card [flshAir]" "SD card [flshAir]"
@ -1018,6 +1066,14 @@
"Show end stops" "Show end stops"
"Stav konc. spin." "Stav konc. spin."
#
"Sensor state"
"Stav senzoru"
#
"Sensors info"
"Senzor info"
# #
"Show pinda state" "Show pinda state"
"Zobrazit stav PINDA" "Zobrazit stav PINDA"
@ -1160,7 +1216,15 @@
# #
"Total failures" "Total failures"
"\x00" "Celkem selhani"
#
"to load filament"
"k zavedeni filamentu"
#
"to unload filament"
"k vyjmuti filamentu"
#MSG_UNLOAD_FILAMENT c=17 r=0 #MSG_UNLOAD_FILAMENT c=17 r=0
"Unload filament" "Unload filament"
@ -1172,7 +1236,7 @@
# #
"Total" "Total"
"\x00" "Celkem"
#MSG_USED c=19 r=1 #MSG_USED c=19 r=1
"Used during print" "Used during print"
@ -1184,7 +1248,7 @@
# #
"unknown" "unknown"
"\x00" "neznamy"
#MSG_USERWAIT c=0 r=0 #MSG_USERWAIT c=0 r=0
"Wait for user..." "Wait for user..."
@ -1320,4 +1384,4 @@
#MSG_OFF c=0 r=0 #MSG_OFF c=0 r=0
" [off]" " [off]"
" [vyp]" "\x00"

View File

@ -18,6 +18,10 @@
"\x1b[2JWARNING:\x1b[1;0HCrash detection\x1b[2;0Hdisabled in\x1b[3;0HStealth mode" "\x1b[2JWARNING:\x1b[1;0HCrash detection\x1b[2;0Hdisabled in\x1b[3;0HStealth mode"
"\x1b[2JWARNUNG:\x1b[1;0HCrash Erkennung\x1b[2;0Hdeaktiviert im\x1b[3;0HStealth Modus" "\x1b[2JWARNUNG:\x1b[1;0HCrash Erkennung\x1b[2;0Hdeaktiviert im\x1b[3;0HStealth Modus"
#
">Cancel"
">Abbruch"
#MSG_BABYSTEPPING_Z c=20 r=0 #MSG_BABYSTEPPING_Z c=20 r=0
"Adjusting Z" "Adjusting Z"
"Z wurde eingestellt" "Z wurde eingestellt"
@ -32,7 +36,7 @@
# #
"Ambient" "Ambient"
"\x00" "Raumtemp."
#MSG_PRESS c=20 r=0 #MSG_PRESS c=20 r=0
"and press the knob" "and press the knob"
@ -118,6 +122,10 @@
"Blackout occurred. Recover print?" "Blackout occurred. Recover print?"
"Stromausfall! Druck wiederherstellen?" "Stromausfall! Druck wiederherstellen?"
#
"Calibrating home"
"Kalibriere Start"
#MSG_CALIBRATE_BED c=0 r=0 #MSG_CALIBRATE_BED c=0 r=0
"Calibrate XYZ" "Calibrate XYZ"
"Kalibrierung XYZ" "Kalibrierung XYZ"
@ -310,6 +318,10 @@
"Extruder" "Extruder"
"\x00" "\x00"
#
"Fail stats MMU"
"MMU-Fehler"
#MSG_FSENS_AUTOLOAD_ON c=17 r=1 #MSG_FSENS_AUTOLOAD_ON c=17 r=1
"F. autoload [on]" "F. autoload [on]"
"F.Autoladen [an]" "F.Autoladen [an]"
@ -324,7 +336,7 @@
# #
"Fail stats" "Fail stats"
"\x00" "Fehlerstatistik"
#MSG_FAN_SPEED c=14 r=0 #MSG_FAN_SPEED c=14 r=0
"Fan speed" "Fan speed"
@ -360,7 +372,7 @@
# #
"Filam. runouts" "Filam. runouts"
"\x00" "Filam. Maengel"
#MSG_FILAMENT_CLEAN c=20 r=2 #MSG_FILAMENT_CLEAN c=20 r=2
"Filament extruding & with correct color?" "Filament extruding & with correct color?"
@ -572,11 +584,11 @@
# #
"Last print failures" "Last print failures"
"\x00" "Letzte Druckfehler"
# #
"Last print" "Last print"
"\x00" "Letzter Druck"
#MSG_SELFTEST_EXTRUDER_FAN c=20 r=0 #MSG_SELFTEST_EXTRUDER_FAN c=20 r=0
"Left hotend fan?" "Left hotend fan?"
@ -646,6 +658,18 @@
"Measured skew" "Measured skew"
"Schraeglauf" "Schraeglauf"
#
"MMU fails"
"MMU Fehler"
#
"MMU load failed "
"MMU Ladefehler"
#
"MMU load fails"
"MMU Ladefehler"
#MSG_MMU_OK_RESUMING c=20 r=4 #MSG_MMU_OK_RESUMING c=20 r=4
"MMU OK. Resuming..." "MMU OK. Resuming..."
"MMU OK. Weiterdrucken..." "MMU OK. Weiterdrucken..."
@ -662,6 +686,10 @@
"MMU needs user attention." "MMU needs user attention."
"MMU erfordert Benutzereingriff." "MMU erfordert Benutzereingriff."
#
"MMU power fails"
"MMU Netzfehler"
#MSG_STEALTH_MODE_ON c=0 r=0 #MSG_STEALTH_MODE_ON c=0 r=0
"Mode [Stealth]" "Mode [Stealth]"
"Modus [Stealth]" "Modus [Stealth]"
@ -676,7 +704,7 @@
# #
"MMU2 connected" "MMU2 connected"
"\x00" "MMU2 verbunden"
#MSG_SELFTEST_MOTOR c=0 r=0 #MSG_SELFTEST_MOTOR c=0 r=0
"Motor" "Motor"
@ -706,6 +734,10 @@
"No SD card" "No SD card"
"Keine SD Karte" "Keine SD Karte"
#
"N/A"
"N.V."
#MSG_NO c=0 r=0 #MSG_NO c=0 r=0
"No" "No"
"Nein" "Nein"
@ -748,7 +780,7 @@
# #
"Nozzle FAN" "Nozzle FAN"
"\x00" "Duesen Luefter"
#MSG_PAUSE_PRINT c=0 r=0 #MSG_PAUSE_PRINT c=0 r=0
"Pause print" "Pause print"
@ -864,12 +896,20 @@
# #
"Power failures" "Power failures"
"\x00" "Netzfehler"
#MSG_PRINT_ABORTED c=20 r=0 #MSG_PRINT_ABORTED c=20 r=0
"Print aborted" "Print aborted"
"Druck abgebrochen" "Druck abgebrochen"
#
"Preheating to load"
"Heizen zum Laden"
#
"Preheating to unload"
"Heizen zum Entladen"
#MSG_SELFTEST_PRINT_FAN_SPEED c=18 r=0 #MSG_SELFTEST_PRINT_FAN_SPEED c=18 r=0
"Print fan:" "Print fan:"
"Druckvent.:" "Druckvent.:"
@ -878,6 +918,10 @@
"Print from SD" "Print from SD"
"Drucken von SD" "Drucken von SD"
#
"Press the knob"
"Knopf druecken"
#MSG_PRINT_PAUSED c=20 r=1 #MSG_PRINT_PAUSED c=20 r=1
"Print paused" "Print paused"
"Druck pausiert" "Druck pausiert"
@ -892,7 +936,7 @@
# #
"Print FAN" "Print FAN"
"\x00" "Druckluefter"
#WELCOME_MSG c=20 r=0 #WELCOME_MSG c=20 r=0
"Prusa i3 MK2.5 ready." "Prusa i3 MK2.5 ready."
@ -918,6 +962,10 @@
"Remove old filament and press the knob to start loading new filament." "Remove old filament and press the knob to start loading new filament."
"Entfernen Sie das alte Filament und druecken Sie den Knopf, um das neue zu laden." "Entfernen Sie das alte Filament und druecken Sie den Knopf, um das neue zu laden."
#
"Prusa i3 MK3S OK."
"\x00"
# #
"Prusa i3 MK2 ready." "Prusa i3 MK2 ready."
"Prusa i3 MK2 bereit." "Prusa i3 MK2 bereit."
@ -1018,6 +1066,14 @@
"Show end stops" "Show end stops"
"Endschalter Status" "Endschalter Status"
#
"Sensor state"
"Sensorstatus"
#
"Sensors info"
"Sensoren Info"
# #
"Show pinda state" "Show pinda state"
"Pinda-Status anzeigen" "Pinda-Status anzeigen"
@ -1160,7 +1216,15 @@
# #
"Total failures" "Total failures"
"\x00" "Gesamte Fehler"
#
"to load filament"
"zum Filament laden"
#
"to unload filament"
"zum Filament entladen"
#MSG_UNLOAD_FILAMENT c=17 r=0 #MSG_UNLOAD_FILAMENT c=17 r=0
"Unload filament" "Unload filament"
@ -1172,7 +1236,7 @@
# #
"Total" "Total"
"\x00" "Gesamt"
#MSG_USED c=19 r=1 #MSG_USED c=19 r=1
"Used during print" "Used during print"
@ -1184,7 +1248,7 @@
# #
"unknown" "unknown"
"\x00" "unbekannt"
#MSG_USERWAIT c=0 r=0 #MSG_USERWAIT c=0 r=0
"Wait for user..." "Wait for user..."
@ -1320,4 +1384,4 @@
#MSG_OFF c=0 r=0 #MSG_OFF c=0 r=0
" [off]" " [off]"
" [AUS]" "\x00"

View File

@ -18,6 +18,10 @@
"\x1b[2JWARNING:\x1b[1;0HCrash detection\x1b[2;0Hdisabled in\x1b[3;0HStealth mode" "\x1b[2JWARNING:\x1b[1;0HCrash detection\x1b[2;0Hdisabled in\x1b[3;0HStealth mode"
"\x1b[2JATENCION:\x1b[1;0HDec. choque\x1b[2;0Hdesactivada en\x1b[3;0HModo silencio" "\x1b[2JATENCION:\x1b[1;0HDec. choque\x1b[2;0Hdesactivada en\x1b[3;0HModo silencio"
#
">Cancel"
">Cancelar"
#MSG_BABYSTEPPING_Z c=20 r=0 #MSG_BABYSTEPPING_Z c=20 r=0
"Adjusting Z" "Adjusting Z"
"Ajustar Z" "Ajustar Z"
@ -32,7 +36,7 @@
# #
"Ambient" "Ambient"
"\x00" "Ambiente"
#MSG_PRESS c=20 r=0 #MSG_PRESS c=20 r=0
"and press the knob" "and press the knob"
@ -44,15 +48,15 @@
#MSG_AUTO_DEPLETE_ON c=17 r=1 #MSG_AUTO_DEPLETE_ON c=17 r=1
"SpoolJoin [on]" "SpoolJoin [on]"
"SpoolJoin [on]" "\x00"
# #
"SpoolJoin [N/A]" "SpoolJoin [N/A]"
"SpoolJoin [N/A]" "\x00"
# MSG_AUTO_DEPLETE_OFF c=17 r=1 # MSG_AUTO_DEPLETE_OFF c=17 r=1
"SpoolJoin [off]" "SpoolJoin [off]"
"SpoolJoin [off]" "\x00"
#MSG_AUTO_HOME c=0 r=0 #MSG_AUTO_HOME c=0 r=0
"Auto home" "Auto home"
@ -118,6 +122,10 @@
"Blackout occurred. Recover print?" "Blackout occurred. Recover print?"
"Se fue la luz. ?Reanudar la impresion?" "Se fue la luz. ?Reanudar la impresion?"
#
"Calibrating home"
"Calibrando posicion inicial"
#MSG_CALIBRATE_BED c=0 r=0 #MSG_CALIBRATE_BED c=0 r=0
"Calibrate XYZ" "Calibrate XYZ"
"Calibrar XYZ" "Calibrar XYZ"
@ -196,7 +204,7 @@
# #
"Crash" "Crash"
"\x00" "Choque"
#MSG_CURRENT c=19 r=1 #MSG_CURRENT c=19 r=1
"Current" "Current"
@ -310,6 +318,10 @@
"Extruder" "Extruder"
"Extruir" "Extruir"
#
"Fail stats MMU"
"Estadistica de fallos MMU"
#MSG_FSENS_AUTOLOAD_ON c=17 r=1 #MSG_FSENS_AUTOLOAD_ON c=17 r=1
"F. autoload [on]" "F. autoload [on]"
"Autocarg.Fil[act]" "Autocarg.Fil[act]"
@ -324,7 +336,7 @@
# #
"Fail stats" "Fail stats"
"\x00" "Estadistica de fallos"
#MSG_FAN_SPEED c=14 r=0 #MSG_FAN_SPEED c=14 r=0
"Fan speed" "Fan speed"
@ -360,7 +372,7 @@
# #
"Filam. runouts" "Filam. runouts"
"\x00" "Filam. acabado"
#MSG_FILAMENT_CLEAN c=20 r=2 #MSG_FILAMENT_CLEAN c=20 r=2
"Filament extruding & with correct color?" "Filament extruding & with correct color?"
@ -572,11 +584,11 @@
# #
"Last print failures" "Last print failures"
"\x00" "Ultimas impresiones fallidas"
# #
"Last print" "Last print"
"\x00" "Ultima impresion"
#MSG_SELFTEST_EXTRUDER_FAN c=20 r=0 #MSG_SELFTEST_EXTRUDER_FAN c=20 r=0
"Left hotend fan?" "Left hotend fan?"
@ -646,6 +658,18 @@
"Measured skew" "Measured skew"
"Desviacion medida:" "Desviacion medida:"
#
"MMU fails"
"Fallos MMU"
#
"MMU load failed "
"Carga MMU fallida"
#
"MMU load fails"
"Carga MMU falla"
#MSG_MMU_OK_RESUMING c=20 r=4 #MSG_MMU_OK_RESUMING c=20 r=4
"MMU OK. Resuming..." "MMU OK. Resuming..."
"MMU OK. Resumiendo..." "MMU OK. Resumiendo..."
@ -662,6 +686,10 @@
"MMU needs user attention." "MMU needs user attention."
"MMU necesita atencion del usuario." "MMU necesita atencion del usuario."
#
"MMU power fails"
"Fallo de energia en MMU"
#MSG_STEALTH_MODE_ON c=0 r=0 #MSG_STEALTH_MODE_ON c=0 r=0
"Mode [Stealth]" "Mode [Stealth]"
"Modo [Silencio]" "Modo [Silencio]"
@ -676,7 +704,7 @@
# #
"MMU2 connected" "MMU2 connected"
"\x00" "MMU2 conectado"
#MSG_SELFTEST_MOTOR c=0 r=0 #MSG_SELFTEST_MOTOR c=0 r=0
"Motor" "Motor"
@ -706,6 +734,10 @@
"No SD card" "No SD card"
"No hay tarjeta SD" "No hay tarjeta SD"
#
"N/A"
"No disponible"
#MSG_NO c=0 r=0 #MSG_NO c=0 r=0
"No" "No"
"\x00" "\x00"
@ -748,7 +780,7 @@
# #
"Nozzle FAN" "Nozzle FAN"
"\x00" "Ventilador de capa"
#MSG_PAUSE_PRINT c=0 r=0 #MSG_PAUSE_PRINT c=0 r=0
"Pause print" "Pause print"
@ -864,12 +896,20 @@
# #
"Power failures" "Power failures"
"\x00" "Cortes de energia"
#MSG_PRINT_ABORTED c=20 r=0 #MSG_PRINT_ABORTED c=20 r=0
"Print aborted" "Print aborted"
"Impresion cancelada" "Impresion cancelada"
#
"Preheating to load"
"Precalentar para cargar"
#
"Preheating to unload"
"Precalentar para descargar"
#MSG_SELFTEST_PRINT_FAN_SPEED c=18 r=0 #MSG_SELFTEST_PRINT_FAN_SPEED c=18 r=0
"Print fan:" "Print fan:"
"Ventilador del fusor:" "Ventilador del fusor:"
@ -878,6 +918,10 @@
"Print from SD" "Print from SD"
"Menu tarjeta SD" "Menu tarjeta SD"
#
"Press the knob"
"Pulsa el dial"
#MSG_PRINT_PAUSED c=20 r=1 #MSG_PRINT_PAUSED c=20 r=1
"Print paused" "Print paused"
"Impresion en pausa" "Impresion en pausa"
@ -892,7 +936,7 @@
# #
"Print FAN" "Print FAN"
"\x00" "Ventilador del extrusor"
#WELCOME_MSG c=20 r=0 #WELCOME_MSG c=20 r=0
"Prusa i3 MK2.5 ready." "Prusa i3 MK2.5 ready."
@ -918,6 +962,10 @@
"Remove old filament and press the knob to start loading new filament." "Remove old filament and press the knob to start loading new filament."
"Retire el filamento viejo y presione el dial para comenzar a cargar el nuevo filamento." "Retire el filamento viejo y presione el dial para comenzar a cargar el nuevo filamento."
#
"Prusa i3 MK3S OK."
"\x00"
# #
"Prusa i3 MK2 ready." "Prusa i3 MK2 ready."
"Preparado para i3 MK2." "Preparado para i3 MK2."
@ -1018,6 +1066,14 @@
"Show end stops" "Show end stops"
"Mostrar endstops" "Mostrar endstops"
#
"Sensor state"
"Estado del sensor"
#
"Sensors info"
"Informacion sensores"
# #
"Show pinda state" "Show pinda state"
"Mostrar estado pinda" "Mostrar estado pinda"
@ -1160,7 +1216,15 @@
# #
"Total failures" "Total failures"
"\x00" "Fallos totales"
#
"to load filament"
"para cargar el filamento"
#
"to unload filament"
"para descargar el filamento"
#MSG_UNLOAD_FILAMENT c=17 r=0 #MSG_UNLOAD_FILAMENT c=17 r=0
"Unload filament" "Unload filament"
@ -1184,7 +1248,7 @@
# #
"unknown" "unknown"
"\x00" "desconocido"
#MSG_USERWAIT c=0 r=0 #MSG_USERWAIT c=0 r=0
"Wait for user..." "Wait for user..."
@ -1320,4 +1384,4 @@
#MSG_OFF c=0 r=0 #MSG_OFF c=0 r=0
" [off]" " [off]"
" [OFF]" "\x00"

View File

@ -12,11 +12,15 @@
#MSG_CRASH_DET_ONLY_IN_NORMAL c=20 r=4 #MSG_CRASH_DET_ONLY_IN_NORMAL c=20 r=4
"\x1b[2JCrash detection can\x1b[1;0Hbe turned on only in\x1b[2;0HNormal mode" "\x1b[2JCrash detection can\x1b[1;0Hbe turned on only in\x1b[2;0HNormal mode"
"\x1b[2JLa detection de crash\x1b[1;0Hpeut etre active\x1b[2;0Hqu'en mode Normal" "\x1b[2JLa detection de crash peut etre\x1b[1;0Hactive seulement\x1b[2;0Hen mode Normal"
#MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4 #MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4
"\x1b[2JWARNING:\x1b[1;0HCrash detection\x1b[2;0Hdisabled in\x1b[3;0HStealth mode" "\x1b[2JWARNING:\x1b[1;0HCrash detection\x1b[2;0Hdisabled in\x1b[3;0HStealth mode"
"\x1b[2JATTENTION :\x1b[1;0H Detection de crash\x1b[2;0H desactivee en mode\x1b[3;0H Furtif" "\x1b[2JATTENTION :\x1b[1;0HDetection de crash\x1b[2;0H desactivee en\x1b[3;0Hmode Furtif"
#
">Cancel"
">Annuler"
#MSG_BABYSTEPPING_Z c=20 r=0 #MSG_BABYSTEPPING_Z c=20 r=0
"Adjusting Z" "Adjusting Z"
@ -28,7 +32,7 @@
#MSG_WIZARD_DONE c=20 r=8 #MSG_WIZARD_DONE c=20 r=8
"All is done. Happy printing!" "All is done. Happy printing!"
"Tout est termine. Bonne impression !" "Tout est pret. Bonne impression !"
# #
"Ambient" "Ambient"
@ -40,19 +44,19 @@
#MSG_CONFIRM_CARRIAGE_AT_THE_TOP c=20 r=2 #MSG_CONFIRM_CARRIAGE_AT_THE_TOP c=20 r=2
"Are left and right Z~carriages all up?" "Are left and right Z~carriages all up?"
"Chariots Z gauche et droite tout en haut?" "Z~carriages gauche + droite tout en haut?"
#MSG_AUTO_DEPLETE_ON c=17 r=1 #MSG_AUTO_DEPLETE_ON c=17 r=1
"SpoolJoin [on]" "SpoolJoin [on]"
"SpoolJoin [on]" "\x00"
# #
"SpoolJoin [N/A]" "SpoolJoin [N/A]"
"SpoolJoin [N/A]" "\x00"
# MSG_AUTO_DEPLETE_OFF c=17 r=1 # MSG_AUTO_DEPLETE_OFF c=17 r=1
"SpoolJoin [off]" "SpoolJoin [off]"
"SpoolJoin [off]" "\x00"
#MSG_AUTO_HOME c=0 r=0 #MSG_AUTO_HOME c=0 r=0
"Auto home" "Auto home"
@ -64,11 +68,11 @@
#MSG_AUTOLOADING_ONLY_IF_FSENS_ON c=20 r=4 #MSG_AUTOLOADING_ONLY_IF_FSENS_ON c=20 r=4
"Autoloading filament available only when filament sensor is turned on..." "Autoloading filament available only when filament sensor is turned on..."
"AutoCharge du filament uniquement si le capteur de filament est active." "Chargement auto du filament uniquement si le capteur de filament est active."
#MSG_AUTOLOADING_ENABLED c=20 r=4 #MSG_AUTOLOADING_ENABLED c=20 r=4
"Autoloading filament is active, just press the knob and insert filament..." "Autoloading filament is active, just press the knob and insert filament..."
"AutoCharge actif, appuyez sur le bouton et inserez le filament." "Chargement auto du filament actif, appuyez sur le btn et inserez le fil."
#MSG_SELFTEST_AXIS_LENGTH c=0 r=0 #MSG_SELFTEST_AXIS_LENGTH c=0 r=0
"Axis length" "Axis length"
@ -84,7 +88,7 @@
#MSG_BED_DONE c=0 r=0 #MSG_BED_DONE c=0 r=0
"Bed done" "Bed done"
"Lit termine" "Plateau termine"
#MSG_BED_HEATING c=0 r=0 #MSG_BED_HEATING c=0 r=0
"Bed Heating" "Bed Heating"
@ -92,19 +96,19 @@
#MSG_BED_CORRECTION_MENU c=0 r=0 #MSG_BED_CORRECTION_MENU c=0 r=0
"Bed level correct" "Bed level correct"
"Cor courbure du lit" "Corr. niveau plateau"
#MSG_BED_LEVELING_FAILED_POINT_LOW c=20 r=4 #MSG_BED_LEVELING_FAILED_POINT_LOW c=20 r=4
"Bed leveling failed. Sensor didnt trigger. Debris on nozzle? Waiting for reset." "Bed leveling failed. Sensor didnt trigger. Debris on nozzle? Waiting for reset."
"Echec du nivellement. Capt. non declenche. Debris sur buse ? En attente d'un reset." "Echec bed leveling. Capt. non declenche. Debris sur buse ? En attente d'un reset."
#MSG_BED_LEVELING_FAILED_PROBE_DISCONNECTED c=20 r=4 #MSG_BED_LEVELING_FAILED_PROBE_DISCONNECTED c=20 r=4
"Bed leveling failed. Sensor disconnected or cable broken. Waiting for reset." "Bed leveling failed. Sensor disconnected or cable broken. Waiting for reset."
"Echec du nivellement. Capteur deconnecte ou cable casse. En attente d'un reset." "Echec du nivellement Capteur deconnecte ou cable casse. En attente d'un reset."
#MSG_BED_LEVELING_FAILED_POINT_HIGH c=20 r=4 #MSG_BED_LEVELING_FAILED_POINT_HIGH c=20 r=4
"Bed leveling failed. Sensor triggered too high. Waiting for reset." "Bed leveling failed. Sensor triggered too high. Waiting for reset."
"Echec du nivellement. Capt. declenche trop trop haut. En attente d'un reset." "Echec bed leveling. Capt. declenche trop trop haut. En attente d'un reset."
#MSG_BED c=0 r=0 #MSG_BED c=0 r=0
"Bed" "Bed"
@ -118,6 +122,10 @@
"Blackout occurred. Recover print?" "Blackout occurred. Recover print?"
"Coupure detectee. Recup. impression ?" "Coupure detectee. Recup. impression ?"
#
"Calibrating home"
"Calib. mise a 0"
#MSG_CALIBRATE_BED c=0 r=0 #MSG_CALIBRATE_BED c=0 r=0
"Calibrate XYZ" "Calibrate XYZ"
"Calibrer XYZ" "Calibrer XYZ"
@ -148,7 +156,7 @@
#MSG_MENU_CALIBRATION c=0 r=0 #MSG_MENU_CALIBRATION c=0 r=0
"Calibration" "Calibration"
"Calibration" "\x00"
# #
"Cancel" "Cancel"
@ -172,7 +180,7 @@
# #
"Copy selected language?" "Copy selected language?"
"Copier la langue selectionne?" "Copier la langue selectionne ?"
#MSG_CRASHDETECT_ON c=0 r=0 #MSG_CRASHDETECT_ON c=0 r=0
"Crash det. [on]" "Crash det. [on]"
@ -180,11 +188,11 @@
#MSG_CRASHDETECT_NA c=0 r=0 #MSG_CRASHDETECT_NA c=0 r=0
"Crash det. [N/A]" "Crash det. [N/A]"
"Detect.crash[N/A]" "Detect. crash [N/A]"
#MSG_CRASHDETECT_OFF c=0 r=0 #MSG_CRASHDETECT_OFF c=0 r=0
"Crash det. [off]" "Crash det. [off]"
"Detect.crash[off]" "Detect. crash[off]"
#MSG_CRASH_DETECTED c=20 r=1 #MSG_CRASH_DETECTED c=20 r=1
"Crash detected." "Crash detected."
@ -196,7 +204,7 @@
# #
"Crash" "Crash"
"Colision" "\x00"
#MSG_CURRENT c=19 r=1 #MSG_CURRENT c=19 r=1
"Current" "Current"
@ -212,11 +220,11 @@
#MSG_BABYSTEP_Z_NOT_SET c=20 r=12 #MSG_BABYSTEP_Z_NOT_SET c=20 r=12
"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." "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."
"La distance entre la pointe de la buse et la surface du lit n'a pas encore ete reglee. Suivez le manuel, chapitre Premiers pas, section Calibration de la premiere couche." "La distance entre la pointe de la buse et la surface du plateau n'a pas encore ete reglee. Suivez le manuel, chapitre Premiers pas, section Calibration de la premiere couche."
#MSG_WIZARD_REPEAT_V2_CAL c=20 r=7 #MSG_WIZARD_REPEAT_V2_CAL c=20 r=7
"Do you want to repeat last step to readjust distance between nozzle and heatbed?" "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
"Voulez-vous repeter la derniere etape pour reajuster la distance entre la buse et le lit chauffant ?" "Voulez-vous repeter la derniere etape pour reajuster la distance entre la buse et le plateau chauffant ?"
#MSG_EXTRUDER_CORRECTION c=9 r=0 #MSG_EXTRUDER_CORRECTION c=9 r=0
"E-correct" "E-correct"
@ -224,7 +232,7 @@
#MSG_EJECT_FILAMENT c=17 r=1 #MSG_EJECT_FILAMENT c=17 r=1
"Eject filament" "Eject filament"
"Ejecter le fil" "Ejecter le fil."
#MSG_EJECT_FILAMENT1 c=17 r=1 #MSG_EJECT_FILAMENT1 c=17 r=1
"Eject filament 1" "Eject filament 1"
@ -252,7 +260,7 @@
#MSG_EJECTING_FILAMENT c=20 r=1 #MSG_EJECTING_FILAMENT c=20 r=1
"Ejecting filament" "Ejecting filament"
"Filament en cours d'ejection" "Ejection filament"
#MSG_SELFTEST_ENDSTOP_NOTHIT c=20 r=1 #MSG_SELFTEST_ENDSTOP_NOTHIT c=20 r=1
"Endstop not hit" "Endstop not hit"
@ -272,7 +280,7 @@
#MSG_FSENS_NOT_RESPONDING c=20 r=4 #MSG_FSENS_NOT_RESPONDING c=20 r=4
"ERROR: Filament sensor is not responding, please check connection." "ERROR: Filament sensor is not responding, please check connection."
"ERREUR : Le capteur de filament ne repond pas, verifiez la connexion." "ERREUR : Le capteur de filament ne repond pas, verifiez le branchement."
#MSG_ERROR c=0 r=0 #MSG_ERROR c=0 r=0
"ERROR:" "ERROR:"
@ -310,9 +318,13 @@
"Extruder" "Extruder"
"Extrudeur" "Extrudeur"
#
"Fail stats MMU"
"Stat. echecs MMU"
#MSG_FSENS_AUTOLOAD_ON c=17 r=1 #MSG_FSENS_AUTOLOAD_ON c=17 r=1
"F. autoload [on]" "F. autoload [on]"
"AutoCharg F [on]" "ChargAuto f. [on]"
#MSG_FSENS_AUTOLOAD_NA c=17 r=1 #MSG_FSENS_AUTOLOAD_NA c=17 r=1
"F. autoload [N/A]" "F. autoload [N/A]"
@ -336,7 +348,7 @@
#MSG_FANS_CHECK_ON c=17 r=1 #MSG_FANS_CHECK_ON c=17 r=1
"Fans check [on]" "Fans check [on]"
"Verif venti [on]" "Verif ventilo[on]"
#MSG_FANS_CHECK_OFF c=17 r=1 #MSG_FANS_CHECK_OFF c=17 r=1
"Fans check [off]" "Fans check [off]"
@ -348,11 +360,11 @@
#MSG_RESPONSE_POOR c=20 r=2 #MSG_RESPONSE_POOR c=20 r=2
"Fil. sensor response is poor, disable it?" "Fil. sensor response is poor, disable it?"
"La reponse du capteur de fil. est pauvre, le desactiver ?" "Capteur de fil. non precis, desactiver ?"
#MSG_FSENSOR_NA c=0 r=0 #MSG_FSENSOR_NA c=0 r=0
"Fil. sensor [N/A]" "Fil. sensor [N/A]"
"Capteur Fil.[N/A]" "Capteur Fil. [N/A]"
#MSG_FSENSOR_OFF c=0 r=0 #MSG_FSENSOR_OFF c=0 r=0
"Fil. sensor [off]" "Fil. sensor [off]"
@ -360,7 +372,7 @@
# #
"Filam. runouts" "Filam. runouts"
"Manque de flm" "Fins de filament"
#MSG_FILAMENT_CLEAN c=20 r=2 #MSG_FILAMENT_CLEAN c=20 r=2
"Filament extruding & with correct color?" "Filament extruding & with correct color?"
@ -400,7 +412,7 @@
#MSG_WIZARD_SELFTEST c=20 r=8 #MSG_WIZARD_SELFTEST c=20 r=8
"First, I will run the selftest to check most common assembly problems." "First, I will run the selftest to check most common assembly problems."
"D'abord, je vais lancer l'autotest pour verifier les problemes d'assemblage les plus communs." "D'abord, je vais lancer le Selftest pour verifier les problemes d'assemblage les plus communs."
# #
"Fix the issue and then press button on MMU unit." "Fix the issue and then press button on MMU unit."
@ -516,7 +528,7 @@
#MSG_WIZARD_V2_CAL_2 c=20 r=12 #MSG_WIZARD_V2_CAL_2 c=20 r=12
"I will start to print line and you will gradually lower the nozzle by rotating the knob, until you reach optimal height. Check the pictures in our handbook in chapter Calibration." "I will start to print line and you will gradually lower the nozzle by rotating the knob, until you reach optimal height. Check the pictures in our handbook in chapter Calibration."
"Je vais commencer a imprimer une ligne et vous baisserez au fur et a mesure la buse en tournant le bouton jusqu'a atteindre la hauteur optimale. Regardez les photos dans notre manuel au chapitre Calibration." "Je vais commencer a imprimer une ligne et vous baisserez au fur et a mesure la buse en tournant le bouton jusqu'a atteindre la hauteur optimale. Regardez les photos dans notre manuel au chapitre Calibration"
#MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE1 c=60 r=0 #MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE1 c=60 r=0
"Improving bed calibration point" "Improving bed calibration point"
@ -528,19 +540,19 @@
#MSG_FILAMENT_LOADING_T0 c=20 r=4 #MSG_FILAMENT_LOADING_T0 c=20 r=4
"Insert filament into extruder 1. Click when done." "Insert filament into extruder 1. Click when done."
"Inserez le filament dans l'extrudeur 1. Cliquez une fois fait." "Inserez le filament dans l'extrudeur 1. Cliquez une fois pret."
#MSG_FILAMENT_LOADING_T1 c=20 r=4 #MSG_FILAMENT_LOADING_T1 c=20 r=4
"Insert filament into extruder 2. Click when done." "Insert filament into extruder 2. Click when done."
"Inserez le filament dans l'extrudeur 2. Cliquez une fois fait." "Inserez le filament dans l'extrudeur 2. Cliquez une fois pret."
#MSG_FILAMENT_LOADING_T2 c=20 r=4 #MSG_FILAMENT_LOADING_T2 c=20 r=4
"Insert filament into extruder 3. Click when done." "Insert filament into extruder 3. Click when done."
"Inserez le filament dans l'extrudeur 3. Cliquez une fois fait." "Inserez le filament dans l'extrudeur 3. Cliquez une fois pret."
#MSG_FILAMENT_LOADING_T3 c=20 r=4 #MSG_FILAMENT_LOADING_T3 c=20 r=4
"Insert filament into extruder 4. Click when done." "Insert filament into extruder 4. Click when done."
"Inserez le filament dans l'extrudeur 4. Cliquez une fois fait." "Inserez le filament dans l'extrudeur 4. Cliquez une fois pret."
# #
"Is filament 1 loaded?" "Is filament 1 loaded?"
@ -564,7 +576,7 @@
#MSG_STEEL_SHEET_CHECK c=20 r=2 #MSG_STEEL_SHEET_CHECK c=20 r=2
"Is steel sheet on heatbed?" "Is steel sheet on heatbed?"
"Feuille d'acier sur le lit chauffant ?" "Feuille d'acier sur plateau chauffant ?"
#MSG_FIND_BED_OFFSET_AND_SKEW_ITERATION c=20 r=0 #MSG_FIND_BED_OFFSET_AND_SKEW_ITERATION c=20 r=0
"Iteration " "Iteration "
@ -572,11 +584,11 @@
# #
"Last print failures" "Last print failures"
"Echecs d'impr. dern." "Echecs derniere impr"
# #
"Last print" "Last print"
"Derniere impress." "Derniere impression"
#MSG_SELFTEST_EXTRUDER_FAN c=20 r=0 #MSG_SELFTEST_EXTRUDER_FAN c=20 r=0
"Left hotend fan?" "Left hotend fan?"
@ -596,7 +608,7 @@
#MSG_BABYSTEP_Z c=0 r=0 #MSG_BABYSTEP_Z c=0 r=0
"Live adjust Z" "Live adjust Z"
"Ajuster Z en dir" "Ajuster Z en direct"
#MSG_LOAD_FILAMENT c=17 r=0 #MSG_LOAD_FILAMENT c=17 r=0
"Load filament" "Load filament"
@ -616,7 +628,7 @@
# #
"Load to nozzle" "Load to nozzle"
"Charger le fil" "Charger dans la buse"
#MSG_M117_V2_CALIBRATION c=25 r=1 #MSG_M117_V2_CALIBRATION c=25 r=1
"M117 First layer cal." "M117 First layer cal."
@ -632,7 +644,7 @@
#MSG_MESH_BED_LEVELING c=0 r=0 #MSG_MESH_BED_LEVELING c=0 r=0
"Mesh Bed Leveling" "Mesh Bed Leveling"
"Nivelage du lit" "\x00"
#MSG_MMU_OK_RESUMING_POSITION c=20 r=4 #MSG_MMU_OK_RESUMING_POSITION c=20 r=4
"MMU OK. Resuming position..." "MMU OK. Resuming position..."
@ -640,19 +652,31 @@
#MSG_MMU_OK_RESUMING_TEMPERATURE c=20 r=4 #MSG_MMU_OK_RESUMING_TEMPERATURE c=20 r=4
"MMU OK. Resuming temperature..." "MMU OK. Resuming temperature..."
"MMU OK. Reprise de la temperature ..." "MMU OK. Remontee en temperature..."
# #
"Measured skew" "Measured skew"
"Deviation mesuree" "Deviation mesuree"
#
"MMU fails"
"Echec MMU"
#
"MMU load failed "
"Echec chargement MMU"
#
"MMU load fails"
"Echecs charg. MMU"
#MSG_MMU_OK_RESUMING c=20 r=4 #MSG_MMU_OK_RESUMING c=20 r=4
"MMU OK. Resuming..." "MMU OK. Resuming..."
"MMU OK. Reprise ..." "MMU OK. Reprise ..."
#MSG_STEALTH_MODE_OFF c=0 r=0 #MSG_STEALTH_MODE_OFF c=0 r=0
"Mode [Normal]" "Mode [Normal]"
"Mode [Normal]" "\x00"
#MSG_SILENT_MODE_ON c=0 r=0 #MSG_SILENT_MODE_ON c=0 r=0
"Mode [silent]" "Mode [silent]"
@ -662,21 +686,25 @@
"MMU needs user attention." "MMU needs user attention."
"Le MMU necessite l'attention de l'utilisateur." "Le MMU necessite l'attention de l'utilisateur."
#
"MMU power fails"
"Echecs alim. MMU"
#MSG_STEALTH_MODE_ON c=0 r=0 #MSG_STEALTH_MODE_ON c=0 r=0
"Mode [Stealth]" "Mode [Stealth]"
"Mode [Furtif]" "Mode [Furtif]"
#MSG_AUTO_MODE_ON c=0 r=0 #MSG_AUTO_MODE_ON c=0 r=0
"Mode [auto power]" "Mode [auto power]"
"Mode[puissan.aut]" "Mode [puiss.auto]"
#MSG_SILENT_MODE_OFF c=0 r=0 #MSG_SILENT_MODE_OFF c=0 r=0
"Mode [high power]" "Mode [high power]"
"Mode[haute puiss]" "Mode [haute puiss]"
# #
"MMU2 connected" "MMU2 connected"
"MMU2 connectée" "MMU2 connecte"
#MSG_SELFTEST_MOTOR c=0 r=0 #MSG_SELFTEST_MOTOR c=0 r=0
"Motor" "Motor"
@ -706,6 +734,10 @@
"No SD card" "No SD card"
"Pas de carte SD" "Pas de carte SD"
#
"N/A"
"\x00"
#MSG_NO c=0 r=0 #MSG_NO c=0 r=0
"No" "No"
"Non" "Non"
@ -716,7 +748,7 @@
# #
"New firmware version available:" "New firmware version available:"
"Nouvelle version de firmware disponible :" "Nouvelle version de firmware disponible:"
# #
"No " "No "
@ -728,7 +760,7 @@
#MSG_WIZARD_V2_CAL c=20 r=8 #MSG_WIZARD_V2_CAL c=20 r=8
"Now I will calibrate distance between tip of the nozzle and heatbed surface." "Now I will calibrate distance between tip of the nozzle and heatbed surface."
"Maintenant je vais calibrer la distance entre la pointe de la buse et le surface du lit chauffant." "Maintenant je vais calibrer la distance entre la pointe de la buse et la surface du plateau chauffant."
#MSG_WIZARD_WILL_PREHEAT c=20 r=4 #MSG_WIZARD_WILL_PREHEAT c=20 r=4
"Now I will preheat nozzle for PLA." "Now I will preheat nozzle for PLA."
@ -740,7 +772,7 @@
#MSG_DEFAULT_SETTINGS_LOADED c=20 r=4 #MSG_DEFAULT_SETTINGS_LOADED c=20 r=4
"Old settings found. Default PID, Esteps etc. will be set." "Old settings found. Default PID, Esteps etc. will be set."
"Anciens reglages trouves. Le PID, les Esteps etc. par defaut seront pris." "Anciens reglages trouves. Le PID, les Esteps etc. par defaut seront regles"
# #
"Now remove the test print from steel sheet." "Now remove the test print from steel sheet."
@ -748,11 +780,11 @@
# #
"Nozzle FAN" "Nozzle FAN"
"Vent buse" "Ventilateur buse"
#MSG_PAUSE_PRINT c=0 r=0 #MSG_PAUSE_PRINT c=0 r=0
"Pause print" "Pause print"
"Pause de l'impres" "Pause de l'impr."
#MSG_PID_RUNNING c=20 r=1 #MSG_PID_RUNNING c=20 r=1
"PID cal. " "PID cal. "
@ -772,11 +804,11 @@
#MSG_PAPER c=20 r=8 #MSG_PAPER c=20 r=8
"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." "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."
"Placez une feuille de papier sous la buse pendant la calibration des 4 premiers points. Si la buse accroche le papier, eteignez de suite l'imprimante." "Placez une feuille de papier sous la buse pendant la calibration des 4 premiers points. Si la buse accroche le papier, eteignez vite l'imprimante."
#MSG_WIZARD_CLEAN_HEATBED c=20 r=8 #MSG_WIZARD_CLEAN_HEATBED c=20 r=8
"Please clean heatbed and then press the knob." "Please clean heatbed and then press the knob."
"Nettoyez le lit chauffant et appuyez sur le bouton." "Nettoyez le plateau chauffant et appuyez sur le bouton."
#MSG_CONFIRM_NOZZLE_CLEAN c=20 r=8 #MSG_CONFIRM_NOZZLE_CLEAN c=20 r=8
"Please clean the nozzle for calibration. Click when done." "Please clean the nozzle for calibration. Click when done."
@ -792,7 +824,7 @@
#MSG_WIZARD_LOAD_FILAMENT c=20 r=8 #MSG_WIZARD_LOAD_FILAMENT c=20 r=8
"Please insert PLA filament to the extruder, then press knob to load it." "Please insert PLA filament to the extruder, then press knob to load it."
"Inserez du filament PLA dans l'extrudeur, puis appuyez sur le bouton pour le charger." "Inserez du filament PLA dans l'extrudeur puis appuyez sur le bouton pour le charger."
#MSG_PLEASE_LOAD_PLA c=20 r=4 #MSG_PLEASE_LOAD_PLA c=20 r=4
"Please load PLA filament first." "Please load PLA filament first."
@ -800,11 +832,11 @@
#MSG_CHECK_IDLER c=20 r=4 #MSG_CHECK_IDLER c=20 r=4
"Please open idler and remove filament manually." "Please open idler and remove filament manually."
"Ouvrez le support de poulie et retirez le filament manuellement." "Ouvrez l'idler et retirez le filament manuellement."
#MSG_PLACE_STEEL_SHEET c=20 r=4 #MSG_PLACE_STEEL_SHEET c=20 r=4
"Please place steel sheet on heatbed." "Please place steel sheet on heatbed."
"Placez la feuille d'acier sur le lit chauffant." "Placez la feuille d'acier sur le plateau chauffant."
#MSG_PRESS_TO_UNLOAD c=20 r=4 #MSG_PRESS_TO_UNLOAD c=20 r=4
"Please press the knob to unload filament" "Please press the knob to unload filament"
@ -824,7 +856,7 @@
#MSG_REMOVE_STEEL_SHEET c=20 r=4 #MSG_REMOVE_STEEL_SHEET c=20 r=4
"Please remove steel sheet from heatbed." "Please remove steel sheet from heatbed."
"Retirez la feuille d'acier du lit chauffant" "Retirez la feuille d'acier du plateau chauffant."
#MSG_RUN_XYZ c=20 r=4 #MSG_RUN_XYZ c=20 r=4
"Please run XYZ calibration first." "Please run XYZ calibration first."
@ -864,12 +896,20 @@
# #
"Power failures" "Power failures"
"Coupures" "Coupures de courant"
#MSG_PRINT_ABORTED c=20 r=0 #MSG_PRINT_ABORTED c=20 r=0
"Print aborted" "Print aborted"
"Impression annulee" "Impression annulee"
#
"Preheating to load"
"Chauffe pour charger"
#
"Preheating to unload"
"Chauffe pr decharger"
#MSG_SELFTEST_PRINT_FAN_SPEED c=18 r=0 #MSG_SELFTEST_PRINT_FAN_SPEED c=18 r=0
"Print fan:" "Print fan:"
"Ventilo impr. :" "Ventilo impr. :"
@ -878,6 +918,10 @@
"Print from SD" "Print from SD"
"Impr depuis la SD" "Impr depuis la SD"
#
"Press the knob"
"App. sur sur bouton"
#MSG_PRINT_PAUSED c=20 r=1 #MSG_PRINT_PAUSED c=20 r=1
"Print paused" "Print paused"
"Impression en pause" "Impression en pause"
@ -888,11 +932,11 @@
#MSG_FOLLOW_CALIBRATION_FLOW c=20 r=8 #MSG_FOLLOW_CALIBRATION_FLOW c=20 r=8
"Printer has not been calibrated yet. Please follow the manual, chapter First steps, section Calibration flow." "Printer has not been calibrated yet. Please follow the manual, chapter First steps, section Calibration flow."
"L'imprimante n'a pas encore ete calibree. Suivez le manuel, chapitre Premiers pas, section Processus de calibration" "L'imprimante n'a pas encore ete calibree. Suivez le manuel, chapitre Premiers pas, section Processus de calibration."
# #
"Print FAN" "Print FAN"
"Vent extru" "Ventilo impression"
#WELCOME_MSG c=20 r=0 #WELCOME_MSG c=20 r=0
"Prusa i3 MK2.5 ready." "Prusa i3 MK2.5 ready."
@ -918,6 +962,10 @@
"Remove old filament and press the knob to start loading new filament." "Remove old filament and press the knob to start loading new filament."
"Retirez l'ancien filament puis appuyez sur le bouton pour charger le nouveau." "Retirez l'ancien filament puis appuyez sur le bouton pour charger le nouveau."
#
"Prusa i3 MK3S OK."
"\x00"
# #
"Prusa i3 MK2 ready." "Prusa i3 MK2 ready."
"Prusa i3 MK2 prete." "Prusa i3 MK2 prete."
@ -944,11 +992,11 @@
#MSG_SECOND_SERIAL_ON c=17 r=1 #MSG_SECOND_SERIAL_ON c=17 r=1
"RPi port [on]" "RPi port [on]"
"Port RPi [on]" "Port RPi [on]"
#MSG_SECOND_SERIAL_OFF c=17 r=1 #MSG_SECOND_SERIAL_OFF c=17 r=1
"RPi port [off]" "RPi port [off]"
"Port RPi [off]" "Port RPi [off]"
#MSG_WIZARD_RERUN c=20 r=7 #MSG_WIZARD_RERUN c=20 r=7
"Running Wizard will delete current calibration results and start from the beginning. Continue?" "Running Wizard will delete current calibration results and start from the beginning. Continue?"
@ -960,7 +1008,7 @@
#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_ON c=19 r=1 #MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_ON c=19 r=1
"SD card [flshAir]" "SD card [flshAir]"
"Carte SD[flshAir]" "Carte SD [flashAir]"
# #
"Right" "Right"
@ -996,7 +1044,7 @@
#MSG_FORCE_SELFTEST c=20 r=8 #MSG_FORCE_SELFTEST c=20 r=8
"Selftest will be run to calibrate accurate sensorless rehoming." "Selftest will be run to calibrate accurate sensorless rehoming."
"L'auto-test sera lance pour calibrer la remise a zero precise sans capteur." "Le Selftest sera lance pour calibrer la remise a zero precise sans capteur"
# #
"Select nozzle preheat temperature which matches your material." "Select nozzle preheat temperature which matches your material."
@ -1018,6 +1066,14 @@
"Show end stops" "Show end stops"
"Afficher butees" "Afficher butees"
#
"Sensor state"
"Etat capteur"
#
"Sensors info"
"Infos capteurs"
# #
"Show pinda state" "Show pinda state"
"Etat de la PINDA" "Etat de la PINDA"
@ -1040,7 +1096,7 @@
#MSG_SORT_ALPHA c=17 r=1 #MSG_SORT_ALPHA c=17 r=1
"Sort: [alphabet]" "Sort: [alphabet]"
"Tri : [alphabet]" "Tri : [alphabet]"
#MSG_SORTING c=20 r=1 #MSG_SORTING c=20 r=1
"Sorting files" "Sorting files"
@ -1048,7 +1104,7 @@
#MSG_SOUND_LOUD c=17 r=1 #MSG_SOUND_LOUD c=17 r=1
"Sound [loud]" "Sound [loud]"
"Son [fort]" "Son [fort]"
# #
"Slight skew" "Slight skew"
@ -1056,7 +1112,7 @@
#MSG_SOUND_MUTE c=17 r=1 #MSG_SOUND_MUTE c=17 r=1
"Sound [mute]" "Sound [mute]"
"Son [muet]" "Son [muet]"
# #
"Some problem encountered, Z-leveling enforced ..." "Some problem encountered, Z-leveling enforced ..."
@ -1064,11 +1120,11 @@
#MSG_SOUND_ONCE c=17 r=1 #MSG_SOUND_ONCE c=17 r=1
"Sound [once]" "Sound [once]"
"Son [une fois]" "Son [une fois]"
#MSG_SOUND_SILENT c=17 r=1 #MSG_SOUND_SILENT c=17 r=1
"Sound [silent]" "Sound [silent]"
"Son [silencieux]" "Son [silencieux]"
#MSG_SPEED c=0 r=0 #MSG_SPEED c=0 r=0
"Speed" "Speed"
@ -1080,7 +1136,7 @@
#MSG_TEMP_CAL_WARNING c=20 r=4 #MSG_TEMP_CAL_WARNING c=20 r=4
"Stable ambient temperature 21-26C is needed a rigid stand is required." "Stable ambient temperature 21-26C is needed a rigid stand is required."
"Une temperature ambiante stable de 21-26C et une base stable sont requis." "Une temperature ambiante stable de 21-26C et un support stable sont requis."
#MSG_STATISTICS c=0 r=0 #MSG_STATISTICS c=0 r=0
"Statistics " "Statistics "
@ -1120,11 +1176,11 @@
#MSG_TEMP_CAL_FAILED c=20 r=8 #MSG_TEMP_CAL_FAILED c=20 r=8
"Temperature calibration failed" "Temperature calibration failed"
"Echec calibration en temperature" "Echec de la calibration en temperature"
#MSG_TEMP_CALIBRATION_DONE c=20 r=12 #MSG_TEMP_CALIBRATION_DONE c=20 r=12
"Temperature calibration is finished and active. Temp. calibration can be disabled in menu Settings->Temp. cal." "Temperature calibration is finished and active. Temp. calibration can be disabled in menu Settings->Temp. cal."
"La calibration en temperature est terminee et active. La calibration en temperature peut etre desactivee dans le menu Reglages->Cal. Temp." "La calibration en temperature est terminee et activee. La calibration en temperature peut etre desactivee dans le menu Reglages-> Cal. Temp."
#MSG_TEMPERATURE c=0 r=0 #MSG_TEMPERATURE c=0 r=0
"Temperature" "Temperature"
@ -1144,7 +1200,7 @@
# #
"Total print time" "Total print time"
"Temps total" "Temps total impr."
#MSG_TUNE c=0 r=0 #MSG_TUNE c=0 r=0
"Tune" "Tune"
@ -1160,7 +1216,15 @@
# #
"Total failures" "Total failures"
"Echecs au total" "Total des echecs"
#
"to load filament"
"pour charger le fil."
#
"to unload filament"
"pour decharger fil."
#MSG_UNLOAD_FILAMENT c=17 r=0 #MSG_UNLOAD_FILAMENT c=17 r=0
"Unload filament" "Unload filament"
@ -1172,7 +1236,7 @@
# #
"Total" "Total"
"Total" "\x00"
#MSG_USED c=19 r=1 #MSG_USED c=19 r=1
"Used during print" "Used during print"
@ -1184,7 +1248,7 @@
# #
"unknown" "unknown"
"\x00" "inconnu"
#MSG_USERWAIT c=0 r=0 #MSG_USERWAIT c=0 r=0
"Wait for user..." "Wait for user..."
@ -1192,7 +1256,7 @@
#MSG_WAITING_TEMP c=20 r=3 #MSG_WAITING_TEMP c=20 r=3
"Waiting for nozzle and bed cooling" "Waiting for nozzle and bed cooling"
"Attente du refroidissement de la buse et du lit" "Attente du refroidissement des buse et plateau"
#MSG_WAITING_TEMP_PINDA c=20 r=3 #MSG_WAITING_TEMP_PINDA c=20 r=3
"Waiting for PINDA probe cooling" "Waiting for PINDA probe cooling"
@ -1240,7 +1304,7 @@
#MSG_WIZARD_QUIT c=20 r=8 #MSG_WIZARD_QUIT c=20 r=8
"You can always resume the Wizard from Calibration -> Wizard." "You can always resume the Wizard from Calibration -> Wizard."
"Vous pouvez toujours poursuivre l'assistant dans Calibration-> Assistant." "Vous pouvez toujours relancer l'assistant dans Calibration-> Assistant."
#MSG_BED_SKEW_OFFSET_DETECTION_SKEW_EXTREME c=20 r=8 #MSG_BED_SKEW_OFFSET_DETECTION_SKEW_EXTREME c=20 r=8
"XYZ calibration all right. Skew will be corrected automatically." "XYZ calibration all right. Skew will be corrected automatically."
@ -1264,11 +1328,11 @@
#MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_RIGHT_FAR c=20 r=8 #MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_RIGHT_FAR c=20 r=8
"XYZ calibration compromised. Right front calibration point not reachable." "XYZ calibration compromised. Right front calibration point not reachable."
"Calibration XYZ compromise. Le point de calibration avant droite n'est pas atteignable." "Calibration XYZ compromise. Le point de calibration avant droit n'est pas atteignable."
#MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_LEFT_FAR c=20 r=8 #MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_LEFT_FAR c=20 r=8
"XYZ calibration compromised. Left front calibration point not reachable." "XYZ calibration compromised. Left front calibration point not reachable."
"Calibration XYZ compromise. Le point de calibration avant gauche n'est pas atteignable." "Calibration XYZ compromise. Le point de calibration avant gauche n'est pas atteignable."
#MSG_LOAD_ALL c=17 r=0 #MSG_LOAD_ALL c=17 r=0
"Load all" "Load all"
@ -1280,7 +1344,7 @@
# #
"XYZ calibration failed. Bed calibration point was not found." "XYZ calibration failed. Bed calibration point was not found."
"Echec calibration XYZ. Le point de calibration du lit n'a pas ete trouve." "Echec calibration XYZ. Le point de calibration du plateau n'a pas ete trouve."
# #
"XYZ calibration failed. Front calibration points not reachable." "XYZ calibration failed. Front calibration points not reachable."
@ -1296,7 +1360,7 @@
# #
"XYZ calibration failed. Right front calibration point not reachable." "XYZ calibration failed. Right front calibration point not reachable."
"Echec calibration XYZ. Le point de calibration avant droite n'est pas atteignable." "Echec calibration XYZ. Le point de calibration avant droit n'est pas atteignable."
#MSG_LOAD_FILAMENT_3 c=17 r=0 #MSG_LOAD_FILAMENT_3 c=17 r=0
"Load filament 3" "Load filament 3"

View File

@ -18,6 +18,10 @@
"\x1b[2JWARNING:\x1b[1;0HCrash detection\x1b[2;0Hdisabled in\x1b[3;0HStealth mode" "\x1b[2JWARNING:\x1b[1;0HCrash detection\x1b[2;0Hdisabled in\x1b[3;0HStealth mode"
"\x1b[2JATTENZIONE:\x1b[1;0HRilev. impatto\x1b[2;0Hdisattivato in\x1b[3;0HModalita silenziosa" "\x1b[2JATTENZIONE:\x1b[1;0HRilev. impatto\x1b[2;0Hdisattivato in\x1b[3;0HModalita silenziosa"
#
">Cancel"
">Annulla"
#MSG_BABYSTEPPING_Z c=20 r=0 #MSG_BABYSTEPPING_Z c=20 r=0
"Adjusting Z" "Adjusting Z"
"Compensazione Z" "Compensazione Z"
@ -32,7 +36,7 @@
# #
"Ambient" "Ambient"
"\x00" "Ambiente"
#MSG_PRESS c=20 r=0 #MSG_PRESS c=20 r=0
"and press the knob" "and press the knob"
@ -44,15 +48,15 @@
#MSG_AUTO_DEPLETE_ON c=17 r=1 #MSG_AUTO_DEPLETE_ON c=17 r=1
"SpoolJoin [on]" "SpoolJoin [on]"
"SpoolJoin [on]" "\x00"
# #
"SpoolJoin [N/A]" "SpoolJoin [N/A]"
"SpoolJoin [N/A]" "\x00"
# MSG_AUTO_DEPLETE_OFF c=17 r=1 # MSG_AUTO_DEPLETE_OFF c=17 r=1
"SpoolJoin [off]" "SpoolJoin [off]"
"SpoolJoin [off]" "\x00"
#MSG_AUTO_HOME c=0 r=0 #MSG_AUTO_HOME c=0 r=0
"Auto home" "Auto home"
@ -118,6 +122,10 @@
"Blackout occurred. Recover print?" "Blackout occurred. Recover print?"
"C'e stato un Blackout. Recuperare la stampa?" "C'e stato un Blackout. Recuperare la stampa?"
#
"Calibrating home"
"Calibrazione Home"
#MSG_CALIBRATE_BED c=0 r=0 #MSG_CALIBRATE_BED c=0 r=0
"Calibrate XYZ" "Calibrate XYZ"
"Calibra XYZ" "Calibra XYZ"
@ -196,7 +204,7 @@
# #
"Crash" "Crash"
"\x00" "Impatto"
#MSG_CURRENT c=19 r=1 #MSG_CURRENT c=19 r=1
"Current" "Current"
@ -310,6 +318,10 @@
"Extruder" "Extruder"
"Estrusore" "Estrusore"
#
"Fail stats MMU"
"Statistiche fallimenti MMU"
#MSG_FSENS_AUTOLOAD_ON c=17 r=1 #MSG_FSENS_AUTOLOAD_ON c=17 r=1
"F. autoload [on]" "F. autoload [on]"
"Autocar.filam[on]" "Autocar.filam[on]"
@ -324,7 +336,7 @@
# #
"Fail stats" "Fail stats"
"\x00" "Statistiche fallimenti"
#MSG_FAN_SPEED c=14 r=0 #MSG_FAN_SPEED c=14 r=0
"Fan speed" "Fan speed"
@ -360,7 +372,7 @@
# #
"Filam. runouts" "Filam. runouts"
"\x00" "Filam. esauriti"
#MSG_FILAMENT_CLEAN c=20 r=2 #MSG_FILAMENT_CLEAN c=20 r=2
"Filament extruding & with correct color?" "Filament extruding & with correct color?"
@ -572,11 +584,11 @@
# #
"Last print failures" "Last print failures"
"\x00" "Fallimenti ultima stampa"
# #
"Last print" "Last print"
"\x00" "Ultima stampa"
#MSG_SELFTEST_EXTRUDER_FAN c=20 r=0 #MSG_SELFTEST_EXTRUDER_FAN c=20 r=0
"Left hotend fan?" "Left hotend fan?"
@ -646,6 +658,18 @@
"Measured skew" "Measured skew"
"Disassamento misurato" "Disassamento misurato"
#
"MMU fails"
"Fallimenti MMU"
#
"MMU load failed "
"Caricamento MMU fallito"
#
"MMU load fails"
"Caricamenti MMU falliti"
#MSG_MMU_OK_RESUMING c=20 r=4 #MSG_MMU_OK_RESUMING c=20 r=4
"MMU OK. Resuming..." "MMU OK. Resuming..."
"MMU OK. Riprendendo... " "MMU OK. Riprendendo... "
@ -662,6 +686,10 @@
"MMU needs user attention." "MMU needs user attention."
"Il MMU richiede attenzione dall'utente." "Il MMU richiede attenzione dall'utente."
#
"MMU power fails"
"Mancanza corrente MMU"
#MSG_STEALTH_MODE_ON c=0 r=0 #MSG_STEALTH_MODE_ON c=0 r=0
"Mode [Stealth]" "Mode [Stealth]"
"Modo [Silenziosa]" "Modo [Silenziosa]"
@ -676,7 +704,7 @@
# #
"MMU2 connected" "MMU2 connected"
"\x00" "MMU2 connessa"
#MSG_SELFTEST_MOTOR c=0 r=0 #MSG_SELFTEST_MOTOR c=0 r=0
"Motor" "Motor"
@ -706,6 +734,10 @@
"No SD card" "No SD card"
"Nessuna SD" "Nessuna SD"
#
"N/A"
"\x00"
#MSG_NO c=0 r=0 #MSG_NO c=0 r=0
"No" "No"
"\x00" "\x00"
@ -748,7 +780,7 @@
# #
"Nozzle FAN" "Nozzle FAN"
"\x00" "Ventola estrusore"
#MSG_PAUSE_PRINT c=0 r=0 #MSG_PAUSE_PRINT c=0 r=0
"Pause print" "Pause print"
@ -864,12 +896,20 @@
# #
"Power failures" "Power failures"
"\x00" "Mancanza corrente"
#MSG_PRINT_ABORTED c=20 r=0 #MSG_PRINT_ABORTED c=20 r=0
"Print aborted" "Print aborted"
"Stampa interrotta" "Stampa interrotta"
#
"Preheating to load"
"Preriscaldamento per caricare"
#
"Preheating to unload"
"Preriscaldamento per scaricare"
#MSG_SELFTEST_PRINT_FAN_SPEED c=18 r=0 #MSG_SELFTEST_PRINT_FAN_SPEED c=18 r=0
"Print fan:" "Print fan:"
"Ventola di stampa:" "Ventola di stampa:"
@ -878,6 +918,10 @@
"Print from SD" "Print from SD"
"Stampa da SD" "Stampa da SD"
#
"Press the knob"
"Premere la manopola"
#MSG_PRINT_PAUSED c=20 r=1 #MSG_PRINT_PAUSED c=20 r=1
"Print paused" "Print paused"
"Stampa in pausa" "Stampa in pausa"
@ -892,7 +936,7 @@
# #
"Print FAN" "Print FAN"
"\x00" "Ventola di stampa"
#WELCOME_MSG c=20 r=0 #WELCOME_MSG c=20 r=0
"Prusa i3 MK2.5 ready." "Prusa i3 MK2.5 ready."
@ -918,6 +962,10 @@
"Remove old filament and press the knob to start loading new filament." "Remove old filament and press the knob to start loading new filament."
"Rimuovi il filamento precedente e premi la manopola per caricare il nuovo filamento. " "Rimuovi il filamento precedente e premi la manopola per caricare il nuovo filamento. "
#
"Prusa i3 MK3S OK."
"\x00"
# #
"Prusa i3 MK2 ready." "Prusa i3 MK2 ready."
"Prusa i3 MK2 pronta." "Prusa i3 MK2 pronta."
@ -1018,6 +1066,14 @@
"Show end stops" "Show end stops"
"Stato finecorsa" "Stato finecorsa"
#
"Sensor state"
"Stato sensore"
#
"Sensors info"
"Info Sensori"
# #
"Show pinda state" "Show pinda state"
"Mostra stato pinda" "Mostra stato pinda"
@ -1160,7 +1216,15 @@
# #
"Total failures" "Total failures"
"\x00" "Totale fallimenti"
#
"to load filament"
"per caricare il filamento"
#
"to unload filament"
"per scaricare il filamento"
#MSG_UNLOAD_FILAMENT c=17 r=0 #MSG_UNLOAD_FILAMENT c=17 r=0
"Unload filament" "Unload filament"
@ -1172,7 +1236,7 @@
# #
"Total" "Total"
"\x00" "Totale"
#MSG_USED c=19 r=1 #MSG_USED c=19 r=1
"Used during print" "Used during print"
@ -1184,7 +1248,7 @@
# #
"unknown" "unknown"
"\x00" "sconosciuto"
#MSG_USERWAIT c=0 r=0 #MSG_USERWAIT c=0 r=0
"Wait for user..." "Wait for user..."
@ -1320,4 +1384,4 @@
#MSG_OFF c=0 r=0 #MSG_OFF c=0 r=0
" [off]" " [off]"
" [OFF]" "\x00"

View File

@ -18,6 +18,10 @@
"\x1b[2JWARNING:\x1b[1;0HCrash detection\x1b[2;0Hdisabled in\x1b[3;0HStealth mode" "\x1b[2JWARNING:\x1b[1;0HCrash detection\x1b[2;0Hdisabled in\x1b[3;0HStealth mode"
"\x1b[2JUWAGA:\x1b[1;0HWykrywanie zderzen\x1b[2;0Hwylaczone w\x1b[3;0Htrybie Stealth" "\x1b[2JUWAGA:\x1b[1;0HWykrywanie zderzen\x1b[2;0Hwylaczone w\x1b[3;0Htrybie Stealth"
#
">Cancel"
">Anuluj"
#MSG_BABYSTEPPING_Z c=20 r=0 #MSG_BABYSTEPPING_Z c=20 r=0
"Adjusting Z" "Adjusting Z"
"Dostrajanie Z" "Dostrajanie Z"
@ -32,7 +36,7 @@
# #
"Ambient" "Ambient"
"\x00" "Otoczenie"
#MSG_PRESS c=20 r=0 #MSG_PRESS c=20 r=0
"and press the knob" "and press the knob"
@ -118,6 +122,10 @@
"Blackout occurred. Recover print?" "Blackout occurred. Recover print?"
"Wykryto zanik napiecia. Kontynowac?" "Wykryto zanik napiecia. Kontynowac?"
#
"Calibrating home"
"Zerowanie osi"
#MSG_CALIBRATE_BED c=0 r=0 #MSG_CALIBRATE_BED c=0 r=0
"Calibrate XYZ" "Calibrate XYZ"
"Kalibracja XYZ" "Kalibracja XYZ"
@ -196,7 +204,7 @@
# #
"Crash" "Crash"
"\x00" "Zderzenie"
#MSG_CURRENT c=19 r=1 #MSG_CURRENT c=19 r=1
"Current" "Current"
@ -310,6 +318,10 @@
"Extruder" "Extruder"
"Ekstruder" "Ekstruder"
#
"Fail stats MMU"
"Bledy MMU"
#MSG_FSENS_AUTOLOAD_ON c=17 r=1 #MSG_FSENS_AUTOLOAD_ON c=17 r=1
"F. autoload [on]" "F. autoload [on]"
"Autolad. fil [wl]" "Autolad. fil [wl]"
@ -324,7 +336,7 @@
# #
"Fail stats" "Fail stats"
"\x00" "Statystyki bledow"
#MSG_FAN_SPEED c=14 r=0 #MSG_FAN_SPEED c=14 r=0
"Fan speed" "Fan speed"
@ -360,7 +372,7 @@
# #
"Filam. runouts" "Filam. runouts"
"\x00" "Konc. filamentu"
#MSG_FILAMENT_CLEAN c=20 r=2 #MSG_FILAMENT_CLEAN c=20 r=2
"Filament extruding & with correct color?" "Filament extruding & with correct color?"
@ -572,11 +584,11 @@
# #
"Last print failures" "Last print failures"
"\x00" "Ostatnie bledy druku"
# #
"Last print" "Last print"
"\x00" "Ost. wydruk"
#MSG_SELFTEST_EXTRUDER_FAN c=20 r=0 #MSG_SELFTEST_EXTRUDER_FAN c=20 r=0
"Left hotend fan?" "Left hotend fan?"
@ -646,6 +658,18 @@
"Measured skew" "Measured skew"
"Zmierzony skos" "Zmierzony skos"
#
"MMU fails"
"Bledy MMU"
#
"MMU load failed "
"Blad ladowania MMU"
#
"MMU load fails"
"Bledy ladow. MMU"
#MSG_MMU_OK_RESUMING c=20 r=4 #MSG_MMU_OK_RESUMING c=20 r=4
"MMU OK. Resuming..." "MMU OK. Resuming..."
"MMU OK. Wznawianie..." "MMU OK. Wznawianie..."
@ -662,6 +686,10 @@
"MMU needs user attention." "MMU needs user attention."
"MMU wymaga uwagi uzytkownika." "MMU wymaga uwagi uzytkownika."
#
"MMU power fails"
"Zaniki zasil. MMU"
#MSG_STEALTH_MODE_ON c=0 r=0 #MSG_STEALTH_MODE_ON c=0 r=0
"Mode [Stealth]" "Mode [Stealth]"
"Tryb [Stealth]" "Tryb [Stealth]"
@ -676,7 +704,7 @@
# #
"MMU2 connected" "MMU2 connected"
"\x00" "MMU podlaczone"
#MSG_SELFTEST_MOTOR c=0 r=0 #MSG_SELFTEST_MOTOR c=0 r=0
"Motor" "Motor"
@ -706,6 +734,10 @@
"No SD card" "No SD card"
"Brak karty SD" "Brak karty SD"
#
"N/A"
"N/D"
#MSG_NO c=0 r=0 #MSG_NO c=0 r=0
"No" "No"
"Nie" "Nie"
@ -748,7 +780,7 @@
# #
"Nozzle FAN" "Nozzle FAN"
"\x00" "Went. hotendu"
#MSG_PAUSE_PRINT c=0 r=0 #MSG_PAUSE_PRINT c=0 r=0
"Pause print" "Pause print"
@ -864,12 +896,20 @@
# #
"Power failures" "Power failures"
"\x00" "Zaniki zasilania"
#MSG_PRINT_ABORTED c=20 r=0 #MSG_PRINT_ABORTED c=20 r=0
"Print aborted" "Print aborted"
"Druk przerwany" "Druk przerwany"
#
"Preheating to load"
"Nagrzew. do ladowania"
#
"Preheating to unload"
"Nagrzew. do rozlad."
#MSG_SELFTEST_PRINT_FAN_SPEED c=18 r=0 #MSG_SELFTEST_PRINT_FAN_SPEED c=18 r=0
"Print fan:" "Print fan:"
"Went. wydruku:" "Went. wydruku:"
@ -878,6 +918,10 @@
"Print from SD" "Print from SD"
"Druk z karty SD" "Druk z karty SD"
#
"Press the knob"
"Wcisnij pokretlo"
#MSG_PRINT_PAUSED c=20 r=1 #MSG_PRINT_PAUSED c=20 r=1
"Print paused" "Print paused"
"Druk wstrzymany" "Druk wstrzymany"
@ -892,7 +936,7 @@
# #
"Print FAN" "Print FAN"
"\x00" "Went. wydruku"
#WELCOME_MSG c=20 r=0 #WELCOME_MSG c=20 r=0
"Prusa i3 MK2.5 ready." "Prusa i3 MK2.5 ready."
@ -918,6 +962,10 @@
"Remove old filament and press the knob to start loading new filament." "Remove old filament and press the knob to start loading new filament."
"Wyciagnij poprzedni filament i nacisnij pokretlo aby zaladowac nowy." "Wyciagnij poprzedni filament i nacisnij pokretlo aby zaladowac nowy."
#
"Prusa i3 MK3S OK."
"Prusa i3 MK3S OK"
# #
"Prusa i3 MK2 ready." "Prusa i3 MK2 ready."
"Prusa i3 MK2 gotowa" "Prusa i3 MK2 gotowa"
@ -1018,6 +1066,14 @@
"Show end stops" "Show end stops"
"Pokaz krancowki" "Pokaz krancowki"
#
"Sensor state"
"Stan czujnikow"
#
"Sensors info"
"Info o czujnikach"
# #
"Show pinda state" "Show pinda state"
"Stan sondy PINDA" "Stan sondy PINDA"
@ -1160,7 +1216,15 @@
# #
"Total failures" "Total failures"
"\x00" "Suma bledow"
#
"to load filament"
"aby zaladow. fil."
#
"to unload filament"
"aby rozlad. filament"
#MSG_UNLOAD_FILAMENT c=17 r=0 #MSG_UNLOAD_FILAMENT c=17 r=0
"Unload filament" "Unload filament"
@ -1172,7 +1236,7 @@
# #
"Total" "Total"
"\x00" "Suma"
#MSG_USED c=19 r=1 #MSG_USED c=19 r=1
"Used during print" "Used during print"
@ -1184,7 +1248,7 @@
# #
"unknown" "unknown"
"\x00" "nieznane"
#MSG_USERWAIT c=0 r=0 #MSG_USERWAIT c=0 r=0
"Wait for user..." "Wait for user..."
@ -1320,4 +1384,4 @@
#MSG_OFF c=0 r=0 #MSG_OFF c=0 r=0
" [off]" " [off]"
" [wyl]" "\x00"

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