Guðni Már Gilbert
e064d2dbb4
Fix test failed_load_to_finda_0-4_try_again
...
- Homing is invalidated on error, re-home
- Pulley motors needs to be enabled in test when feeding to finda
If there is no error afterwards, there is no need to re-home
2022-12-17 15:45:58 +00:00
Guðni Már Gilbert
6223613167
If finda is ever pressed, don't move selector.
...
I moved the check higher.
This triggered a FINDA FLICKER failure in Load_filament.cpp
Now the test covers it :) (Didn't before)
2022-12-17 15:18:42 +00:00
Guðni Már Gilbert
eaa89aebaa
Small fix in ToolChange::Reset
2022-12-17 14:38:00 +00:00
Guðni Már Gilbert
50a4011f06
If Finda is not pressed, don't report Unload Manually error
2022-12-17 13:31:27 +00:00
Guðni Már Gilbert
dcdadac6d7
Add unit tests
2022-12-17 13:23:04 +00:00
Guðni Már Gilbert
496917ba8d
PFW-1423 add Retry handling in NoCommand for init error
2022-12-17 13:23:04 +00:00
Guðni Már Gilbert
7fe81be707
Fix FINDA flicker tests
2022-12-17 13:16:19 +00:00
Guðni Már Gilbert
27f28973d3
Fix failed_load_to_finda_0-4_resolve_manual_no_FINDA unit test
2022-12-11 16:33:52 +00:00
Guðni Már Gilbert
06d15c2cea
Fix failed_load_to_finda_0-4_resolve_manual unit test
2022-12-11 16:28:07 +00:00
Guðni Már Gilbert
4ef8d81bfc
Fixed failed_load_to_finda_0-4_resolve_help_second_fail unit test
2022-12-11 15:52:55 +00:00
Guðni Már Gilbert
2fd651b028
Fix failed_load_to_finda_0-4_resolve_help_second_ok unit test
2022-12-11 15:50:18 +00:00
Guðni Már Gilbert
801a0d3349
Fix failed_load_to_finda_0-4_try_again unit test
2022-12-11 15:44:52 +00:00
Guðni Már Gilbert
559ed69678
Fix unlimited_load_manual_stop unit test
2022-12-11 15:40:40 +00:00
Guðni Már Gilbert
bf9fec6941
Fix unit test load_fail_FINDA_resolve_btnL
...
If helping the filament triggers FINDA
we should set loading state to InSelector
2022-12-11 15:15:16 +00:00
Guðni Már Gilbert
7e2528d675
Fix unit test load_fail_FINDA_resolve_btnM
...
- If FINDA was not pressed, filament load state should be
AtPulley
- When a user presses the middle button, the pulley motor should be enabled =>feeding started
2022-12-11 15:08:26 +00:00
Guðni Már Gilbert
26be20e9aa
Improve messages
2022-12-11 13:40:09 +00:00
Guðni Már Gilbert
abc46a90eb
Check return code from VerifyEnvironmentState
2022-12-11 13:13:26 +00:00
Guðni Már Gilbert
6a4ebdaee6
optimisation: inline functions to reduce size
...
Change in memory:
Flash: -394 bytes
SRAM: 0 bytes
Breakdown:
|------------------------------------------------------------|
| Function name | Flash reduction |
|------------------------------------------| ----------------|
|CommandBase::FinishedOK | 182 bytes |
|MovableBase::InitMovementNoReinitAxis | 60 bytes |
|TMC2130::CheckForErrors | 36 bytes |
|Protocol::UInt16ToHex | 32 bytes |
|AddErrorAxisBit | 24 bytes |
|Application::CheckManualOperation | 22 bytes |
|CommandBase::GoToErrEngagingIdler | 12 bytes |
|Application::PlanCommand | 12 bytes |
|Pulley::FinishHomingAndPlanMoveToParkPos | 8 bytes |
|Pulley::InitAxis | 4 bytes |
|------------------------------------------------------------|
2022-11-19 11:55:46 +01:00
D.R.racer
c0189d81af
Distinguish among different error states when recovering ToolChange
...
Some errors need specific recovery, it seems it is no longer possible to "just" retry.
2022-11-18 22:42:05 +01:00
D.R.racer
c8c39f7b69
Make sure ToolChange moves Selector to desired slot
...
and verify correct behaviour in unit tests - especially when Selector's start position is at a different slot.
2022-11-18 22:29:01 +01:00
Guðni Már Gilbert
2f6e364ad0
optimisation: compiler should not inline SetFilamentLoaded
...
Change in memory:
Flash: -130 bytes
SRAM: 0 bytes
2022-11-18 21:33:46 +01:00
D.R.racer
eba2c298d1
Raise version to 2.1.5
...
because we introduced a new error code
2022-11-17 07:32:38 +01:00
D.R.racer
08f777b5cb
Introduce FINDA_FLICKERS error code
...
Intended for scenarios when FINDA used to be OFF but accidentally became ON without a reason.
The user is obliged to inspect FINDA and tune its switching.
2022-11-17 07:32:38 +01:00
D.R.racer
3f09ba0c16
Unit tests: selector refused to move in ToolChange
...
Revealed all kinds of subtle issues (which is great). All have been fixed in this commit.
2022-11-17 07:32:38 +01:00
D.R.racer
8d992e2706
Report Selector refused to move as FINDA_DIDNT_SWITCH_OFF
...
MMU-176
2022-11-17 07:32:38 +01:00
D.R.racer
c74d418016
Invalidate Idler+Selector homing flags when Retry from ToolChange Error
...
If FSENSOR_DIDNT_SWITCH_ON was caused by misaligned Idler, rehoming it may fix the issue when auto retrying -> no user intervention.
So first invalidate homing flags as the user may have moved the Idler or Selector accidentally.
Beware: we may run into issues when FINDA or FSensor do not work correctly. Selector may rely on the presumed filament position and actually cut it accidentally when trying to rehome.
It is yet to be seen if something like this can actually happen.
MMU-191
2022-11-15 17:42:12 +01:00
Alex Voinea
0e896cae85
Fix bootloader file generation
2022-11-15 10:43:34 +01:00
D.R.racer
299a31b765
Generate exactly 1 userInput event when button pressed (and held)
...
This PR is a different solution to what @gudnimg found in PR#233 / PFW-1404.
The benefit of this approach is the fact, that the button press event is generated when the button is pressed and not after it has been released.
The downside is obvious:
CPUFLASH: +28B
RAM: +1B
2022-11-15 07:19:20 +01:00
VintagePC
8ae82dd6b3
Build bootloader hex too
2022-11-11 16:28:39 +01:00
Alex Voinea
a4463b9734
Selector: use freewheeling
2022-11-11 10:46:21 +01:00
Guðni Már Gilbert
21a3ceb2b2
PFW-1428 Enable UART1 receiver when the MMU is ready to process incoming messages
2022-11-01 06:39:10 +01:00
Guðni Már Gilbert
144725ab11
Merge pull request #232 from gudnimg/fix-firmware-panic-error-report
...
Fix issue where firmware panic error code is overwritten
2022-10-28 10:25:21 +00:00
Guðni Már Gilbert
394f290bfb
Check for ERRInternal in command_base Step()
...
Reduces code size significantly
2022-10-27 15:40:15 +00:00
Guðni Már Gilbert
ef4246dd9a
Fix issue where firmware panic error code is overwritten
...
If QUEUE_FULL error happened, it would be overwritten as INTERNAL
and incorrectly display FW_RUNTIME_ERROR on MK3S.
The fix is to add handling for ERRInternal in every StepInner() and forward the error
to higher application layer
2022-10-26 20:39:28 +00:00
Guðni Már Gilbert
0e625dc551
circular_buffer: implement reset()
...
reset() discards any data in the buffer (head == tail)
Change in memory:
Flash: -116 bytes
SRAM: 0 bytes
2022-10-25 07:21:33 +02:00
Yuri D'Elia
8a0ede668c
Merge pull request #230 from wavexx/abort_tests
...
motion: Add tests for unscheduled moves in AbortPlannedMoves
2022-10-22 18:13:54 +02:00
Alex Voinea
09d3527f90
Merge pull request #225 from leptun/hwSanity_disable_steppers_after_test
...
hwSanity: Disable the steppers after test
2022-10-22 18:04:38 +02:00
Yuri D'Elia
3567a3dcd5
motion: Also test for the simplest case of a single+unplanned move
2022-10-22 17:40:28 +02:00
Yuri D'Elia
7053755b0e
motion: Add tests for unscheduled moves in AbortPlannedMoves
...
This catches the previously untested #228
2022-10-22 17:21:08 +02:00
Guðni Már Gilbert
0506af08ac
Merge pull request #226 from gudnimg/parallel-unit-tests
...
Run unit tests in parallel when possible
2022-10-22 14:50:17 +00:00
Alex Voinea
3b85df297e
hwSanity: Disable the steppers after test
...
flash: -44
RAM: 0
2022-10-22 16:48:48 +02:00
Guðni Már Gilbert
709b616948
Merge pull request #228 from gudnimg/abortplannedmoves-gudni
...
Empty the entire block_index queue when planned moves are aborted
2022-10-22 14:44:24 +00:00
Guðni Már Gilbert
7bbee87a08
Empty the entire block_index queue when planned moves are aborted
2022-10-22 14:10:31 +00:00
Yuri D'Elia
e045225167
Merge pull request #229 from wavexx/catch2_v3_subrepo
...
Update Catch2 to v3.1.1
2022-10-22 16:05:31 +02:00
Guðni Már Gilbert
353affb9f3
Optimise Catch2 V3 includes + fix a few cases of missing includes
2022-10-22 15:41:44 +02:00
Guðni Már Gilbert
45f70e004c
Update CMake integration for Catch v3.1.0
2022-10-22 15:41:44 +02:00
Yuri D'Elia
7ba6850411
Update Catch2 v3.1.1
...
Re-initialize subrepo
2022-10-22 15:41:14 +02:00
Guðni Már Gilbert
8c5c84cc17
Formatting
2022-10-21 22:03:08 +00:00
Guðni Már Gilbert
d6029f7fd2
Move the other Ctest arguments into a single variable
2022-10-21 22:02:19 +00:00
Guðni Már Gilbert
745be900ef
Run unit tests in parallel if possible
...
ReadResponse unit tests usually takes at least 30 seconds to run on my
computer, so having the unit tests run on more than one thread makes a
big difference.
2022-10-21 21:30:15 +00:00