Commit Graph

455 Commits (8b6911fae875c72aa9cd02ade14cce576f592931)

Author SHA1 Message Date
3d-gussner 8b6911fae8 Use config.h 2021-09-29 19:52:35 +02:00
3d-gussner 3d7a558483 After Load Filament is compeleted the slot LED should be off 2021-09-29 18:59:14 +02:00
3d-gussner e8660be060 Use config.h to define DEBUGS 2021-09-29 18:58:30 +02:00
3d-gussner 9524a95218 Make search for error codes easier 2021-09-29 13:35:38 +02:00
D.R.racer 972f3721ba Add finer filament loaded states and improve unit tests
We need to know better where the filament is, a simple "filament loaded true/false"
does not correspond to the reality.
2021-09-29 13:30:11 +02:00
D.R.racer 8a1c933340 LoadFilament should not set filament loaded (surprisingly)
because of the change of semantics of LoadFilament operation.
LoadFilament pushes the filament into FINDA and then retracts it back just to keep the
filament ready to be grabbed by the idler and pulley and loaded into the printer's nozzle.

So the selector is not blocked by the filament -> filament NOT loaded
2021-09-29 13:30:11 +02:00
D.R.racer 8040f77e26 Fix debug sprintf variant 2021-09-29 13:30:11 +02:00
D.R.racer ef74abb3b5 Introduce checking for enabled/disabled Pulley axis in unit tests 2021-09-29 13:30:11 +02:00
D.R.racer 40c260153b Fix PROGMEM addressing in debug.h
I hate when the compiler doesn't check something what it normally does:
`pgm_read_byte` is more than happy with a parameter (*str), which reads
an address at a location where *str points to - which is obviously not the intent.
2021-09-29 13:30:11 +02:00
D.R.racer ef962b81cd Use dbg_logic logging
and improve the variadic version used to print formatted
text at some spots in previous commits
2021-09-29 13:30:11 +02:00
D.R.racer fce9663156 Fix CutFilament unit tests 2021-09-29 13:30:11 +02:00
D.R.racer d7f2be706e Fix ToolChange operation + unit tests 2021-09-29 13:30:11 +02:00
D.R.racer f7788f3a60 Explain better final Idler state in FeedToFinda and FeedToBondtech 2021-09-29 13:30:11 +02:00
D.R.racer c6010456f7 Extract common ErrDisengagingIdler state's implementation 2021-09-29 13:30:11 +02:00
D.R.racer 53e48e0705 Change the semantics of load filament
Load filament performs feed to FINDA and retract:
- engage idler
- feed normal to FINDA with config::feedToFinda distance until FINDA triggers
- retract normal and as soon FINDA un-triggers move back to PTFE config::cuttingEdgeToFindaMidpoint
- disengage the idler

That implied introducing another substate machine - RetractFromFinda, which does the opposite
of FeedToFinda while also checking for the FINDA switching off while retracting filament.

