Commit Graph

933 Commits (3aed994b9c5baab18a8eaab29deb960cc6c6d2d9)

Author SHA1 Message Date
D.R.racer 3aed994b9c UnloadFilament: update unit tests + LED signalization 2025-12-01 10:48:28 +01:00
D.R.racer e089be4ff8 UnloadToFinda: update unit tests 2025-12-01 10:48:28 +01:00
D.R.racer 9e3b300b2e Slow unload move at the start of pulling 2025-12-01 10:48:28 +01:00
D.R.racer 9c23658445 Remove RegisterFlags 2025-12-01 10:48:28 +01:00
D.R.racer 3d32c300a3 UnloadToFinda: prepare Idler and once fsensor turns off, stall pulling
Beware: behaviour breaking change, from now on non-reworked MK4 and MK3 cannot work with the MMU
because there is no way to turn off their fsensor and trigger the unload.

Hence the version bump to 3.0.4

But, on MMU-reworked MK4 and C1 this saves 2s per toolchange
2025-12-01 10:48:28 +01:00
D.R.racer f4388b8d20 ToolChange: don't disengage Idler after unload, but engage next slot immediately 2025-12-01 10:48:28 +01:00
D.R.racer 5d8fa524fb Registers: drop support for direct R/W memory. Use R/W functions instead. Saves 56B 2025-12-01 10:48:28 +01:00
D.R.racer 42cb40eeb9 Obey PulleySlowFeedrate in all operations 2025-12-01 10:48:28 +01:00
D.R.racer 06f41bf1e6 Idea: EngageIntermediate before unload and wait for signal 2025-12-01 10:48:28 +01:00
Guðni Már Gilbert b6bdd55def pulley: HomeBack state is never used
Also remove unused FinishHomingAndPlanMoveToParkPos.
2025-12-01 08:52:47 +01:00
Guðni Már Gilbert c1aa190d05 optimise GPIO read/write
Instead of performing a bitwise shift operation on every GPIO read/write. Do it at compile-time and use bit mask instead.

The pin number itself is not used anywhere.

The change saves 108 bytes of flash memory
2025-12-01 08:52:24 +01:00
3d-gussner 88a241c741
Merge pull request #354 from 3d-gussner/workflow_Ubuntu_2204
Force workflows to Ubuntu 22.04
2025-11-24 14:45:41 +01:00
3d-gussner 7a250c24db Force 22.04 2025-11-24 14:32:06 +01:00
Guðni Már Gilbert 39b24f8b43 PFW-1480 Process the Mode command 2025-11-05 14:50:26 +01:00
Guðni Már Gilbert 22a8f1df57 main: reduce duplicate code
Change in memory:
Flash: -36 bytes
SRAM: 0 bytes
2025-10-30 07:51:30 +01:00
Alex Voinea ceda1cce08 Optimize LUFA config for size 2025-10-30 07:45:38 +01:00
Alex Voinea 5e50516fe7 Use single banks for CDC 2025-10-30 07:45:38 +01:00
Alex Voinea 454619bfd4 USB manual PLL control 2025-10-30 07:45:38 +01:00
Guðni Már Gilbert f240bb24d1 idler: adjust distance threshold
Before, the axis limits had an error of 25° so 225° would actually be measured as 250°.

Now after fixing axisUnitToTruncatedUnit to return a more accurate value, the new values are lower. Adjust the distances by 20° to offset previous error.
2025-10-30 07:43:35 +01:00
Guðni Már Gilbert b00ac883c4 tests: homing: improve SimulateIdlerHoming
Add handling for HomingFailed which can cause the tests
to timeout.

Add checks for HomeForward and HomeBack
2025-10-30 07:43:35 +01:00
Guðni Már Gilbert 9e44c06f1e tests: homing: cleanup SimulateFailedHomeFirstTime
We never home Idler and Selector at the same time. I think we did early perhaps, but now the selector always waits
for the idler homing to be valid.
2025-10-30 07:43:35 +01:00
Guðni Már Gilbert e9889ec066 tests: load_filament: idler homing is not invalidated
The idler is only put on hold, and resumed after a user event is seen.

We must ensure the idler is engaged before feeding to FINDA.
2025-10-30 07:43:35 +01:00
Guðni Már Gilbert 4e4e2df739 Improve accuracy in axisUnitToTruncatedUnit
When converting 800mm/s2, it would be truncated to 795mm/s2 for the pulley. This is due to cutting out significant decimal digits.

Instead let's multiply in floating point, this needs quite a bit of resources. So to optimise against this, multiply with the recoprical. Then the cost is not more than 20 bytes.

Testing:
M707 A0x0e; Read Pulley Acceleration (default at boot up is 800mm/s2)
M708 A0x0e X790 ; Set Pulley Acceleration to 790mm/s2
M707 A0x0e; Read Pulley Acceleration (should be 790mm/s2)

The results before this commit:

M707 A0x0e -> returns 805
M708 A0x0e X790 ; Set Pulley Acceleration to 790mm/s2
M707 A0x0e; returns 795

After this commit:

M707 A0x0e -> returns 799
M708 A0x0e X790 ; Set Pulley Acceleration to 790mm/s2
M707 A0x0e; returns 789

NOTE:
axisUnitToTruncatedUnit is used in Idler homing, selector homing, and pulley positioning. I am not sure yet how this improvement will affect those areas.
2025-10-30 07:43:35 +01:00
Guðni Már Gilbert b8ed9abc7f registers: fix unit of acceleration values
When reading or setting the value, the driver is expecting steps_t which is a axis scaled value.

