Commit Graph

6832 Commits

Author SHA1 Message Date
D.R.racer 52a3beb931 Cut & Eject: avoid preheat if no filament loaded
and add fullscreen messages for Cut & Eject (messages intentionally reused to save space)
2022-12-30 14:23:44 +01:00
D.R.racer 43f3865d7c Tune UI CutFilament & EjectFilament 2022-12-30 14:23:44 +01:00
D.R.racer ec1d12d929 Introduce FILAMENT_EJECTED + tune Eject operation + inc. MMU ver. 2.1.6 2022-12-30 14:23:44 +01:00
D.R.racer 58ff0efb30 Silence nodiscard attribute at one spot
... where it is really irrelevant
2022-12-30 14:23:44 +01:00
D.R.racer ce7ab1d73c Fixup: build MK25/MK3 (non-S) 2022-12-30 14:23:44 +01:00
D.R.racer ebbf2378ed Update MMU error texts
as per https://github.com/prusa3d/Prusa-Error-Codes/pull/71
2022-12-30 14:23:44 +01:00
D.R.racer 5e103cc24e Fixup: restoring temp. while Load2ExtrFailed 2022-12-30 14:23:44 +01:00
D.R.racer d4f0f363cd Fixes from tests
- introduce Cut Filament
- limit retries try-unload
- fix waiting in "Load to extruder failed" error screen
- add LOAD_TO_EXTRUDER_FAILED error definition
2022-12-30 14:23:44 +01:00
D.R.racer a30ea1c5ab Rename error: Load to Extruder Failed
as per request from the Content team
2022-12-30 14:23:44 +01:00
D.R.racer 0a3517e8b2 Show an error screen when try-unload fails to push filament into nozzle
This is a prototype implementation of having the ability to show an MMU error screen even for printer's errors (during an MMU operation).
Also, the retry count of unloads after failed load the extruder tube is now limited to ~3 attempts.

Technically, since this very error is not an MMU's one (MMU is just fine at this stage) but a printer's one I tried to hack the existing error-reporting infrastructure to handle such a case.
The original idea of this approach was suggested by @vintagePC
2022-12-30 14:23:44 +01:00
D.R.racer b2b7990cfc Allow tweaking try-unload feedrates
It looks like MMU2_VERIFY_LOAD_TO_NOZZLE_FEED_RATE can get much higher that the original 20mm/s.
50mm/s is the default now, can be tweaked further.
2022-12-30 14:23:44 +01:00
Yuri D'Elia c5d2aedfe4 wizard: Ask about the sheet before doing Z calibration
Ask to install the sheet immediately after removing the test print.
This makes further messages less confusing.
2022-12-30 14:14:01 +01:00
Yuri D'Elia 66071c0b5b wizard: Resume the wizard for missing calibrations during upgrades
Instead of checking for explicit versions, resume the wizard if some
(new) wizard is missing.

This handles both the old SELFTEST check, the new thermal model
and any future check in the same fashion.
2022-12-30 14:14:01 +01:00
Yuri D'Elia 2a1511f7b1 Read version data from progmem in eeprom_fw_version_older_than 2022-12-30 14:14:01 +01:00
Yuri D'Elia dd99b1ab32 wizard: Disable temperature model during hotend testing
This avoids confusing error messages if the hotend is defective and
caught by selftest itself.

Rearrange Stopped state checks (saves 2 bytes)
2022-12-30 14:14:01 +01:00
Yuri D'Elia 8fa0a22b8d wizard: Allow partial resuming after reset
Update the eeprom FW version as soon as migration is complete, to avoid
resetting the CALIBRATION_V2 variable at each reset.

Do not implicitly reset the calibration steps for WizState::Run: do this
only for the menu action.
2022-12-30 14:14:01 +01:00
Yuri D'Elia 414972c876 Unbreak build with !PINDA_THERMISTOR 2022-12-30 14:14:01 +01:00
Yuri D'Elia 7828788e5c Handle CALIBRATION_STATUS_TEMP_MODEL 2022-12-30 14:14:01 +01:00
Yuri D'Elia 2a13ce4c62 Handle CALIBRATION_STATUS_SELFTEST 2022-12-30 14:14:01 +01:00
Yuri D'Elia b8c1f34e31 Handle CALIBRATION_STATUS_{Z,XYZ} 2022-12-30 14:14:01 +01:00
Yuri D'Elia b41ece175b Handle CALIBRATION_STATUS_LIVE_ADJUST 2022-12-30 14:14:01 +01:00
Yuri D'Elia 5ec627c12c wizard: Rewrite the fw upgrade check logic
- Handle the conversion from the V1 calibration status to the V2 bitmap
  for all past FW versions.
- Allow to run the wizard in "Restore" mode (for example during upgrade
  or service prep) to complete any missing steps.
- Fix service prep to use the above feature by clearing the appropriate
  calibration bits.
- Remove exceptions for FW 3.2.0.4 which can now be handled cleanly.
2022-12-30 14:14:01 +01:00
Yuri D'Elia 22c0e15047 wizard: Rewrite the wizard handling loop
Simplify status tracking:

