Commit Graph

72 Commits

Author SHA1 Message Date
Guðni Már Gilbert 7e025894d1 Echo the result onto serial
Example:
MMU2:1111111111111110011
1 means filament present (solid block)
0 means otherwise (dash)

Change in memory:
Flash: +94 bytes
SRAM: 0 bytes
2023-07-27 16:44:34 +00:00
Guðni Már Gilbert 20c6a448fa PFW-1504 Don't clear Status line on Deinit
Status line code should decide what to render next

Change in memory:
Flash: -12 bytes
SRAM: 0 bytes
2023-07-27 16:44:34 +00:00
Guðni Már Gilbert 63775dfabb PFW-1504 fix conflicting UI issues
Proposal to fix some of the issues with the initial implementation
it is safer to use the status line code to print the message so
there aren't any conflicts in the LCD cursor position.

Allow inserting a byte into any position in the LCD status message

Also, add a variable to control from which index in the array
should the message start printing. This is very useful for progress
bars and messages which continually update. I think we can save some
memory by applying this to Mesh Bed Leveling later.

Change in memory:
Flash: +106 bytes
SRAM: +1 byte
2023-07-27 16:44:34 +00:00
Guðni Már Gilbert 02676fc888 Limit scope of is_mmu_error_monitor_active
Move the variable to mmu2_reporting

Change in memory:
Flash: -6 bytes
SRAM: 0 bytes
2023-05-22 08:04:22 +02:00
Guðni Már Gilbert f34c1ffeac
Fix an issue where visualisation is overwritten by SD file name
We should let EndReport set the custom message type state to Status
This will ensure the SD file name is shown correctly AFTER we've shown
the visualisation

Currently the visualisation is cut off in the middle by ReportProgressHook

Change in memory:
Flash: -6 bytes
SRAM: 0 bytes
2023-04-14 09:32:41 +02:00
Guðni Már Gilbert 4b3dc65598
Don't always set MSG_WELCOME at end of toolchange
This should only be set when NOT printing

Change in memory:
Flash: +8 bytes
SRAM: 0 bytes
2023-04-14 09:32:41 +02:00
Alex Voinea 10ba758bf7
Fix menu encoder rotation 2023-04-06 21:35:30 +02:00
Guðni Már Gilbert d89e6de040 Update lcd_encoder in lcd_update
This fixes the spurious feedback when rotating the knob
because lcd_update is called much often than the interval
at which the lcd rendering is updated

Change in memory
Flash: -88 bytes
SRAM: -9 bytes
2023-04-05 10:30:59 +02:00
Guðni Már Gilbert 0cac7612db optimisation: Always make sound when knob is clicked or rotated
This commit adds the ability for firmware to make sounds when the
knob is clicked or rotated, when LCD updates are disabled.

The improvement here is the sound is being made with one line of code
whether or not LCD updates are enabled or disabled.

Change in memory:
Flash: -24 bytes
SRAM: 0 bytes
2023-04-05 10:30:59 +02:00
3d-gussner 4cf46893fc Revert "Fix a few ambiguous overloaded calls"
This reverts commit b7c42e83cf.
2023-04-04 16:12:41 +02:00
Guðni Már Gilbert b7c42e83cf Fix a few ambiguous overloaded calls
Noticed this when exploring another optimisation

By specification exactly which overloaded function to use
we save some memory

Seems to have something to do with doing arithmetic in the function argument

Change in memory:
Flash: -156 bytes
SRAM: 0 bytes
2023-04-04 15:03:48 +02:00
Guðni Már Gilbert e2b58d8724 Don't translate the more button 2023-03-19 16:50:42 +00:00
3d-gussner 8b49d241d2 revert BTN_MORE non-translated 2023-03-15 07:03:41 +01:00
3d-gussner 235c4ae943 Do not `MSG_BTN_MORE` translate 2023-03-14 08:26:39 +01:00
Guðni Már Gilbert f2157c6f1d Fixup
We're always setting the cursor position when rendering now

Saves 8 bytes of flash
2023-03-13 06:47:08 +01:00
Guðni Már Gilbert c518bfdb73 PFW-1504 Set cursor position each time to be safe
Change in memory:
Flash: +18 bytes
SRAM: 0 bytes
2023-03-13 06:47:08 +01:00
Guðni Már Gilbert 73c76579af PFW-1504 Add init for progress bar
In case we are running a retry, the firmware
should clear the old rendering before
starting on a new one