This increases the memory footprint quite a bit. But now if you set 800mm/s2, you should get a similar value back.

Flash: +132 bytes
SRAM: 0 bytes
2025-10-30 07:43:35 +01:00
gudnimg e28ab28824 registers: support writing axis acceleration value
The read operation now returns the actual used value instead of the maximum allowed acceleration value.

Change in memory:
Flash: + 78 bytes
SRAM: 0 bytes
2025-10-30 07:43:35 +01:00
3d-gussner 255dc8726a
Merge pull request #349 from 3d-gussner/MMU_fix_actions
Update actions to v4 as some older are deprecated
2025-02-14 09:08:45 +01:00
3d-gussner b23d6827a7 Update actions to v4 as some older are deprecated 2025-02-14 06:16:22 +01:00
Guðni Már Gilbert dc68b70cff idler: reduce duplicate code
Change in memory:
Flash: 54 bytes
SRAM: 0 bytes
2025-01-02 11:30:35 +01:00
Guðni Már Gilbert 0eeef4cafd registers: remove obsolete comment
The registers were moved into program memory in FW 3.0.1

See for reference the relevant pull request:
https://github.com/prusa3d/Prusa-Firmware-MMU/pull/287
2024-12-25 10:25:00 +00:00
Guðni Már Gilbert 4ab07d627a optimisation: compare uint16_t against uint16_t
AxisDistance returns uint16_t type and is currently compared with long double axis length. The axis lengths fit easily into uint16_t:

selectorLimits.lenght = 75
idlerLimits.lenght = 225

Change in memory:
Flash: -122 bytes
SRAM: 0 bytes
2024-12-24 13:44:55 +00:00
Guðni Már Gilbert 0a205e41ff optimisation: set enum types explictly to uint8_t
This commit produces the same savings as the compiler options -fshort-enums. Except by setting the types manually we save also 2 bytes of SRAM.

By default, the enum type is 2 bytes, with we can explictly set it to one byte when applicable to reduce code size.

Almost all the savings from from 'enum Mode' in leds.h.

Change in memory:
Flash: -116 bytes
SRAM: -2 bytes
2024-12-24 13:39:41 +00:00
3d-gussner 3c8663d900
Merge pull request #324 from gudnimg/upgrade-ninja-mmu
Upgrade ninja from 1.10.2 to 1.12.1
2024-12-24 06:31:48 +01:00
gudnimg 195aad9cf0 tests: fix -Wparentheses in Github CI
warning: suggest parentheses around comparison in operand of ‘==’ [-Wparentheses]
2024-12-24 00:14:59 +00:00
Guðni Már Gilbert e7abc6a7d8 Upgrade ninja from 1.10.2 to 1.12.1
The update brings better support for Windows :)

Changelogs:
* https://github.com/ninja-build/ninja/releases/tag/v1.12.1
* https://github.com/ninja-build/ninja/releases/tag/v1.12.0
* https://github.com/ninja-build/ninja/releases/tag/v1.11.1
* https://github.com/ninja-build/ninja/releases/tag/v1.11.0
2024-12-23 19:17:33 +01:00
Guðni Már Gilbert 32d5f3b4be bootstrap: fix DeprecationWarning
DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.

See:
https://docs.python.org/3.12/library/tarfile.html#tarfile-extraction-filter
2024-12-23 19:17:33 +01:00
gudnimg ca1d09ad15 CI: fix an issue with write permissions
Also split the tests into a separate workflow file

Note that the changes won't take effect until this is merged
into main branch.
2024-12-23 17:41:49 +00:00
3d-gussner 89d3c6fc47
Change to newer upload-articatct verion v4 2024-12-23 12:15:23 +01:00
D.R.racer 75570a82ff Bump version to 3.0.3 2024-03-29 09:00:55 +01:00
Alex Voinea 3cd341f95f Update comment to reflect changes 2024-03-15 14:09:55 +01:00
Alex Voinea 5d0f772270 Move the version information after the ISR vectors 2024-03-15 14:09:55 +01:00
Alex Voinea 3ee1e22e9a Make the size of the code properly include the version information 2024-03-15 14:09:55 +01:00
Alex Voinea ef23490a49 Add version information at the end of flash 2024-03-15 14:09:55 +01:00
3d-gussner 08171415ca
Merge pull request #321 from vintagepc/main
Autorelease workflow... take 3
2024-03-15 07:52:43 +01:00
VintagePC 5ed48aee0b ... apparently I'm blind? 2024-03-14 17:39:42 -04:00
3d-gussner 00fd54f7a4
Merge pull request #320 from prusa3d/vintagepc/fix-workflow-bug
Update build.yml
2024-03-13 14:08:48 +01:00
3d-gussner e14175d9cd
Merge pull request #318 from 3d-gussner/MMU__Stale_action_V9
Update stale action to v9 as Node.js 16 are deprecated.
2024-03-13 14:03:14 +01:00
vintagepc 2933737b3b
Update build.yml
Fix workflow trigger issue
2024-03-11 08:33:02 -04:00
3d-gussner 878c763878
Merge pull request #317 from prusa3d/vintagepc/autopublish-releases
Add automatic release publishing to GitHub Actions
2024-03-08 14:11:45 +01:00
3d-gussner 6ca0d650da Update add-pr-comment to version v2.8.2 2024-03-08 13:13:22 +01:00
3d-gussner df97d70d8e Update stale action to v9 as Node.js 16 are deprecated. 2024-03-08 13:04:17 +01:00