Commit Graph

91 Commits

Author SHA1 Message Date
Guðni Már Gilbert 82e0124cb4 mmu: remove isErrorScreenRunning()
No change in memory
2023-10-19 18:32:42 +00:00
Guðni Már Gilbert ef33db9a71 mmu: add DisableMMUInSettings
power_on should not be modifying
EEPROM_MMU_ENABLED. The code is never
executed unless it's already been set.

Only disable EEPROM_MMU_ENABLED through Buttons::DisableMMU

Change in memory:
Flash: -18 bytes
SRAM: 0 bytes
2023-10-19 18:32:42 +00:00
Guðni Már Gilbert 12a3051c50 mmu: Add CheckErrorScreenUserInput
Due to differences in 8-bit FW I had to implement two new get functions

* GetCommandInProgress
* GetLastErrorCode
2023-10-19 18:32:41 +00:00
Alex Voinea 100a8e3b33 Dynamic characters initial
Fix more hardcoded characters

Finally optimize the lcd printf with custom characters

FontGen.py script

Add arguments and action

Fix build

Fix conflicts
2023-10-03 08:19:48 +02:00
gudnimg 4134bf4f40 8-bit proposed changes
The status line code is not nice, but we need to work around it
so the status line rendering works correctly

This commit mostly reapplies the code
from 3.13.2

Also fixes compiler warnings
2023-09-18 10:51:32 +02:00
D.R.racer a02ff0651c Return try-load reporting to serial 2023-09-18 10:51:32 +02:00
D.R.racer 9b48ab729a Sync MK3<->MK4 MMU2 TryLoadUnloadReporter 2023-09-18 10:51:32 +02:00
D.R.racer 075858c9fa Sync MK3<->MK4 MMU2 reporting 2023-09-18 10:51:32 +02:00
D.R.racer b4b0bba11c Sync MK3<->MK4 MMU2 marlin interface 2023-09-18 10:51:32 +02:00
D.R.racer ec4740fe53 Clean-up ProgressCodes and ErrorCodes parameters throughout the code 2023-09-18 10:51:32 +02:00
3d-gussner 47775e158b Reuse messages 2023-08-21 19:00:22 +02:00
3d-gussner 0bbec5626c Update and fix translations 2023-08-21 16:28:36 +02:00
Guðni Már Gilbert 3766aadd99 PFW-1530 rename isErrorScreenSleeping to TuneMenuEntered 2023-08-14 09:34:55 +02:00
Guðni Már Gilbert 92b3a2443e PFW-1530 Remove typedef keyword 2023-08-14 09:34:55 +02:00
Guðni Már Gilbert 03ed675732 PFW-1530 cleanup: remove redundant uint8_t cast 2023-08-14 09:34:55 +02:00
Guðni Már Gilbert f0a48b11f7 PFW-1530 Refactor the menu to be non-blocking
The UI works much smoother now

Saves ~60 bytes of flash
2023-08-14 09:34:55 +02:00
Guðni Már Gilbert 1cda696e14 PFW-1530 Add Tune to Selector screen and more
- Rename "Idler" to "Sensitivity"
- Implement ReadRegisterInner() as a way to read register in blocking contexts such as manage_response()
This allows us to show the current EEPROM value on the printer's LCD
2023-08-14 09:34:55 +02:00
Guðni Már Gilbert d0f18b6fbc PFW-1530 Minor optimisation
Change in memory:
Flash: -8 bytes
SRAM: 0 bytes
2023-08-14 09:34:55 +02:00
Guðni Már Gilbert 5f60eaff85 PFW-1530 Initial prototype
Add a 'Tune' option to HOMING_IDLER_FAILED error

This will open a menu which allows
the user to change the stallguard threshold
from the MMU error screen

Change in memory:
Flash: +334 bytes
SRAM: +1 byte
2023-08-14 09:34:55 +02:00
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