Commit Graph

1294 Commits

Author SHA1 Message Date
3d-gussner 14b4bf5fa5 Add CLOCK_INTERVAL_TIME and ShortTimer IntervalTimer 2021-02-11 07:47:44 +01:00
3d-gussner b9a3fa2ddd fix time at speed 2021-02-11 07:47:44 +01:00
3d-gussner 4998cfb70d Fix printing time being shown without `M73` gcode
Adjust estimated times only if speed is changed. Printing time has to stay printing time.
2021-02-11 07:47:43 +01:00
3d-gussner d063ffb141 Add parameter `D` to gcode `M73` for silent/stealth mode 2021-02-11 07:47:43 +01:00
3d-gussner 91c767b0f2 Reduce code size 2021-02-11 07:47:43 +01:00
3d-gussner ae48e7c3ce indentation 2021-02-11 07:47:43 +01:00
3d-gussner cb61436093 Add remaining time to change/pause/user interaction to LCD Info screen
- Add parameter `C` to gcode `M73`
- LCD Info screen switches to change time if last `M73` gcode contains `C` parameter
  - Examples:
    - `M73 P5 R120` will display on LCD ` SD  5%      02:00R ` if it is printing at 100% speed
    - `M73 P5 R120 C60` will display on LCD ` SD  5%      01:00C ` if it is printing at 100% speed

Slicers can generate "Time to change/pause/user interaction" using `C<mins:0-65535>` parameter to "overwrite" the remaining print time.
To switch between time to change and remaining time just send in intervals `M73` with or without `C` parameter.
2021-02-11 07:47:43 +01:00
Alex Voinea b4de57c365
Merge branch 'MK3' into MK3_NEW_SD_COMPILATION 2021-02-10 17:08:28 +02:00
DRracer 7aa4595211
Merge branch 'MK3' into thumbnails2 2021-02-10 12:15:57 +01:00
3d-gussner 8bc46248f6 avoid having the block body twice in the code. Thanks to @DRracer 2021-02-10 11:09:29 +01:00
3d-gussner e5711ea84f Indentation to 4 spaces for tabs 2021-02-10 11:03:23 +01:00
Alex Voinea e6ffc99ff5
Fix compiler bug ... again ...
:endit: :blobhydraulicpress:
2021-02-09 16:28:13 +02:00
Alex Voinea d2a7c62b50
Merge branch 'MK3' into MK3_NEW_SD_COMPILATION 2021-02-09 16:17:43 +02:00
DRracer a47c971c75
Merge pull request #3010 from leptun/MK3_fix_M23
Fix M23
2021-02-09 15:06:51 +01:00
D.R.racer 9ccda4c57f Optimize code size
... looks like I've been able to reduce the code by 80B by using the
clamp999() function. There are other spots this function can be used as
well, I didn't touch those yet.
2021-02-09 09:10:23 +01:00
DRracer e491b53f48
Merge branch 'MK3' into MK3_Fix_LCD_stats 2021-02-09 08:53:32 +01:00
DRracer 5c3683b4ad
Merge pull request #3022 from 3d-gussner/PFW-1182
PFW-1182 Fix too long translations during Load/Unload Filament
2021-02-09 08:24:31 +01:00
D.R.racer 3668cdeb30 Add Service prep. item into Factory reset
upon request from our Service dept. - it is to do the same stuff like
Shipping prep., but keep the printer's stats intact. Still, this has to
be verified and may undergo some further changes.
2021-02-08 17:27:32 +01:00
D.R.racer 5f49d65546 Farmers' request - allow file sorting menu item 2021-02-08 15:43:08 +01:00
3d-gussner 92db282eca Merge remote-tracking branch 'upstream/MK3' into PFW-960 2021-02-08 12:48:27 +01:00
3d-gussner aecbd7ab49 Fix `c=aa` location in lang files
Fix too long translations in Spanish and Italian
2021-02-08 12:17:41 +01:00
3d-gussner 214695105c Fix issue #2958 2021-02-08 11:33:46 +01:00
Voinea Dragos 77a5082b56 Fix presort_flag duplicate declaration 2021-02-06 17:25:17 +02:00
Voinea Dragos 52f7a71dce More fixes that were extracted from #2405 2021-02-06 14:59:11 +02:00
Alex Voinea 84d043d41b Fix WorkDirDepth limit (for good this time) 2021-02-04 17:52:42 +02:00
Alex Voinea 90c0f33bc5 Fix farm filename when LFN is missing 2021-02-04 16:40:15 +02:00
Alex Voinea 080c44cb2e Undo stupid hack for an error because of some compiler issue in the past 2021-02-04 16:37:24 +02:00
Alex Voinea 279c0aaa21 Fix double '>' bug and brutal refactoring 2021-02-04 14:21:37 +02:00
Yuri D'Elia 640e8d899b Don't scroll one character past the filename end 2021-02-04 13:33:20 +02:00
Alex Voinea 8445f76eb9 Restructure for loop to work correctly in reverse 2021-02-04 13:26:15 +02:00
Alex Voinea 3c5c1e5167 Use enum for menu state code readability 2021-02-04 13:19:22 +02:00
Alex Voinea 4c977cc335 Merge branch 'MK3' into MK3_NEW_SD_COMPILATION 2021-02-03 18:28:18 +02:00
3d-gussner 2ba24fe0d4 Add pause/resume to USB/host prints via LCD menu
Depending if SD or USB/host print the firmware sends
- SD print: `// action:paused` or `// action:resumed` are send to inform USB/Host
- USB/host print: `// action:pause` or `// action:resume` are send to trigger the USB/host to handle it

