Commit Graph

4648 Commits

Author SHA1 Message Date
3d-gussner
ac55c103a4 Update internal translations
Fix typo
2022-11-24 11:03:04 +01:00
D.R.racer
a03183723c Fix & optimize FW version parsing and checking
PFW-1433
2022-11-23 13:58:55 +01:00
3d-gussner
6d7d5d4ef3 Fix typo
Add Norwegian translations thanks to @OS-kar
2022-11-22 08:31:12 +01:00
3d-gussner
696117e73b Fix cherry-pick 2022-11-20 11:14:06 +01:00
3d-gussner
6e330c11a7 Update Temp Model messages
Deepl translate cs,de,es,fr,it,nl,pl
2022-11-20 11:12:20 +01:00
3d-gussner
f8edad2fba Unhack selftest hack during wizard 2022-11-20 11:05:45 +01:00
Alex Voinea
0f70665e44 XYZ calibration fixes 2022-11-20 11:05:26 +01:00
Alex Voinea
7e9d9ade5c Fix wizard serial messages 2022-11-20 11:03:06 +01:00
3d-gussner
7fe1a50899 Inital Temp Model cal wizard 2022-11-20 11:02:38 +01:00
3d-gussner
a8de9d5696 Bump up build number to 5576
+2 for https://github.com/prusa3d/Prusa-Firmware/pull/3745
+1 commit
+1 merge
2022-11-14 14:17:11 +01:00
Alex Voinea
478a9a6cec MK2.5: unblock planner after plan_abort_hard() 2022-11-11 09:17:17 +01:00
3d-gussner
de562800ca Fix Long-press cherry-pick from https://github.com/prusa3d/Prusa-Firmware/pull/3737
Fix eeprom documentation
Update pot and po files as pre-release task
Bump up to FW 3.12.0-RC1 and build number +2 (+1 commit + 1 merge)
2022-11-07 10:37:43 +01:00
Guðni Már Gilbert
e9b7763af6 Fix long-press LCD inactivity timeout
Fixes #3715

When a long-press is triggered, the LCD inactivity timer
needs to be restarted. This is done with lcd_timeoutToStatus.start()

This also fixes situations where a long-press is triggered, and the timer
times out immediately (because it was not reset properly)