Still, ToolChange and CutFilament need fixing with this change
2021-09-29 13:30:11 +02:00
D.R.racer 4543919cea Fix Feed To Bondtech unit tests (disengage idler after success) 2021-09-29 13:30:11 +02:00
D.R.racer ef880ca679 Fix Feed To Bondtech tests tags 2021-09-29 13:30:11 +02:00
D.R.racer 0bc4a12abb Fix startup conditions for Unload to FINDA state machine tests 2021-09-29 13:30:11 +02:00
D.R.racer d9fba89822 Fix test_unload_filament
only green LED status was not correct after the latest changes
2021-09-29 13:30:11 +02:00
D.R.racer df5b64da37 Fix test_failing_tmc 2021-09-29 13:30:11 +02:00
D.R.racer 795d41b9d7 Reformat helpers.ipp - makes placing breakpoint easier 2021-09-29 13:30:11 +02:00
D.R.racer dfea30aabf Remove redundant ::Color and ::Mode for LED colors and modes
makes the code shorter and more readable, no identifier clashes revealed
2021-09-29 13:30:11 +02:00
D.R.racer 780ccf35a8 Keep constants start with lowercase letter
and remove a few warnings from the build
2021-09-29 13:30:11 +02:00
D.R.racer 8f35f40c13 Fix format config.h 2021-09-29 13:30:11 +02:00
3d-gussner e6ff954350 clang-format 2021-09-29 13:30:11 +02:00
3d-gussner c34615aadd Fix unit test feed to finda 2021-09-29 13:30:11 +02:00
3d-gussner 8254f222b3 Add DEBUG_LOGIC 2021-09-29 13:30:11 +02:00
3d-gussner 7860a6066a Fix some LED status 2021-09-29 13:30:11 +02:00
3d-gussner d1353fd373 Use constants 2021-09-29 13:30:11 +02:00
3d-gussner 0be9e37759 Use constants 2021-09-29 13:30:11 +02:00
3d-gussner 28fa8481c1 Use constants 2021-09-29 13:30:11 +02:00
3d-gussner 6c01027752 Use constants 2021-09-29 13:30:11 +02:00
3d-gussner be5ed1ece8 Add UnloadingToFinda 2021-09-29 13:30:11 +02:00
3d-gussner 3544a86de6 Use constants 2021-09-29 13:30:11 +02:00
3d-gussner 22ede0969e Use constants 2021-09-29 13:30:11 +02:00
3d-gussner 084ee66b5d Add some distances and put axis settings together 2021-09-29 13:30:11 +02:00
D.R.racer 1a5cd52d58 Fix some doxygen comments 2021-09-29 13:28:34 +02:00
D.R.racer 1402fb3dd6 Add 'F' and 'f' decoding + unit tests where necessary 2021-09-29 13:28:34 +02:00
D.R.racer 4900dd0222 Change FilamentSensor msg code from 'F' to 'f'
to avoid clash with Filament Type msg (which is not handled yet)
2021-09-29 13:28:34 +02:00
D.R.racer e277ca75ee Support F0 in response decoder 2021-09-29 13:28:34 +02:00
D.R.racer dc3f5764a6 Add filament sensor status reporting from printer into MMU 2021-09-29 13:28:34 +02:00
D.R.racer e59e7e3884 Make protocol decoder tolerant to leading whitespace 2021-09-29 13:28:34 +02:00
D.R.racer ee353cd98c Report "Reset finished" after MMU FW start
kudos to @leptun for this original and actually a very clean idea.

For the start we report "Reset finished" which in fact corresponds with the MMU state pretty closely
and plays nicely even with the protocol implementation.
And, since the default startup command is the noCommand, which always returns "Finished"
the implementation is clean and straightforward - the response to the first Q0 messages
will look like "X0 F" until a command (T, L, U ...) has been issued.
2021-09-29 13:28:34 +02:00
D.R.racer 89dcafbcef Add internal protocol decoding reset 2021-09-29 13:28:34 +02:00
D.R.racer 8a5614844c Add more error codes for the printer's perspective 2021-09-29 13:28:34 +02:00
D.R.racer 43c953b7f1 Fix appending newline character in puts* methods 2021-09-27 11:15:20 +02:00
D.R.racer 304988fc6c Simple debug logging via USART1
Encapsulates the #define macros and AVR implementation of dumping strings
(RAM and PROGMEM) onto USART1.
2021-09-27 11:15:20 +02:00
DRracer 011b8cae33
Merge pull request #115 from DRracer/lufa-cmake
🚧 Add cmake project for LUFA
2021-09-23 13:47:17 +02:00
D.R.racer 57a3cfa109 Fix formatting 2021-09-23 13:43:18 +02:00
D.R.racer c896031a62 Merge branch 'lufa-cmake' of github.com:DRracer/Prusa-Firmware-MMU-Private into lufa-cmake 2021-09-23 13:40:34 +02:00