- USB/host must handle `// action:pause` and `// action:resume` correctly to work
  - Tested with Octoprint
    - It handles every thing correctly
    - Any combination of Octoprint and/or LCD `pause` and `resume` working correctly
  - Tested with Pronterface
    - It pauses BUT doesn't send the printer in pause position, and so it is not possible to `resume` from LCD menu
    - I guess some Macros can fix that.
  - Repetier Host/Server documentation shows that it should work. Not tested.

Could save 56 bytes in first step and additional 38 bytes adding `MSG_PAUSE_PRINT` to messages.c/.h

Updated `lang_en*.txt`
@todo Polish translation is 19 characters long (it still fits) BUT should be corrected to 18 chars.
2021-02-03 11:00:26 +01:00
3d-gussner 57e730c80c Merge remote-tracking branch 'vojtech-pavlik/MK3' into MK3_Test_PRs
Fix merge issues PR1900
2021-02-02 13:49:34 +01:00
Alex Voinea 2f4119a6d7 M552 - Printer IP address 2021-02-02 13:21:16 +02:00
3d-gussner d75a0fdcbd Merge remote-tracking branch 'upstream/MK3' into MK3_translation_0121 2021-01-29 15:38:48 +01:00
D.R.racer 7279de7403 Separate reading G-code files and writing to a file
- extract common strings
- cleanup openFileWrite and openFileReadFilteredGcode formatting a bit
Alltogether - code size 400B down
2021-01-28 09:37:58 +01:00
D.R.racer d275fe0e83 Extract gcode filter from SdBaseFile into SdFile + optimization
- Start saving instructions as the whole PR was >1KB long.
- It turned out the compiler was unable to understand the core skipping
cycle and an ASM version had to be used.
- Add seekSet aware of the G-code filter
2021-01-27 09:33:28 +01:00
D.R.racer c3758d350e Fast skipping of large comment blocks
This is an extension/optimization of PR #2956.
It uses the cached 512B block buffer to avoid heavy-weight read() in SdBaseFile.
Even though this principle allowed the AVR to skip ~600KB of data within ~5 seconds,
the impact on code base is huge, especially into well proven and long-term stable
parts like reading a file from the SD card.

The sole purpose of this PR is to show/verify the possibility of the AVR CPU
in relation to adding thumbnails into MK3 G-codes.
Moreover, this PR shall not be merged unless the missing/commented features
are restored - especially file seeking and M84 search.