Change in memory:
Flash: +8 bytes
SRAM: 0 bytes
2022-11-07 10:11:35 +01:00
3d-gussner
4785eedc06 Fix typo
Add lcd_setatatus_serial to output lcd status message and serial at the same time
2022-11-02 10:19:16 +01:00
3d-gussner
67877acbf6 Fix MK25/S builds 2022-10-28 05:39:42 +02:00
3d-gussner
6d358187ff Temp Model cal. menu 2022-10-28 05:39:14 +02:00
3d-gussner
cb5e6d700b Rename Sheets
- `Satin 1` to `Satin  `
- `Satin 2` to `NylonPA`
2022-10-24 08:07:18 +02:00
3d-gussner
1b08776873 Change fan RPM display to 5 digits
All credits to @ WarrenSchultz for initial PR https://github.com/prusa3d/Prusa-Firmware/pull/3656
2022-10-19 07:01:54 +02:00
3d-gussner
162ab4538f rename Extruder fan to Hotend fan
Fix cherry-pick issues
2022-10-19 07:01:07 +02:00
Alex Voinea
00de54adfb Enable MISO pullup during SD CMD0
fix typo
2022-10-10 09:43:07 +02:00
3d-gussner
d9e8b18569
Merge pull request #3667 from 3d-gussner/MK3_3.12_fix_eeprom_documentation_part2
MK3_3.12 fix eeprom doxygen documentation
2022-10-07 08:25:46 +02:00
3d-gussner
a061f4ec32 Fix Typo 0X0 to 0x0 2022-10-06 15:34:59 +02:00
3d-gussner
76cc9b9c20 Add Temp Model eeprom documentation 2022-10-06 15:34:24 +02:00
3d-gussner
07ad255f7d replace tab with spaces
fix cherry-pick issues
2022-10-06 15:33:24 +02:00
Yuri D'Elia
ae1c88823c Also consume longpress in lcd_consume_click() 2022-10-06 15:22:08 +02:00
Yuri D'Elia
8ae499c352 TM: Consume LCD click after calibration
Consume any pending LCD click after the temperature model calibration.
Since we're already in the status menu, the usual consume action is not
done automatically here.
2022-10-06 15:21:52 +02:00
3d-gussner
350b2a6993 Version changed (3.12.0-BETA1 build 5536) 2022-09-29 19:57:46 +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
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
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
178b3e1db4 Update current FW version 2022-09-19 18:11:19 +02:00
3d-gussner
d706ebb556 Update forgotten MSG_ c= 2022-09-14 11:33:24 +02:00
3d-gussner
6e3be50389 Clean up 2022-09-14 11:33:24 +02:00
3d-gussner
f65e8ae5dd Add MSG_ALWAYS 2022-09-14 11:33:24 +02:00
3d-gussner
129b646c58 Fix MSG_ c=
Add MSG_ to messages.c/h
2022-09-14 11:33:24 +02:00
3d-gussner
ee6821eb0e Add missing MSG_ c= r= 2022-09-14 11:33:24 +02:00
3d-gussner
270a1086ab No translation needed 2022-09-14 11:33:24 +02:00
3d-gussner
0a68de0bbe Update MSG c=xx
Mark unused strings as `_n`
2022-09-14 11:33:24 +02:00
3d-gussner
fd2d62dcd4 Set reserved space back after cherry-pick 2022-09-14 11:33:24 +02:00
3d-gussner
83315d0494 Update config.h translation documentation and move language to group2
Update fw-build.sh
 - Output used space of each translation (easier to troubleshoot)
 - Read config.h max size per translation
 - output variant .map files (easier to troubleshoot and finding missing/unused messages)
2022-09-14 11:33:24 +02:00
Yuri D'Elia
35c3e3ce68 Remove MSG_M117_V2_CALIBRATION
This message is never actually shown on the LCD (it's immediately
overwritten by other content). It also include g-code in a translatable
string, which is not a good idea. It's also otherwise identical to
MSG_V2_CALIBRATION, which we should have used.

Just remove it and save some space in the process.
2022-09-14 11:33:24 +02:00
Yuri D'Elia
c7354bdfe8 lang: Fix usage of new non-translated strings
Fix cherry-pick
2022-09-14 11:33:24 +02:00
Yuri D'Elia
7a80252556 lang: Add support for raw catalog references with _R
_R marks a raw catalog entry as Referenced (= used) for cases where the
catalog pointers are handled at a lower level.
2022-09-14 11:33:24 +02:00
Yuri D'Elia
05093fbf49 lang: Add inline documentation for the various language macros 2022-09-14 11:33:24 +02:00
Alex Voinea
510f13b24a Make the diag pins open collector with pullup.
Solves random crash detected on startup
2022-09-14 07:39:47 +02:00
Alex Voinea
bb57d99c35 Remove the crashDetection software counters and use sfilt 2022-09-14 07:39:47 +02:00
D.R.racer
996f9943a1 Extract PRINTER_ACTIVE into a noinline function
Having the original PRINTER_ACTIVE macro copied at multiple spots doesn't make sense.
Refactoring it into a non-inline function saved ~400 bytes of code.
It should be safe in terms of performance, all occurrences are at non-time critical spots.
2022-09-14 07:31:39 +02:00
Yuri D'Elia
16d666302b Allow choice positioning. Balance Yes/No messages.
Add an additional parameter to control the position of second choice
prompt position (while defaulting to the old).

