For remote hosts, when the timer is stopped, then also save the statistics.
Slightly refactored save_statistics function by removing the parameters.
The function parameters are always the same.
Change in memory:
Flash: -40 bytes
SRAM: 0 bytes
I changed the code a bit so it would compile
in Prusa Firmware.
The paused duration is no longer included in the
print time statistics.
Change in memory:
Flash: -122 bytes
SRAM: 0 bytes
When a SD file is selected to print
save the DOS 8.3 extension into EEPROM.
After a power outage, the correct file extension is then
selected instead of always assuming it's ".gco"
This allows users to recover ".g" files.
Change in memory:
Flash: +104 bytes
SRAM: 0 bytes
There is no need to restrict how often the message is rendered.
It was being restricted to render every 1 second. We don't do
this for most of the static menus. So I propose this 1 second period
be removed.
Tested on MK3S+
Change in memory:
Flash: -168 bytes
SRAM: -8 bytes
lcd_calibration_menu: Remove redundant if (!isPrintPaused). The menu
is never called unless this condition is true.
eeprom_switch_to_next_sheet: Don't show this menu if the printer
is busy doing work!
Do not allow these menus to run while a print is paused or
when we're recovering a print:
- Preload to MMU
- Load to Nozzle
- Unload filament
- Eject from MMU
- Cut filament
- Autoload filament
- Settings
- Calibration
There is a bug where if the printer is recovering a print, it run a
blocking loop to restore the extruder and bed temperatures.
But if a Fan error is triggered in this loop, then the user can't
abort the print via LCD.
If the fan error resolves on its own the 'Resume print' menu will
appear in a few seconds. But if not, then the user can't resume the print
(which is normal). But with the bug above the user can't abort the print either!
The problem is essentially isPrintPaused variable is cleared too early.
We should wait until the print is completely restored first.
Steps to reproduce:
1. Start a print
2. Pause the print
3. Wait for extruder temperature to fall at lest 180°C
4. Click 'Resume' print
5. While heating, stop the hotend fan and wait for a few seconds until an error is raised
6. Observe issue => 'Stop print' menu item is gone!
PFW-1542
There is no problem with opening the menu during first layer
calibration. Removing this condition simplifies the code a little bit.
Change in memory:
Flash: -8 bytes
SRAM: 0 bytes
Drop the ALPHA/BETA/custom version handling. Set the version string and
firmware date based on the current tree description which has all the
required details.
Allow to override the repository information via cmake.
Use a truncated commit hash to set the internal commit number for
compatibility.
Rebase and fix issues
This fixes the undefined _T(label) reference, at the expense of a few
extra bytes.
I would argue this is worth the cost for the ability to check
translation references for the future. The warning happens because
`lang-check` cannot check a reference which is not _directly_ a catalog
entry.
We could introduce a method to suppress this warning (either a new macro
or some ///IGNORE comment), but that would mean that the additional
translation check is completely bypassed, defeating the purpose.
We can't clear eFilamentAction in every case in mFilamentItem()
mFilamentItem() can trigger a call to M701 and M702 e.g. for Autoloading
and eFilamentAction must be cleared by the gcode to prevent
the user from triggering another Autoload (which will crashe the FW)
The same applies to submenus. Now the MMU submenus clear eFilamentAction
only when the action is done.
For MMU Unload Filament item, eFilamentAction is only cleared after
the unload_filament() call is done running. This fixes an issue where
the menu item can be selected again while the first unload is still
running.