Compare commits

...

24 Commits

Author SHA1 Message Date
3d-gussner fc614a6e76
Merge pull request #3635 from 3d-gussner/MK3_3.12
Version changed (3.12.0-BETA1 build 5536)
2022-09-29 20:04:21 +02:00
3d-gussner 350b2a6993 Version changed (3.12.0-BETA1 build 5536) 2022-09-29 19:57:46 +02:00
3d-gussner 784f1f77b6
Merge pull request #3634 from 3d-gussner/MK3_3.12
Cherry-pick from PR3633
2022-09-29 18:17:51 +02:00
3d-gussner 04396243a9 Update Firmware.pot and Firmware_xx.po files 2022-09-29 17:52:23 +02:00
3d-gussner 6c6f6abfc0 Rename EN_ONLY to EN_FARM
remove DEBUG/DEVEL/ALPHA/BETA lcd warning

Fix cherry-pick issues
2022-09-29 17:47:05 +02:00
3d-gussner ff85e8e100 BETA firmware message only in English
Rephrase BETA firmware message to fit on two screens
ALPHA message same as DEVEL
Fix ALPHA DEVEL message

Fix cherry-pick and use MSG_AUTODEPLETE
2022-09-29 17:25:41 +02:00
Yuri D'Elia aa721cafd9 lcd_print_pad: do not overflow len when truncating the string 2022-09-26 12:18:47 +02:00
Yuri D'Elia 6bee4fec8d Remove unneeded lcd_finishstatus() 2022-09-23 14:55:03 +02:00
Yuri D'Elia b710ca0e58 Improve warning behavior during thermal anomaly
The current code forces any warning to return the user to the status
screen in order to show the message.

Thermal anomaly warnings can repeat at very short intervals, making menu
navigation (to pause/tune the print) impossible.

We now check if the message to be displayed is the same and only force a
kickback for new messages.

This partially reverts https://github.com/prusa3d/Prusa-Firmware/pull/3600
since we need the string to be null terminated for ease of comparison.

We pad the status line at display time instead using the new
lcd_print_pad() function which achieves the same effect.
2022-09-23 14:55:03 +02:00
Yuri D'Elia d4aeddf90d
Merge pull request #3619 from wavexx/fixes_round2
Do not hang during startup
2022-09-21 16:27:34 +02:00
Yuri D'Elia bb0489cba6 Do not hang during startup
In ultralcd_init() do not use lcd_setstatuspgm() to initialize the
welcome message.

The internal call to lcd_finishstatus() requires the serial to be
already available. Split the function into lcd_padstatus() to pre-pad
the string and save some space.
2022-09-21 16:19:08 +02:00
Yuri D'Elia 081501f832
Merge pull request #3617 from wavexx/merge_mk3_fixes
Merge important bugfixes for the next 3.12 release
2022-09-21 15:18:13 +02:00
Alex Voinea 7bd9e5e06e Move strings to progmem 2022-09-21 15:09:27 +02:00
Yuri D'Elia 140961290d Do not reset line on serial commands without N
Fix regression introduced in fc10ca3146.

Accept incoming serial commands without line numbers (assumed to be
injected by the host), but do not reset the last line count when doing
so.
2022-09-21 15:05:21 +02:00
Yuri D'Elia 2bd4aef23e Temperature model: update R0 estimate
Update the default R0 estimate thanks to a larger dataset.
This improves the error margin during self-check.
2022-09-21 15:05:05 +02:00
Guðni Már Gilbert 9bff10add5 Don't inline the function
Change in memory:
Flash: -44 bytes
SRAM: 0 bytes
2022-09-21 15:04:40 +02:00
Guðni Már Gilbert b1bee597aa Remove atomic_update parameter
Change in memory:
Flash: +24 bytes
SRAM: -0 byte
2022-09-21 15:04:40 +02:00
Guðni Már Gilbert b2530eeb13 Optimisation: Remove duplicated code in cmdqueue_could_enqueue_back()
Code is 28 lines shorter :)

Change in memory:
Flash: -42 bytes
SRAM: 0 bytes
2022-09-21 15:04:40 +02:00
Guðni Már Gilbert 33495d7516 Remove redundant for-loop
Now that lcd_status_message is now initialised correctly at boot-up,
this for-loop is no longer required. Now lcd_status_message is
only set in lcd_updatestatus() which always calls lcd_finishstatus()

lcd_finishstatus() makes sure the message does not exceed 20 characters

Saves 34 bytes of flash
2022-09-21 15:02:26 +02:00
Guðni Már Gilbert 540ce31082 Don't initialise lcd status message in definition
static variables are automatically zero initialised. Now that the
status line message is initialised in ultralcd_init(), we don't
need to set the variable in global scope.

Saves 22 bytes of flash and 1 byte of SRAM
2022-09-21 15:02:26 +02:00
Guðni Már Gilbert 336c41ffe3 Initialise status line message in setup()
Fixes #3581
2022-09-21 15:02:26 +02:00
Alex Voinea 9225c5e28b Show firmware version on splash screen 2022-09-21 14:59:36 +02:00
Yuri D'Elia 8cfd48cb08
Merge pull request #3608 from wavexx/set_312_version
Update FW version for 3.12 branch
2022-09-21 14:37:02 +02:00
Yuri D'Elia 178b3e1db4 Update current FW version 2022-09-19 18:11:19 +02:00
34 changed files with 8596 additions and 8872 deletions