This allows Yes/No prompts to be equally spaced.
2022-09-14 07:30:57 +02:00
Yuri D'Elia
b41fb8a13a Unify fullscreen/multiscreen/yes-no prompt message handling
Modify lcd_show_multiscreen_message_two_choices_and_wait_P to also
handle single-screen or empty (no-clear) prompts, making other functions
redundant. Saves 76 bytes.

Change existing functions to simply call
lcd_show_multiscreen_message_two_choices_and_wait_P with the correct
arguments.

This changes the prompt of existing Yes/No messages: the previous prompt
would use the last two lines of the LCD, while the new prompt is using
just the last line of the LCD instead.

Translation do not require updates, since the Yes/No translation was
already the same in both implementations.
2022-09-14 07:30:57 +02:00
Yuri D'Elia
d78506a8ea TM: Rename D70 I to D70 S for consistency with M310 S 2022-09-02 15:59:29 +02:00
Yuri D'Elia
9dbee61b74 TM: Remove an unnecessary fabsf call
Ironically gcc was stripping that one for us already.
2022-09-02 15:59:29 +02:00
Yuri D'Elia
81238fbb15 Move MSG_PAUSED_THERMAL_ERROR outside TEMP_MODEL
MSG_PAUSED_THERMAL_ERROR is not specific to model-checking and can be
used also on MK25* variants.
2022-09-02 15:59:29 +02:00
Yuri D'Elia
b48c698562 TM: Update default C/R0 estimates for MK3/MK3S variants 2022-09-02 15:59:29 +02:00
Yuri D'Elia
10c524fdb3 TM: Add M310 [F] parameter to enable autotune self-test 2022-09-02 15:59:29 +02:00
Yuri D'Elia
9b9ce1733c TM: Allow to keep model checking enabled during autotuning
Allow running the model checking during autotuning, with the only
exception being the parameter estimation stage where we alter the same
value which is used by the checker (done to conserve memory/code).

With previous changes the model checker will disable/enable itself when
passing through an unavailable R vector entry, allowing to start the
calibration by checking only the stages where the part fan is disabled.

The C/R0 values should be stable enough to provide a fail-safe mechanism
for printers of the same variant right from the factory.
2022-09-02 15:59:29 +02:00
Yuri D'Elia
ff459a6427 TM: Handle dynamic parameter changing
Instead of assuming the model state is always valid, allow NAN values to
pass-through the various check/estimation stages.

This allows running the model checker with incomplete parameters (for
example, missing entries in the R vector) and resume automatically.
2022-09-02 15:59:29 +02:00
Yuri D'Elia
54e5702f30 TM: Move initial R0 initialization closer to usage 2022-09-02 15:59:29 +02:00
Yuri D'Elia
9b5ef75b68 Correctly translate thermal model LCD messages 2022-09-02 15:59:29 +02:00
Yuri D'Elia
331de988f7 TM: Avoid an useless float promotion 2022-09-02 15:59:29 +02:00
3d-gussner
66b97683bb Update build.sh and travis to build EN_ONLY
Change FARM_MODE
- Active only on EINSYs in EN_ONLY
- Active on miniRAMBo in all languages
2022-08-30 13:57:43 +02:00
Alex Voinea
f5840e1b02 Fix minirambo build 2022-08-30 13:57:43 +02:00
Alex Voinea
d1c545fdd6 Disable farm mode in config file 2022-08-30 13:57:43 +02:00
Alex Voinea
ec84c22865 Remove unused define 2022-08-30 13:57:43 +02:00
Alex Voinea
2959cc0b64 Do not compile farm lcd_commands 2022-08-30 13:57:43 +02:00
Alex Voinea
2b4c2127e6 Make lcd function static 2022-08-30 13:57:43 +02:00
Alex Voinea
3537024ba2 Remove forgotten config in MK2_minirambo_1.0a 2022-08-30 13:57:43 +02:00
Alex Voinea
8033b65a02 Isolate farm preheat config 2022-08-30 13:57:43 +02:00
Alex Voinea
435ee66bdd Move all farm configuration to header 2022-08-30 13:57:43 +02:00
Alex Voinea
d049d09623 Isolate FARM_DEFAULT_SAFETYTIMER_TIME_ms 2022-08-30 13:57:43 +02:00
Alex Voinea
39eb728d54 More farm optimizations
Kudos @gudnimg
2022-08-30 13:57:43 +02:00
Alex Voinea
d1c30c338f Fix farmless mode 2022-08-30 13:57:43 +02:00
Alex Voinea
bef7b086e3 Isolate the entire farm and statistics code 2022-08-30 13:57:43 +02:00
Alex Voinea
7d597eb8b0 Move farm mode to separate file 2022-08-30 13:57:43 +02:00
Alex Voinea
4e7d686b83
Merge pull request #3574 from leptun/extra_optimizations
More optimizations for 3.12 to fit
2022-08-29 19:25:46 +03:00
Alex Voinea
692f51c51e Save target bed temperature, not current temperature 2022-08-28 11:21:17 +03:00
Guðni Már Gilbert
37c9dcbe53 Optimise calculations to use hypot() where possible
flash: -122
RAM: 0