- S::Restore to continue to the next logical wizard item
- S::Finish for a successful failure
- S::Failed to exit while showing a failure
2022-12-30 14:14:01 +01:00
Yuri D'Elia a712546269 wizard: Remove unused wizard stages
Remove PreheatPla/IsPla, as we currently always explicitly ask for the
material type.
2022-12-30 14:14:01 +01:00
Yuri D'Elia da6e56a17e Simplify altfan override initialization 2022-12-30 14:14:01 +01:00
Yuri D'Elia 9a018230ce Replace calibration state with a new calibration bitmap
- Move calibration status/declarations to util.h
- Allows to query the status of each step independently without assuming
  any order
- Allows to extend the calibration with new steps transparently
2022-12-30 14:14:01 +01:00
Yuri D'Elia 2552fee4c7 eeprom: Fix EEPROM_HEAT_BED_ON_LOAD_FILAMENT debug offset in docs 2022-12-30 14:14:01 +01:00
Yuri D'Elia 0e2c2d9eea Simplify FW eeprom version checks
- Generalize force_selftest_if_fw_version() so we can check when upgrading
  between arbitrary FW versions.
- Do not call update_current_firmware_version_to_eeprom() prematurely
  when forcing self-test (if a reset happens before self-test completes,
  the check would be incorrectly skipped on the next run).
2022-12-30 14:14:01 +01:00
Yuri D'Elia 74609009ca Fix M117 string offset 2022-12-30 14:06:48 +01:00
Yuri D'Elia 9105573ac9 Handle/strip leading whitespace in gcode stream 2022-12-30 14:06:48 +01:00
Yuri D'Elia a4d427adf2 De-specialize M0/M1/M117
Since we no longer scan for the first command these exceptions can be
removed.
2022-12-30 14:06:48 +01:00
Yuri D'Elia bb1e438f00 Do not scan for GMTD commands
Expect these to be always at the start of the line.
2022-12-30 14:06:48 +01:00
Yuri D'Elia f46be49f7d Tighten parsing of M0/M1/M117/PRUSA
Expect these to be always at the start of the command (which is now
stripped of the extra line number), reducing the number of corner cases
due to these not following the g-code spec.
2022-12-30 14:06:48 +01:00
Yuri D'Elia 7c896a87a4 Remove '*' (checksum) handling in process_commands
The checksum is already removed from the command queue so there's no
need to reprocess it in the main loop.
2022-12-30 14:06:48 +01:00
Yuri D'Elia 6651f5ce8b Strip the line number from the command queue
This increases the number of commands that can be queued and at the same
time it avoids a considerable amount of rescanning in a critical path.
2022-12-30 14:06:48 +01:00
Guðni Már Gilbert 797513d3c5 Remove T parameter from M221
Fixes #3852
2022-12-30 13:07:56 +01:00
Guðni Már Gilbert 4219beed71 Remove initial cursor setting
The cursor position is controlled by
the for-loop

Change in memory:
Flash: -8 bytes
SRAM: 0 bytes
2022-12-30 12:57:07 +01:00
Guðni Már Gilbert 1186b36bfa Remove whitespace at start of new row 2022-12-30 12:57:07 +01:00
Guðni Már Gilbert 7529eaec44 Remove duplicate code
msg_next is NULL, then the end of the message has been reached.

Change in memory:
Flash: -24 bytes
SRAM: 0 bytes
2022-12-30 12:57:07 +01:00
Guðni Már Gilbert 5037d1edbc delay_keep_alive calls manage_heater and manage_inactivity
No need to call them again, the for-loop is very quick

Change in memory:
Flash: -10 bytes
SRAM: 0 bytes
2022-12-30 12:57:07 +01:00
Guðni Már Gilbert 1a9b7d79e6 Don't handle whitespace in a special way
Instead of reading and checking if a character is a whitespace
just print it out onto the LCD. This makes the code a bit less
complex. Whether there is a whitespace character, we always end
up reading from program space, so I doubt this has much performance
impact.

Change in memory:
Flash: -38 bytes
SRAM: 0 bytes
2022-12-30 12:57:07 +01:00
Alex Voinea 7925df6aa0 Default check action is continuing 2022-12-30 12:49:57 +01:00
Alex Voinea 96707aadcb Fix timeout making UI freeze 2022-12-30 12:49:57 +01:00
Guðni Már Gilbert 92cf8da45e Remove unused defines 2022-12-30 12:49:57 +01:00
Guðni Már Gilbert df65212449 Add yes-no choice to M862 warning
Fixes #3421

Change in memory:
Flash: -98 bytes
SRAM: 0 bytes
2022-12-30 12:49:57 +01:00
Yuri D'Elia 54704cb928
Merge pull request #3842 from wavexx/readme_updates
README: Document the new build system
2022-12-29 13:34:45 +01:00
Yuri D'Elia 732be51b24
Merge pull request #3858 from wavexx/consistent_targets
cmake: Consistent target names
2022-12-29 13:33:12 +01:00
Yuri D'Elia 4258ecef36 README: Fix formatting 2022-12-29 12:56:16 +01:00
Yuri D'Elia 4ff9324377 README: Update target names 2022-12-29 12:55:57 +01:00
Yuri D'Elia abf7fbf99b cmake: Consistent target names
- Use ALL_MULTILANG and VARIANT_MULTILANG instead of VARIANT_Multilang
- Use ALL_ENGLISH and VARIANT_ENGLISH instead of VARIANT_En-only
- Rename the intermediate VARIANT_Multilang_* targets to VARIANT_lang_*
  to avoid confusion
2022-12-29 12:47:21 +01:00