PFW-1175
2021-01-27 07:03:51 +01:00
3d-gussner f40c593d11 Fix few translations not being used due to spaces or upper case 2021-01-26 14:15:34 +01:00
D.R.racer c28e5a9dbc Farmer's request 2
Farmers request having the Change filament menu item always visible in
the main menu and located after the Live Adjust Z (which disappears
after the first few printed layers).
2021-01-26 12:19:41 +01:00
DRracer bfe93d3959
Merge pull request #2951 from DRracer/pvb-08
Add PVB preheat and 0.8mm nozzle presets
2021-01-26 12:09:41 +01:00
3d-gussner ad5d068690 Update char lengths part 1
Fix some too long translations
2021-01-26 12:09:35 +01:00
3d-gussner ba8386573a Remove duplicate string `Resume print` using `MSG_RESUME_PRINT` 2021-01-26 09:23:55 +01:00
3d-gussner c6a01b3806 Remove duplicate string `Reset` using `MSG_RESET` 2021-01-26 09:15:46 +01:00
3d-gussner ab5aad636f Remove duplicate string `Mesh Bed Leveling` and `Mesh bed leveling` using `MSG_MESH_BED_LEVELING`
Fixed few too long translations
2021-01-26 09:05:38 +01:00
3d-gussner bce8501eea Remove duplicate string `Extruder` using `MSG_Extruder` 2021-01-26 08:31:21 +01:00
3d-gussner 530b9f50b8 Remove duplicate string `Eject filament` using `MSG_EJECT_FILAMENT`
Fix few translations
2021-01-26 08:22:08 +01:00
3d-gussner 269fabc330 Remove duplicate string `Cut filament` using `MSG_CUT_FILAMENT` 2021-01-26 07:15:46 +01:00
3d-gussner 797d8e74a3 Remove duplicate string `Checking X axis` and `Checking Y axis` using `MSG_CHECKING_X` and `MSG_CHECKING_Y` 2021-01-26 07:10:57 +01:00
3d-gussner 2d1e1e4cee Remove duplicate string `Fans check` using `MSG_FANS_CHECK` 2021-01-25 20:13:12 +01:00
3d-gussner d117a299f7 Remove duplicate string `Fil. runouts ` using `MSG_FIL_RUNOUTS` 2021-01-25 20:04:18 +01:00
3d-gussner 10bbd64b41 Remove duplicate string `Crash` using `MSG_CRASH`
Better Italian translation, thanks to @wavexx
Fix Polish translation as it was too long for the menue and caused LCD issues.
2021-01-25 18:53:53 +01:00
3d-gussner 4878db7365 Remove duplicate string `Last print failures` using `MSG_LAST_PRINT_FAILURES`
Fix too long translations in Spanish and Italian for this message
2021-01-25 18:38:35 +01:00
3d-gussner 99867c8fbd Remove duplicate string `Total failures` using `MSG_TOTAL_FAILURES` 2021-01-25 18:06:47 +01:00
3d-gussner 8f0a45e8a4 Remove duplicate string `Steel sheets` and `Total` using `MSG_STEEL_SHEETS` and `MSG_TOTAL` 2021-01-25 17:58:51 +01:00
3d-gussner 7222cf05cf Remove duplicate string `MMU Fails` and `MMU Load Fails` using `MSG_MMU_FAILS` and `MSG_MMU_LOAD_FAILS` 2021-01-25 17:38:36 +01:00
3d-gussner fbb3fad64b Remove duplicate string `Last print` using `MSG_LAST_PRINT` 2021-01-25 16:54:26 +01:00
3d-gussner 7891d12a32 Remove duplicate string `Is filament loaded?` using `MSG_FILAMENT_LOADED` 2021-01-25 16:44:55 +01:00
3d-gussner 223f32deae Remove duplicate string `HW Setup" using `MSG_HW_SETUP` 2021-01-25 16:15:57 +01:00
3d-gussner 5c1da227fe Merge branch 'codesize' of https://github.com/DRracer/Prusa-Firmware into DRracer_codesize 2021-01-25 16:00:46 +01:00
3d-gussner 377a59c624 Remove duplicate string `Belt status` 2021-01-25 15:53:31 +01:00
D.R.racer d8917a304a Reuse lcd_space() instead of in-place printing of spaces in a cycle
Saves another ~40B
2021-01-25 15:21:25 +01:00
D.R.racer 783e4bbaf9 Add lcd_putc_at (code down >150B), refactor lcd_selftest_screen_step
(RAM down 10B)
2021-01-25 14:58:57 +01:00
DRracer 3975415490
Merge branch 'MK3' into codesize 2021-01-25 12:43:30 +01:00
DRracer 58351fb27a
Merge pull request #2977 from DRracer/farm-patch1
Farmers' requests
2021-01-25 11:15:44 +01:00
D.R.racer 514321f2ce Remove farm_no completely + reuse prusa_stat_farm_number() where
applicable
2021-01-25 11:09:28 +01:00
D.R.racer c1ff6242b0 Avoid copying FW version number into RAM - use the PROGMEM string 2021-01-25 09:03:04 +01:00
Voinea Dragos 9fa9d6b063 Move farm strings to PROGMEM 2021-01-25 09:48:17 +02:00
D.R.racer 98a4da571d Merge branch 'farm-patch1' of github.com:DRracer/Prusa-Firmware into farm-patch1 2021-01-25 08:39:20 +01:00
D.R.racer 9bfada94f0 Remove commented code 2021-01-25 08:38:44 +01:00
Voinea Dragos 31a6270f69 Abuse \n in lcd printing instead of constantly calling other functions
"other functions" being lcd_set_cursor and lcd_print(char). Saves 100B of flash
2021-01-22 20:12:11 +02:00
Voinea Dragos 4d3f056b81 Fix factory reset menu rendering 2021-01-22 20:07:27 +02:00
Voinea Dragos 37c431abd9 another lcd_puts_at_P 2021-01-22 19:44:46 +02:00
D.R.racer 3ccd1b2b2b Refactor lcd_set_cursor + lcd_puts_P -> lcd_puts_at_P
saves considerable amount of flash
2021-01-22 18:34:47 +01:00
Voinea Dragos da21916473 Change printf_P without format arguments and NL to puts_P only 2021-01-22 18:56:05 +02:00
D.R.racer 9b34789398 Cleanup reset_menu() 2021-01-22 17:54:44 +01:00
D.R.racer c710253cca Code cleanup and size reduction and RAM optimization
Replase single character strings with single characters when calling
lcd_print
2021-01-22 17:11:51 +01:00
Voinea Dragos 9b847715ac Rename F0 to FRM on the status screen 2021-01-19 13:11:25 +02:00
Voinea Dragos 3f5cfc4e61 Move the change filament button to the main menu when farm printing
PFW-945
2021-01-19 13:06:23 +02:00
D.R.racer a9d8ddc89c Farmers' requests 1
- remove the UI and related stuff to setting a farm number (the
communication protocol must remain intact)
- remove confirmation after print finished ("Print OK")

Both requests are highly welcome, since they allow for lowering the code
size by >1KB

PFW-963, PFW-927
2021-01-19 09:58:02 +01:00
DRracer 4728bf2182
Merge pull request #2875 from wavexx/raise_while_preheating
Raise Z while preheating when auto/[un]loading the filament
2021-01-11 07:45:54 +01:00
DRracer ef51652e39
Merge pull request #1758 from wavexx/disable_filament_checks_in_extr_menu
Disable filament checks inside the Move -> Extruder menu
2021-01-11 07:42:25 +01:00
D.R.racer 8a083c9970 Add PVB preheat and 0.8mm nozzle presets
minor features reflecting the latest announcement

Needs some 300B of CPU flash though, after 3.9.3 we need to optimize code
size again.
2021-01-08 13:52:39 +01:00
DRracer 5c3513a6cc
Merge pull request #2397 from odaki/flashair_display_ip
Show the FlashAir IP address
2021-01-08 12:20:12 +01:00
DRracer 0ed6b537a8
Merge branch 'MK3' into MK3_3.9.3 2021-01-07 13:27:51 +01:00
3d-gussner 76eb743139 Set default SuperPINDA toggle on MK2.5/S to NO 2020-12-23 20:59:33 +01:00
3d-gussner 4b510fef0a Add PINDA_TEMP_COMP variable to enable SuperPINDA toggle menu/function 2020-12-23 20:59:08 +01:00
3d-gussner 732b6e0cad Cleanup 2020-12-23 20:58:20 +01:00
3d-gussner 62c36f718b Add SuperPINDA support for MK2.5/S
- Changed DETECT_SUPERPINDA to SUPERPINDA_SUPPORT as on miniRAMo the thermistor readings below 30°C
  aren't accurate egnough to determine if SUPERPINDA is connected or not
- Add LCD toggle menu Settings -> HW Setup -> SuperPINDA [Yes/No] to overwrite SuperPINDA detection
  - If EEPROM_PINDA_TEMP_COMPENSTATION is empty = 0xff then detect SuperPINDA by checking thermistor
  - If EEPROM_PINDA_TEMP_COMPENSTAION is 0 then forec enable for temperature compensation menues and functions
  - If EEPROM_PINDA_TEMP_COMPENSATION is 1 then force disable for temperature compensation menues and functions
2020-12-23 20:56:50 +01:00
Voinea Dragos f3953d7c83 Merge branch 'MK3' into MK3_random_patches 2020-11-16 09:11:12 +02:00
odaki c0070506fb Merge branch 'MK3' into flashair_display_ip 2020-11-13 22:28:22 +09:00
Alex Voinea 807eddafb0
Remove debugging code 2020-11-13 12:12:18 +02:00
Alex Voinea 43ace00a24
Fill the progress bar at the end and code optimizations 2020-11-12 18:43:48 +02:00
Alex Voinea 5ad125cbed
Merge branch 'MK3' into MK3_filecheck_progress_bar 2020-11-12 15:53:33 +02:00
Alex Voinea 4abf1f436a Gracefully dump the queue + fixes to fancheck 2020-11-09 21:49:56 +02:00
Yuri D'Elia 5f23474c95 Raise Z while preheating when auto/[un]loading the filament
Preheating already raised Z to avoid scorching the PEI sheet, as does
filament loading/unloading to allow for excess material to be removed.

However, when loading/autoloading/unloading via the LCD with a cold
nozzle the preheating menu is performed before the carriage is raised,
leaving the carriage close to the sheet while heating the nozzle.

Pre-raise the carriage already while waiting, so that the subsequent
move is automagically skipped.

Set bFilamentWaitingFlag only once to perform both the LCD
initialization and raising to the appropriate height.

Should fix #2761
2020-10-28 20:49:28 +01:00
MartinPoupa a84d7ef8d6 corectino of declaration 2020-10-13 16:56:57 +02:00
MartinPoupa c8c7563e8a LCD status changed
When the lcd status changed it will be printed "LCD status changed" to serial line.
2020-10-07 17:44:17 +02:00
odaki ebc987bd23 Merge branch 'MK3' into flashair_display_ip 2020-09-28 21:19:44 +09:00