Allow to set the source epoch of the build with
PROJECT_VERSION_TIMESTAMP.
When unset fetch the commit timestamp of the current HEAD automatically
instead of leaving the source as 0.
We have no use for this on the MMU, but it doesn't hurt to follow what
we do on the MK3.
It looks like copying the RegisterRec into a local variable (as it has been here before)
seems to confuse the compiler which then refuses to optimize the calls.
With this simple tweak the code is actually 8B shorter than before (while retaining the saved ~170B of RAM)
- Improve count() for non-power-of-two sizes by handling wrap-around
- Improve full() to use always use count(), which is cheaper in both
scenarios now
This test ejects slots 0 to 4 and goes through the state machine
without creating any errors like FINDA_FLICKERS.
It also verifies the selector parking position is correct for each
ejected filament slot.
Waiting for the selector to return to the parked position after homing
is not enforced by the firmware and should therefore not be enforced by
the unit tests. There are some few exceptions to this, and for those
situations I added a parameter to SimulateSelectorHoming() called
waitForParkedPosition to explicitly wait for the selector to return to
the parked position if set to true. This is very useful when setting up
test cases in general and also allows us to control the behavior in each
test.
Delay reporting the cut command finished until the selector has returned
back to the cutting slot. This was done by adding ProgressCode::Homing
to the Cut Filament state machine. ProgressCode::ReturningSelector is
then used to wait for the selector to return back to the cut slot after
homing becomes valid again. Only then is the cut operation reported
finished and a new command can be processed e.g. Toolchange.
Change in memory:
Flash: +16 bytes
SRAM: 0 bytes
retract.Reset takes care of setting the green LED to blink.
Might as well turn of the red LED during reset just in case.
Change in memory:
Flash: -30 bytes
SRAM: 0 bytes
Fix a minor issue where once the FILAMENT_EJECTED error screen
is shown on the MK3S+, the LEDs will stay blinking red even after
the user has removed the filament and clicked "Done".
My proposal is to turn the LED off.
Steps to reproduce:
1. Boot up printer and MMU in a clean state
2. MK3S+: on the LCD click "Load to Nozzle"
3. Once the loading is done, click "Unload filament"
4. Once unloading is done, click "Eject filament"
5. FILAMENT_EJECTED MMU error screen appears on the printer's UI
6. Remove the filament and select "Done".
* Expected behavior: Blinking red LED turns off (or goes green).
* Actual behavior: LED continous to blink red with no error screen.
Change in memory:
Flash: +16 bytes
SRAM: 0 bytes
static_assert(sizeof(ChopConfU::S) == 4) would return 5 == 4
static_assert(sizeof(ChopConfU) == 4); would return 8 == 4
using uint32_t on all types instead of uint8_t fixes the issue
No change in memory