View File

@ -11,11 +11,11 @@ before_install:
script:
- cp Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h Firmware/Configuration_prusa.h
- bash -x build.sh || { echo "1_75mm_MK3S-EINSy10a-E3Dv6full variant failed" && false; }
- bash -x build.sh EN_ONLY || { echo "1_75mm_MK3S-EINSy10a-E3Dv6full EN_ONLY failed" && false; }
- bash -x build.sh EN_FARM || { echo "1_75mm_MK3S-EINSy10a-E3Dv6full EN_FARM failed" && false; }
- rm Firmware/Configuration_prusa.h
- cp Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h Firmware/Configuration_prusa.h
- bash -x build.sh || { echo "1_75mm_MK3-EINSy10a-E3Dv6full variant failed" && false; }
- bash -x build.sh EN_ONLY || { echo "1_75mm_MK3-EINSy10a-E3Dv6full EN_ONLY failed" && false; }
- bash -x build.sh EN_FARM || { echo "1_75mm_MK3-EINSy10a-E3Dv6full EN_FARM failed" && false; }
- rm Firmware/Configuration_prusa.h
- cp Firmware/variants/1_75mm_MK25S-RAMBo13a-E3Dv6full.h Firmware/Configuration_prusa.h
- bash -x build.sh || { echo "1_75mm_MK25S-RAMBo13a-E3Dv6full variant failed" && false; }

View File

@ -17,17 +17,17 @@ extern PGM_P sPrinterName;
// Firmware version
#define FW_MAJOR 3
#define FW_MINOR 11
#define FW_REVISION 1
//#define FW_FLAVOR RC //uncomment if DEBUG, DEVEL, ALPHA, BETA or RC
//#define FW_FLAVERSION 1 //uncomment if FW_FLAVOR is defined and versioning is needed.
#define FW_MINOR 12
#define FW_REVISION 0
#define FW_FLAVOR BETA //uncomment if DEBUG, DEVEL, ALPHA, BETA or RC
#define FW_FLAVERSION 1 //uncomment if FW_FLAVOR is defined and versioning is needed.
#ifndef FW_FLAVOR
#define FW_VERSION STR(FW_MAJOR) "." STR(FW_MINOR) "." STR(FW_REVISION)
#else
#define FW_VERSION STR(FW_MAJOR) "." STR(FW_MINOR) "." STR(FW_REVISION) "-" STR(FW_FLAVOR) "" STR(FW_FLAVERSION)
#endif
#define FW_COMMIT_NR 4987
#define FW_COMMIT_NR 5536
// FW_VERSION_UNKNOWN means this is an unofficial build.
// The firmware should only be checked into github with this symbol.

View File