Change in memory:
Flash: +6 bytes
SRAM: 0 bytes
2023-03-13 06:47:08 +01:00
Guðni Már Gilbert bbfc4b9f78 PFW-1504 initial commit
Change in memory:
Flash: +162 bytes
SRAM: 0 bytes
2023-03-13 06:47:08 +01:00
D.R.racer 98e7c15928 Change Eject filament -> Eject from MMU
PFW-1497
2023-02-18 17:39:30 +01:00
Guðni Már Gilbert 504099bd6c optimisation: reduce code size in rendering cursor
Change in memory:
Flash: -62 bytes
SRAM: 0 bytes
2023-02-11 19:06:14 +01:00
Guðni Már Gilbert 96fc90c80b Revert a change in the MMU error screen logic
We can pull this code into a common function in a separate PR
2023-02-11 15:54:33 +01:00
Guðni Már Gilbert 8db2fbc97f Improve sound handling for MMU error screen
Change in memory:
Flash: -174 bytes
SRAM: +4 bytes
2023-02-11 15:54:33 +01:00
Guðni Már Gilbert e597be2cb5 PFW-1381 Optimise initialisation
Change in memory:
Flash: -2 bytes
SRAM: -1 byte
2023-01-31 10:02:15 +01:00
Guðni Már Gilbert a35e7d543f Fix bug with button choice on MMU error screen isn't reset
PFW-1381
2023-01-31 10:02:15 +01:00
D.R.racer 0555376502 Refactor mmu2.cpp and related interfaces
The general idea is to keep platform specific implementation away from the MMU state machines as much as we can.
That would enable unit testing the top level MMU state machine and integration into other project as well (if needed).
2023-01-31 09:35:22 +01:00
D.R.racer 3d9dd08c16 Change MMU error links to a new url
PFW-1473
2023-01-02 12:43:08 +01:00
D.R.racer a666c0f6f4 Optimize rendering MMU Error sensor line
CPUFLASH: -32B
2022-11-25 13:30:53 +01:00
D.R.racer adb24cd410 Increment errors in ReportError 2022-11-20 17:27:36 +01:00
D.R.racer 4eaabbf092 Revive MMU stats + LCD screens 2022-11-20 17:27:36 +01:00
D.R.racer 414d3f1c12 Display Welcome message after MMU progress report ends
Should make the status line look cleaner when the printer is not printing.
2022-11-18 14:09:48 +01:00
3d-gussner 7c009cadb8 Bump up Revision to ALPHA1 6051
Temporary fix for MSG_BTN_MORE
pre-release pot and po update
2022-11-04 10:21:39 +01:00
Guðni Már Gilbert 7bc7f21fa5 mmu: move RetryIfPossible outside the error screen
This fixes issue where 'retryAttempts=3' may be spammed in the logs

Change in memory:
Flash: 0 bytes
SRAM: 0 bytes
2022-11-01 06:22:39 +01:00
3d-gussner d5ca47d1a6
Merge pull request #3646 from gudnimg/fix-mmu-buttons-v2
PFW-1403 Fix issue where physical MMU buttons do not dismiss error screen
2022-10-11 13:42:39 +02:00
Guðni Már Gilbert 33690b927a PFW-1403 Fix issue where physical MMU buttons do not dismiss error screen 2022-10-08 08:51:32 +00:00
Guðni Már Gilbert 8f0de44d84 PFW-1358 Move 'More' button to the corner of the screen
Make 'More' button position consistent with 3-button screen.
2022-10-08 08:50:40 +00:00
Guðni Már Gilbert 7264391c5f PFW-1358 Fix and optimise button choice positions 2022-10-08 08:50:40 +00:00
Guðni Már Gilbert 9046fb3d44 PFW-1358 Adjust positions of button choices 2022-10-08 08:50:39 +00:00
Yuri D'Elia c7b6b9a99b cleanup: Suppress unused argument warnings 2022-09-30 15:08:11 +02:00
Yuri D'Elia 398a4bf403 cleanup: Do not return const values from functions
This generates a warning under -Wextra, since in most cases a const
value doesn't prevent buggy code (as copies are allowed) while
preventing some optimizations (such as move operations) to take place.
2022-09-30 12:55:47 +02:00
3d-gussner 770fdcd83b Fix typo, thanks to @gudnimg 2022-09-19 08:02:40 +02:00
3d-gussner 0f8d84082a Update button menu documentation as there are 1/2/3 options 2022-09-16 19:11:11 +02:00
Guðni Már Gilbert 0889109760 Fix corrupted chars in "Engaging Idler" message 2022-09-16 10:22:38 +02:00
Guðni Már Gilbert 400fec5d9f Reset CustomMsg when Command in progress is None
When a Progress report is started, we set the CustomMsg to MMUProgress.

But there was an issue where, once the reported "Progress" action was done.
We did not reset the CustomMsg to Status. So if we are printing from the
SD card, the file name is not displayed on the LCD.
2022-09-16 10:22:38 +02:00
VintagePC 69c39e2281 An attempt at fixing the retry. Discussion needed. 2022-09-16 10:22:38 +02:00
D.R.racer c412f062c8 Perform 3xRetry automatically
This is a draft PR showing the potential 3x retry implementation on the printer's side.
It is much less code and looks more reliable than the same functionality in the MMU FW.

Still, more work needs to be done:
- [ ] Button is sent to the MMU even before returning from the parking position
- [ ] Then the button is sent again
- [ ] Then the printer runs out of retryAttempts

We need to find a better spot to check for "automatic" retry and issuing of the buttons
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert ace5130d9f PFW-1375 MMU error reported by MK3S does not appear on LCD 2022-09-16 10:22:38 +02:00
Guðni Már Gilbert 4dd689ba9a Fix PFW-1357 (#35)
lcd_encoder_diff would be set to 0 if lcd_update_enable(true)
is called outside ReportErrorHookMonitor
This would put enc_dif out of sync with lcd_encoder_diff and could cause false rotation triggering
2022-09-16 10:22:38 +02:00
D.R.racer f94c2cba46 Fix rendering temp. + toolchange on MMU error screen 2022-09-16 10:22:38 +02:00
VintagePC 4ea53ad4bf fix bug I introduced 2022-09-16 10:22:38 +02:00
VintagePC 9a20c85a5d First pass, improving the error recovery. 2022-09-16 10:22:38 +02:00