It is defined: hypot(x,y) = sqrtf(x*x + y*y)
2022-08-26 19:36:28 +03:00
Alex Voinea
7d72f0ee2e better lcd printing for IP address
flash: -46
RAM: 0
2022-08-26 19:33:53 +03:00
Guðni Már Gilbert
4e798c9ed1 Remove unused variable maxlimit_status
flash: 0
RAM: -1
2022-08-26 19:29:32 +03:00
Guðni Már Gilbert
7711969e57 ftostr12ns: change xx from long to int
flash: -44
RAM: 0

Largest expected number is 999 after the multiplication by 100.

I measured the execution time drops from ~170us to ~73us.
2022-08-26 19:28:36 +03:00
Guðni Már Gilbert
88e0e33fb2 Use set_destination_to_current instead of memcpy
flash: -14
RAM: 0
2022-08-26 19:27:16 +03:00
Guðni Már Gilbert
7d86a0d121 Reduce a few magic numbers for FILENAME_LENGTH
flash: 0
RAM: 0
2022-08-26 19:26:26 +03:00
Guðni Már Gilbert
22582e560e Remove one redundant st_synchronize() call
flash: -4
RAM: 0

st_synchronize() is called just before leaving gcode_G28() so we don't need to call it again just after leaving gcode_G28()
2022-08-26 19:25:07 +03:00
Guðni Már Gilbert
89fc9f7a62 Optimise lcd_menu_show_sensors_state()
flash: -22
RAM: 0

menu_lcd_lcdupdate_func() takes care of starting lcd_timeoutToStatus if the knob is clicked.

When the knob is clicked we only want to back out of the menu.
This changes makes the menus slightly more conistant behind the scenes.
2022-08-26 19:22:23 +03:00
Guðni Már Gilbert
c2340d3648 lcd_babystep_z should not start lcd_timeoutToStatus
flash: -8
RAM: 0

When the menu is entered and left the function
menu_lcd_lcdupdate_func() takes care of resetting the timer.

Currently the firmware will reset the timer twice when the lcd_babystep_z menu is entered. This commit fixes that.
2022-08-26 19:20:22 +03:00
Guðni Már Gilbert
74d6aead2f Optimise if statements in lcd_tune_menu
flash: -10
RAM: 0

I am basically combining two if statements if(SilentModeMenu == SILENT_MODE_NORMAL)
2022-08-26 19:17:07 +03:00
Alex Voinea
25350dfbbc Remove unused variable bFilamentFirstRun
flash: 0
RAM: -1
2022-08-26 19:14:40 +03:00
Alex Voinea
4ded6f195e Move string to progmem
flash: -52
RAM: -6
2022-08-26 18:59:53 +03:00