@ -385,7 +385,9 @@ void bed_analysis(float x_dimension, float y_dimension, int x_points_num, int y_
void bed_check(float x_dimension, float y_dimension, int x_points_num, int y_points_num, float shift_x, float shift_y);
#endif //HEATBED_ANALYSIS
float temp_comp_interpolation(float temperature);
#if 0
void show_fw_version_warnings();
#endif
uint8_t check_printer_version();
#ifdef PINDA_THERMISTOR

View File

@ -798,7 +798,7 @@ int uart_putchar(char c, FILE *)
void lcd_splash()
{
lcd_clear(); // clears display and homes screen
lcd_puts_P(PSTR("\n Original Prusa i3\n Prusa Research"));
lcd_printf_P(PSTR("\n Original Prusa i3\n Prusa Research\n%20.20S"), PSTR(FW_VERSION));
}
@ -839,30 +839,31 @@ void factory_reset()
}
KEEPALIVE_STATE(IN_HANDLER);
}
#if 0
void show_fw_version_warnings() {
if (FW_DEV_VERSION == FW_VERSION_GOLD || FW_DEV_VERSION == FW_VERSION_RC) return;
switch (FW_DEV_VERSION) {
case(FW_VERSION_ALPHA): lcd_show_fullscreen_message_and_wait_P(_i("You are using firmware alpha version. This is development version. Using this version is not recommended and may cause printer damage.")); break;////MSG_FW_VERSION_ALPHA c=20 r=8
case(FW_VERSION_BETA): lcd_show_fullscreen_message_and_wait_P(_i("You are using firmware beta version. This is development version. Using this version is not recommended and may cause printer damage.")); break;////MSG_FW_VERSION_BETA c=20 r=8
case(FW_VERSION_BETA): lcd_show_fullscreen_message_and_wait_P(MSG_FW_VERSION_BETA); break;
case(FW_VERSION_ALPHA):
case(FW_VERSION_DEVEL):
case(FW_VERSION_DEBUG):
lcd_update_enable(false);
lcd_clear();
#if FW_DEV_VERSION == FW_VERSION_DEVEL
#if (FW_DEV_VERSION == FW_VERSION_DEVEL || FW_DEV_VERSION == FW_VERSION_ALPHA)
lcd_puts_at_P(0, 0, PSTR("Development build !!"));
#else
lcd_puts_at_P(0, 0, PSTR("Debbugging build !!!"));
#endif
lcd_puts_at_P(0, 1, PSTR("May destroy printer!"));
lcd_puts_at_P(0, 2, PSTR("ver ")); lcd_puts_P(PSTR(FW_VERSION_FULL));
lcd_puts_at_P(0, 3, PSTR(FW_REPOSITORY));
lcd_puts_at_P(0, 2, PSTR("FW")); lcd_puts_P(PSTR(FW_VERSION_FULL));
lcd_puts_at_P(0, 3, PSTR("Repo: ")); lcd_puts_P(PSTR(FW_REPOSITORY));
lcd_wait_for_click();
break;
// default: lcd_show_fullscreen_message_and_wait_P(_i("WARNING: This is an unofficial, unsupported build. Use at your own risk!")); break;////MSG_FW_VERSION_UNKNOWN c=20 r=8
}
lcd_update_enable(true);
}
#endif
//! @brief try to check if firmware is on right type of printer
static void check_if_fw_is_on_right_printer(){
@ -1506,7 +1507,9 @@ void setup()
if (!farm_mode) {
check_if_fw_is_on_right_printer();
#if 0
show_fw_version_warnings();
#endif
}
switch (hw_changed) {
@ -1612,11 +1615,11 @@ void setup()
manage_heater(); // Update temperatures
#ifdef DEBUG_UVLO_AUTOMATIC_RECOVER
printf_P(_N("Power panic detected!\nCurrent bed temp:%d\nSaved bed temp:%d\n"), (int)degBed(), eeprom_read_byte((uint8_t*)EEPROM_UVLO_TARGET_BED));
#endif
#endif
if ( degBed() > ( (float)eeprom_read_byte((uint8_t*)EEPROM_UVLO_TARGET_BED) - AUTOMATIC_UVLO_BED_TEMP_OFFSET) ){
#ifdef DEBUG_UVLO_AUTOMATIC_RECOVER
puts_P(_N("Automatic recovery!"));
#endif
#endif
recover_print(1);
}
else{
@ -4285,11 +4288,11 @@ void process_commands()
#endif //PRUSA_SN_SUPPORT
else if(code_seen_P(PSTR("Fir"))){ // PRUSA Fir
SERIAL_PROTOCOLLN(FW_VERSION_FULL);
SERIAL_PROTOCOLLNPGM(FW_VERSION_FULL);
} else if(code_seen_P(PSTR("Rev"))){ // PRUSA Rev
SERIAL_PROTOCOLLN(FILAMENT_SIZE "-" ELECTRONICS "-" NOZZLE_TYPE );
SERIAL_PROTOCOLLNPGM(FILAMENT_SIZE "-" ELECTRONICS "-" NOZZLE_TYPE );
} else if(code_seen_P(PSTR("Lang"))) { // PRUSA Lang
lang_reset();
@ -4542,7 +4545,7 @@ eeprom_update_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM,0xFFFF);
retract(false,retracted_swap[active_extruder]);
#else
retract(false);
#endif
#endif
break;
#endif //FWRETRACT

View File

@ -1,3 +1,4 @@
#include <util/atomic.h>
#include "cmdqueue.h"
#include "cardreader.h"
#include "ultralcd.h"
@ -26,10 +27,7 @@ bool comment_mode = false;
char *strchr_pointer; // just a pointer to find chars in the command string like X, Y, Z, E, etc
ShortTimer serialTimeoutTimer;
long gcode_N = 0;
long gcode_LastN = 0;
uint32_t sdpos_atomic = 0;
@ -155,7 +153,7 @@ static bool cmdqueue_could_enqueue_front(size_t len_asked)
// len_asked does not contain the zero terminator size.
// This function may update bufindw, therefore for the power panic to work, this function must be called
// with the interrupts disabled!
static bool cmdqueue_could_enqueue_back(size_t len_asked, bool atomic_update = false)
static bool __attribute__((noinline)) cmdqueue_could_enqueue_back(size_t len_asked)
{
// MAX_CMD_SIZE has to accommodate the zero terminator.
if (len_asked >= MAX_CMD_SIZE)
@ -165,61 +163,29 @@ static bool cmdqueue_could_enqueue_back(size_t len_asked, bool atomic_update = f
// Full buffer.
return false;
if (serial_count > 0) {
// If there is some data stored starting at bufindw, len_asked is certainly smaller than
// the allocated data buffer. Try to reserve a new buffer and to move the already received
// serial data.
// How much memory to reserve for the commands pushed to the front?
// End of the queue, when pushing to the end.
size_t endw = bufindw + len_asked + (1 + CMDHDRSIZE);
if (bufindw < bufindr)
// Simple case. There is a contiguous space between the write buffer and the read buffer.
return endw + CMDBUFFER_RESERVE_FRONT <= bufindr;
// Otherwise the free space is split between the start and end.
if (// Could one fit to the end, including the reserve?
endw + CMDBUFFER_RESERVE_FRONT <= sizeof(cmdbuffer) ||
// Could one fit to the end, and the reserve to the start?
(endw <= sizeof(cmdbuffer) && CMDBUFFER_RESERVE_FRONT <= bufindr))
return true;
// Could one fit both to the start?
if (len_asked + (1 + CMDHDRSIZE) + CMDBUFFER_RESERVE_FRONT <= bufindr) {
// Mark the rest of the buffer as used.
memset(cmdbuffer+bufindw, 0, sizeof(cmdbuffer)-bufindw);
// and point to the start.
// Be careful! The bufindw needs to be changed atomically for the power panic & filament panic to work.
if (atomic_update)
cli();
bufindw = 0;
if (atomic_update)
sei();
return true;
}
} else {
// How much memory to reserve for the commands pushed to the front?
// End of the queue, when pushing to the end.
size_t endw = bufindw + len_asked + (1 + CMDHDRSIZE);
if (bufindw < bufindr)
// Simple case. There is a contiguous space between the write buffer and the read buffer.
return endw + CMDBUFFER_RESERVE_FRONT <= bufindr;
// Otherwise the free space is split between the start and end.
if (// Could one fit to the end, including the reserve?
endw + CMDBUFFER_RESERVE_FRONT <= sizeof(cmdbuffer) ||
// Could one fit to the end, and the reserve to the start?
(endw <= sizeof(cmdbuffer) && CMDBUFFER_RESERVE_FRONT <= bufindr))
return true;
// Could one fit both to the start?
if (len_asked + (1 + CMDHDRSIZE) + CMDBUFFER_RESERVE_FRONT <= bufindr) {
// Mark the rest of the buffer as used.
memset(cmdbuffer+bufindw, 0, sizeof(cmdbuffer)-bufindw);
// and point to the start.
// Be careful! The bufindw needs to be changed atomically for the power panic & filament panic to work.
if (atomic_update)
cli();
bufindw = 0;
if (atomic_update)
sei();
return true;
}
// If there is some data stored starting at bufindw, len_asked is certainly smaller than
// the allocated data buffer. Try to reserve a new buffer and to move the already received
// serial data.
// How much memory to reserve for the commands pushed to the front?
// End of the queue, when pushing to the end.
size_t endw = bufindw + len_asked + (1 + CMDHDRSIZE);
if (bufindw < bufindr)
// Simple case. There is a contiguous space between the write buffer and the read buffer.
return endw + CMDBUFFER_RESERVE_FRONT <= bufindr;
// Otherwise the free space is split between the start and end.
if (// Could one fit to the end, including the reserve?
endw + CMDBUFFER_RESERVE_FRONT <= sizeof(cmdbuffer) ||
// Could one fit to the end, and the reserve to the start?
(endw <= sizeof(cmdbuffer) && CMDBUFFER_RESERVE_FRONT <= bufindr))
return true;
// Could one fit both to the start?
if (len_asked + (1 + CMDHDRSIZE) + CMDBUFFER_RESERVE_FRONT <= bufindr) {
// Mark the rest of the buffer as used.
memset(cmdbuffer+bufindw, 0, sizeof(cmdbuffer)-bufindw);
// and point to the start.
// Be careful! The bufindw needs to be changed atomically for the power panic & filament panic to work.
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { bufindw = 0; }
return true;
}
return false;
}
@ -371,7 +337,7 @@ void repeatcommand_front()
void get_command()
{
// Test and reserve space for the new command string.
if (! cmdqueue_could_enqueue_back(MAX_CMD_SIZE - 1, true))
if (! cmdqueue_could_enqueue_back(MAX_CMD_SIZE - 1))
return;
if (MYSERIAL.available() == RX_BUFFER_SIZE - 1) { //compare number of chars buffered in rx buffer with rx buffer size
@ -403,7 +369,7 @@ void get_command()
cmdbuffer[bufindw+serial_count+CMDHDRSIZE] = 0; //terminate string
if(!comment_mode){
gcode_N = 0;
long gcode_N = -1;
// Line numbers must be first in buffer
@ -490,7 +456,7 @@ void get_command()
// Command is complete: store the current line into buffer, move to the next line.
// Store type of entry
cmdbuffer[bufindw] = gcode_N ? CMDBUFFER_CURRENT_TYPE_USB_WITH_LINENR : CMDBUFFER_CURRENT_TYPE_USB;
cmdbuffer[bufindw] = gcode_N >= 0 ? CMDBUFFER_CURRENT_TYPE_USB_WITH_LINENR : CMDBUFFER_CURRENT_TYPE_USB;
#ifdef CMDBUFFER_DEBUG
SERIAL_ECHO_START;
@ -506,7 +472,8 @@ void get_command()
++ buflen;
// Update the processed gcode line
gcode_LastN = gcode_N;
if (gcode_N >= 0)
gcode_LastN = gcode_N;
#ifdef CMDBUFFER_DEBUG
SERIAL_ECHOPGM("Number of commands in the buffer: ");
@ -517,7 +484,7 @@ void get_command()
serial_count = 0; //clear buffer
// Don't call cmdqueue_could_enqueue_back if there are no characters waiting
// in the queue, as this function will reserve the memory.
if (MYSERIAL.available() == 0 || ! cmdqueue_could_enqueue_back(MAX_CMD_SIZE-1, true))
if (MYSERIAL.available() == 0 || ! cmdqueue_could_enqueue_back(MAX_CMD_SIZE-1))
return;
} // end of "end of line" processing
else {
@ -615,7 +582,7 @@ void get_command()
if(card.eof()) break;
// The following line will reserve buffer space if available.
if (! cmdqueue_could_enqueue_back(MAX_CMD_SIZE-1, true))
if (! cmdqueue_could_enqueue_back(MAX_CMD_SIZE-1))
return;
}
else

View File

@ -52,7 +52,6 @@ extern int serial_count;
extern bool comment_mode;
extern char *strchr_pointer;
extern long gcode_N;
extern long gcode_LastN;
extern bool cmdqueue_pop_front();

View File

@ -528,6 +528,15 @@ void lcd_print(const char* s)
while (*s) lcd_write(*(s++));
}
void lcd_print_pad(const char* s, uint8_t len)
{
while (len && *s) {
lcd_write(*(s++));
--len;
}
lcd_space(len);
}
void lcd_print(char c, int base)
{
lcd_print((long) c, base);

View File

@ -53,6 +53,7 @@ extern void lcd_printNumber(unsigned long n, uint8_t base);
extern void lcd_printFloat(double number, uint8_t digits);
extern void lcd_print(const char*);
extern void lcd_print_pad(const char*, uint8_t len);
extern void lcd_print(char, int = 0);
extern void lcd_print(unsigned char, int = 0);
extern void lcd_print(int, int = 10);

View File

@ -167,6 +167,9 @@ extern const char MSG_THERMAL_ANOMALY[] PROGMEM_I1 = ISTR("THERMAL ANOMALY");///
#endif
//not internationalized messages
#if 0
const char MSG_FW_VERSION_BETA[] PROGMEM_N1 = "You are using a BETA firmware version! It is in a development state! Use this version with CAUTION as it may DAMAGE the printer!"; ////MSG_FW_VERSION_BETA c=20 r=8
#endif
const char MSG_AUTO_DEPLETE[] PROGMEM_N1 = "SpoolJoin"; ////MSG_AUTO_DEPLETE c=13
const char MSG_FIRMWARE[] PROGMEM_N1 = "Firmware"; ////MSG_FIRMWARE c=8
const char MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY[] PROGMEM_N1 = "FlashAir"; ////MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY c=8

View File

@ -72,7 +72,6 @@ extern const char MSG_NO[];
extern const char MSG_NOZZLE[];
extern const char MSG_PAPER[];
extern const char MSG_PAUSE_PRINT[];
extern const char MSG_PINDA[];
extern const char MSG_PLACE_STEEL_SHEET[];
extern const char MSG_PLEASE_WAIT[];
extern const char MSG_POWER_FAILURES[];
@ -86,7 +85,6 @@ extern const char MSG_REMOVE_STEEL_SHEET[];
extern const char MSG_RESET[];
extern const char MSG_RESUME_PRINT[];
extern const char MSG_RESUMING_PRINT[];
extern const char MSG_SD_WORKDIR_FAIL[];
extern const char MSG_SELFTEST_PART_FAN[];
extern const char MSG_SELFTEST_EXTRUDER_FAN[];
extern const char MSG_SELFTEST_FAILED[];
@ -126,24 +124,20 @@ extern const char MSG_WIZARD_WELCOME[];
extern const char MSG_WIZARD_WELCOME_SHIPPING[];
extern const char MSG_YES[];
extern const char MSG_V2_CALIBRATION[];
extern const char MSG_WELCOME[];
extern const char MSG_OFF[];
extern const char MSG_ON[];
extern const char MSG_NA[];
extern const char MSG_AUTO_DEPLETE[];
extern const char MSG_CUTTER[];
extern const char MSG_NONE[];
extern const char MSG_WARN[];
extern const char MSG_STRICT[];
extern const char MSG_MODEL[];
extern const char MSG_FIRMWARE[];
extern const char MSG_GCODE[];
extern const char MSG_GCODE_DIFF_PRINTER_CONTINUE[];
extern const char MSG_GCODE_DIFF_PRINTER_CANCELLED[];
extern const char MSG_NOZZLE_DIAMETER[];
extern const char MSG_MMU_MODE[];
extern const char MSG_SD_CARD[];
extern const char MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY[];
extern const char MSG_SORT[];
extern const char MSG_SORT_TIME[];
extern const char MSG_SORT_ALPHA[];
@ -177,6 +171,15 @@ extern const char MSG_THERMAL_ANOMALY[];
#endif
//not internationalized messages
#if 0
extern const char MSG_FW_VERSION_BETA[];
#endif
extern const char MSG_AUTO_DEPLETE[];
extern const char MSG_FIRMWARE[];
extern const char MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY[];
extern const char MSG_PINDA[];
extern const char MSG_WELCOME[];
extern const char MSG_SD_WORKDIR_FAIL[];
extern const char MSG_BROWNOUT_RESET[];
extern const char MSG_EXTERNAL_RESET[];
extern const char MSG_FILE_SAVED[];

View File

@ -1212,27 +1212,27 @@ FORCE_INLINE static void soft_pwm_core()
static unsigned char slow_pwm_count = 0;
static unsigned char state_heater_0 = 0;
static unsigned char state_timer_heater_0 = 0;
#endif
#endif
#if (EXTRUDERS > 1) || defined(HEATERS_PARALLEL)
static unsigned char soft_pwm_1;
#ifdef SLOW_PWM_HEATERS
static unsigned char state_heater_1 = 0;
static unsigned char state_timer_heater_1 = 0;
#endif
#endif
#endif
#if EXTRUDERS > 2
static unsigned char soft_pwm_2;
#ifdef SLOW_PWM_HEATERS
static unsigned char state_heater_2 = 0;
static unsigned char state_timer_heater_2 = 0;
#endif
#endif
#endif
#if HEATER_BED_PIN > -1
// @@DR static unsigned char soft_pwm_b;
#ifdef SLOW_PWM_HEATERS
static unsigned char state_heater_b = 0;
static unsigned char state_timer_heater_b = 0;
#endif
#endif
#endif
#if defined(FILWIDTH_PIN) &&(FILWIDTH_PIN > -1)

View File

@ -94,7 +94,7 @@ static float manual_feedrate[] = MANUAL_FEEDRATE;
/* LCD message status */
static LongTimer lcd_status_message_timeout;
static uint8_t lcd_status_message_level;
static char lcd_status_message[LCD_WIDTH + 1] = WELCOME_MSG;
static char lcd_status_message[LCD_WIDTH + 1];
/* !Configuration settings */
@ -242,9 +242,6 @@ static void lcd_cutter_enabled();
#endif
static void lcd_babystep_z();
//! Beware: has side effects - forces lcd_draw_update to 2, which means clear the display
void lcd_finishstatus();
static void lcd_sdcard_menu();
static void lcd_sheet_menu();
@ -617,7 +614,7 @@ void lcdui_print_status_line(void)
case CustomMsg::M117: // M117 Set the status line message on the LCD
case CustomMsg::Status: // Nothing special, print status message normally
case CustomMsg::M0Wait: // M0/M1 Wait command working even from SD
lcd_print(lcd_status_message);
lcd_print_pad(lcd_status_message, LCD_WIDTH);
break;
case CustomMsg::MeshBedLeveling: // If mesh bed leveling in progress, show the status
if (custom_message_state > 10) {
@ -641,10 +638,10 @@ void lcdui_print_status_line(void)
}
break;
case CustomMsg::FilamentLoading: // If loading filament, print status
lcd_print(lcd_status_message);
lcd_print_pad(lcd_status_message, LCD_WIDTH);
break;
case CustomMsg::PidCal: // PID tuning in progress
lcd_print(lcd_status_message);
lcd_print_pad(lcd_status_message, LCD_WIDTH);
if (pid_cycle <= pid_number_of_cycles && custom_message_state > 0) {
lcd_set_cursor(10, 3);
lcd_print(itostr3(pid_cycle));
@ -669,11 +666,6 @@ void lcdui_print_status_line(void)
break;
}
}
// Fill the rest of line to have nice and clean output
for(uint8_t fillspace = 0; fillspace < LCD_WIDTH; fillspace++)
if ((lcd_status_message[fillspace] <= 31 ))
lcd_print(' ');
}
//! @brief Show Status Screen
@ -7427,7 +7419,6 @@ static bool check_file(const char* filename) {
card.printingHasFinished();
lcd_setstatuspgm(MSG_WELCOME);
lcd_finishstatus();
return result;
}
@ -7518,6 +7509,9 @@ void ultralcd_init()
lcd_oldcardstatus = IS_SD_INSERTED;
#endif//(SDCARDDETECT > 0)
lcd_encoder_diff = 0;
// Initialise status line
strncpy_P(lcd_status_message, MSG_WELCOME, LCD_WIDTH);
}
void lcd_ignore_click(bool b)
@ -7526,19 +7520,6 @@ void lcd_ignore_click(bool b)
wait_for_unclick = false;
}
void lcd_finishstatus() {
SERIAL_PROTOCOLLNRPGM(MSG_LCD_STATUS_CHANGED);
int len = strlen(lcd_status_message);
if (len > 0) {
while (len < LCD_WIDTH) {
lcd_status_message[len++] = ' ';
}
}
lcd_status_message[LCD_WIDTH] = '\0';
lcd_draw_update = 2;
}
static bool lcd_message_check(uint8_t priority)
{
// regular priority check
@ -7561,7 +7542,9 @@ static void lcd_updatestatus(const char *message, bool progmem = false)
strncpy(lcd_status_message, message, LCD_WIDTH);
lcd_status_message[LCD_WIDTH] = 0;
lcd_finishstatus();
SERIAL_PROTOCOLLNRPGM(MSG_LCD_STATUS_CHANGED);
// hack lcd_draw_update to 1, i.e. without clear
lcd_draw_update = 1;
}
@ -7581,12 +7564,18 @@ void lcd_setstatuspgm(const char* message)
void lcd_setalertstatus_(const char* message, uint8_t severity, bool progmem)
{
if (lcd_message_check(severity)) {
bool same = !(progmem?
strcmp_P(lcd_status_message, message):
strcmp(lcd_status_message, message));
lcd_updatestatus(message, progmem);
lcd_status_message_timeout.start();
lcd_status_message_level = severity;
custom_message_type = CustomMsg::Status;
custom_message_state = 0;
lcd_return_to_status();
if (!same) {
// do not kick the user out of the menus if the message is unchanged
lcd_return_to_status();
}
}
}

View File

@ -422,7 +422,7 @@
#define TEMP_MODEL_C_thr 0.01 // C estimation iteration threshold
#define TEMP_MODEL_C_itr 30 // C estimation iteration limit
#define TEMP_MODEL_R 29.7 // initial guess for heatblock resistance (K/W)
#define TEMP_MODEL_R 20.5 // initial guess for heatblock resistance (K/W)
#define TEMP_MODEL_Rl 5 // R estimation lower limit
#define TEMP_MODEL_Rh 50 // R estimation upper limit
#define TEMP_MODEL_R_thr 0.01 // R estimation iteration threshold

View File

@ -426,7 +426,7 @@
#define TEMP_MODEL_C_thr 0.01 // C estimation iteration threshold
#define TEMP_MODEL_C_itr 30 // C estimation iteration limit
#define TEMP_MODEL_R 29.7 // initial guess for heatblock resistance (K/W)
#define TEMP_MODEL_R 20.5 // initial guess for heatblock resistance (K/W)
#define TEMP_MODEL_Rl 5 // R estimation lower limit
#define TEMP_MODEL_Rh 50 // R estimation upper limit
#define TEMP_MODEL_R_thr 0.01 // R estimation iteration threshold

View File

@ -85,7 +85,7 @@
# 15 Feb 2019, 3d-gussner, troubleshooting and minor fixes
# 16 Feb 2019, 3d-gussner, Script can be run using arguments
# $1 = variant, example "1_75mm_MK3-EINSy10a-E3Dv6full.h" at this moment it is not possible to use ALL
# $2 = multi language OR English only [ALL/EN_ONLY]
# $2 = multi language OR English only [ALL/EN_FARM]
# $3 = development status [GOLD/RC/BETA/ALPHA/DEVEL/DEBUG]
# If one argument is wrong a list of valid one will be shown
# 13 Mar 2019, 3d-gussner, MKbel updated the Linux build environment to version 1.0.2 with an Fix maximum firmware flash size.
@ -124,7 +124,7 @@
# After compiling All multi-language variants it makes it easier to find missing or unused translations.
# 12 May 2020, DRracer , Cleanup double MK2/s MK25/s `not_tran` and `not_used` files
# 13 May 2020, leptun , If cleanup files do not exist don't try to.
# 01 Oct 2020, 3d-gussner, Bug fix if using argument EN_ONLY. Thank to @leptun for pointing out.
# 01 Oct 2020, 3d-gussner, Bug fix if using argument EN_FARM. Thank to @leptun for pointing out.
# Change Build number to script commits 'git rev-list --count HEAD PF-build.sh'
# 02 Oct 2020, 3d-gussner, Add UNKNOWN as argument option
# 05 Oct 2020, 3d-gussner, Disable pause and warnings using command line with all needed arguments
@ -268,7 +268,7 @@ echo " -d : '$(tput setaf 2)GOLD$(tput sgr0)', '$(tput setaf 2)RC$(tput sgr0)',
echo " -g : '$(tput setaf 2)0$(tput sgr0)' no '$(tput setaf 2)1$(tput sgr0)' lite '$(tput setaf 2)2$(tput sgr0)' fancy '$(tput setaf 2)3$(tput sgr0)' lite with Quad_HR '$(tput setaf 2)4$(tput sgr0)' fancy with Quad_HR"
echo " -i : '$(tput setaf 2)1.8.5$(tput sgr0)', '$(tput setaf 2)1.8.19$(tput sgr0)'"
echo " -j : '$(tput setaf 2)0$(tput sgr0)' no, '$(tput setaf 2)1$(tput sgr0)' yes"
echo " -l : '$(tput setaf 2)ALL$(tput sgr0)' for multi language or '$(tput setaf 2)EN_ONLY$(tput sgr0)' for English only"
echo " -l : '$(tput setaf 2)ALL$(tput sgr0)' for multi language or '$(tput setaf 2)EN_FARM$(tput sgr0)' for English only"
echo " -m : '$(tput setaf 2)0$(tput sgr0)' no, '$(tput setaf 2)1$(tput sgr0)' yes '$(tput setaf 2)2$(tput sgr0)' with MMU2"
echo " -n : '$(tput setaf 2)0$(tput sgr0)' no, '$(tput setaf 2)1$(tput sgr0)' yes"
echo " -o : '$(tput setaf 2)1$(tput sgr0)' force or '$(tput setaf 2)0$(tput sgr0)' block output and delays"
@ -882,7 +882,7 @@ else
fi
fi
#'-l' argument defines if it is an English only version. Known values EN_ONLY / ALL
#'-l' argument defines if it is an English only version. Known values EN_FARM / ALL
#Check default language mode
MULTI_LANGUAGE_CHECK=$(grep --max-count=1 "^#define LANG_MODE *" $SCRIPT_PATH/Firmware/config.h|sed -e's/ */ /g'|cut -d ' ' -f3)
@ -897,7 +897,7 @@ if [ -z "$language_flag" ] ; then
break
;;
"English only")
LANGUAGES="EN_ONLY"
LANGUAGES="EN_FARM"
break
;;
*)
@ -906,11 +906,11 @@ if [ -z "$language_flag" ] ; then
esac
done
else
if [[ "$language_flag" == "ALL" || "$language_flag" == "EN_ONLY" ]] ; then
if [[ "$language_flag" == "ALL" || "$language_flag" == "EN_FARM" ]] ; then
LANGUAGES=$language_flag
else
echo "$(tput setaf 1)Language argument is wrong!$(tput sgr0)"
echo "Only $(tput setaf 2)'ALL'$(tput sgr0) or $(tput setaf 2)'EN_ONLY'$(tput sgr0) are allowed as language '-l' argument!"
echo "Only $(tput setaf 2)'ALL'$(tput sgr0) or $(tput setaf 2)'EN_FARM'$(tput sgr0) are allowed as language '-l' argument!"
failures 5
fi
fi
@ -1110,9 +1110,9 @@ prepare_hex_folders()
if [ $OUTPUT == "1" ] ; then
read -t 10 -p "Press Enter to continue..."
fi
elif [[ -f "$SCRIPT_PATH/../$OUTPUT_FOLDER/$OUTPUT_FILENAME-EN_ONLY.hex" && "$LANGUAGES" == "EN_ONLY" ]]; then
elif [[ -f "$SCRIPT_PATH/../$OUTPUT_FOLDER/$OUTPUT_FILENAME-EN_FARM.hex" && "$LANGUAGES" == "EN_FARM" ]]; then
echo ""
ls -1 $SCRIPT_PATH/../$OUTPUT_FOLDER/$OUTPUT_FILENAME-EN_ONLY.hex | xargs -n1 basename
ls -1 $SCRIPT_PATH/../$OUTPUT_FOLDER/$OUTPUT_FILENAME-EN_FARM.hex | xargs -n1 basename
echo "$(tput setaf 6)This hex file to be compiled already exists! To cancel this process press CRTL+C and rename existing hex file.$(tput sgr 0)"
if [ $OUTPUT == "1" ] ; then
read -t 10 -p "Press Enter to continue..."
@ -1171,7 +1171,7 @@ prepare_variant_for_compiling()
sed -i -- 's/#define FW_REPOSITORY "Unknown"/#define FW_REPOSITORY "Prusa3d"/g' $SCRIPT_PATH/Firmware/Configuration.h
#Prepare English only or multi-language version to be build
if [ $LANGUAGES == "EN_ONLY" ]; then
if [ $LANGUAGES == "EN_FARM" ]; then
echo " "
echo "English only language firmware will be built"
sed -i -- "s/^#define LANG_MODE *1/#define LANG_MODE 0/g" $SCRIPT_PATH/Firmware/config.h
@ -1379,17 +1379,17 @@ create_multi_firmware()
}
#### End: Create and save Multi Language Prusa Firmware
#### Start: Save EN_ONLY language Prusa Firmware
#### Start: Save EN_FARM language Prusa Firmware
save_en_firmware()
{
#else
echo "$(tput setaf 2)Copying English only firmware to PF-build-hex folder$(tput sgr 0)"
cp -f $BUILD_PATH/Firmware.ino.hex $SCRIPT_PATH/../$OUTPUT_FOLDER/$OUTPUT_FILENAME-EN_ONLY.hex || failures 12
cp -f $BUILD_PATH/Firmware.ino.hex $SCRIPT_PATH/../$OUTPUT_FOLDER/$OUTPUT_FILENAME-EN_FARM.hex || failures 12
echo "$(tput setaf 2)Copying English only elf file to PF-build-hex folder$(tput sgr 0)"
cp -f $BUILD_PATH/Firmware.ino.elf $SCRIPT_PATH/../$OUTPUT_FOLDER/$OUTPUT_FILENAME-EN_ONLY.elf || failures 12
cp -f $BUILD_PATH/Firmware.ino.elf $SCRIPT_PATH/../$OUTPUT_FOLDER/$OUTPUT_FILENAME-EN_FARM.elf || failures 12
#fi
}
#### End: Save EN_ONLY language Prusa Firmware
#### End: Save EN_FARM language Prusa Firmware
#### Start: Cleanup Firmware
cleanup_firmware()
@ -1562,7 +1562,7 @@ if [[ ! -z "$mk404_flag" && "$variant_flag" != "All " ]]; then
#cd ../MK404/master/build
#Decide which hex file to use EN_ONLY or Multi language
#Decide which hex file to use EN_FARM or Multi language
if [ "$LANGUAGES" == "ALL" ]; then
if [[ "$MK404_PRINTER" == "MK3" || "$MK404_PRINTER" == "MK3S" ]]; then
MK404_firmware_file=$SCRIPT_PATH/../$OUTPUT_FOLDER/$OUTPUT_FILENAME.hex
@ -1575,7 +1575,7 @@ if [[ ! -z "$mk404_flag" && "$variant_flag" != "All " ]]; then
done
fi
else
MK404_firmware_file=$SCRIPT_PATH/../$OUTPUT_FOLDER/$OUTPUT_FILENAME-EN_ONLY.hex
MK404_firmware_file=$SCRIPT_PATH/../$OUTPUT_FOLDER/$OUTPUT_FILENAME-EN_FARM.hex
fi
# Start MK404

View File

@ -32,7 +32,7 @@ if [ ! -f "$SCRIPT_PATH/Firmware/Configuration_prusa.h" ]; then
cp $SCRIPT_PATH/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h $SCRIPT_PATH/Firmware/Configuration_prusa.h || exit 8
fi
if [[ ! -z $LANGUAGES && $LANGUAGES == "EN_ONLY" ]]; then
if [[ ! -z $LANGUAGES && $LANGUAGES == "EN_FARM" ]]; then
echo "English only language firmware will be built"
sed -i -- "s/^#define LANG_MODE *1/#define LANG_MODE 0/g" $SCRIPT_PATH/Firmware/config.h
else

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff