Commit Graph

1725 Commits

Author SHA1 Message Date
Guðni Már Gilbert 8c4cd11ae0 Cleanup: remove code_value_float()
The function adds a bit of overhead compared to code_value()

I suspect this function is a relic of the past.

Change in memory:
Flash: -82 bytes
SRAM: 0 bytes
2023-01-25 16:51:10 +00:00
3d-gussner 7b163cf464
Merge pull request #3936 from wavexx/tm_cal_htemp
TM: Do not restrict autotune temperature
2023-01-24 14:20:55 +01:00
Alex Voinea 53fb4c3e3f Move altfan eeprom initialization to extruder_altfan_detect()
flash: -16B
RAM: 0B
2023-01-23 19:47:03 +00:00
Guðni Már Gilbert 7245c76094 Fix an issue where Altfan Override setting in EEPROM is not respected at boot-up 2023-01-23 19:47:03 +00:00
Yuri D'Elia 679208b29e TM: Do not restrict autotune temperature
Fix a wrong type that prevents running TM autotune at temps >127
2023-01-20 19:18:19 +01:00
Guðni Már Gilbert 39f9979655 optimisation: Combine if statement in M600
Change in memory:
Flash: -52 bytes
SRAM: 0 bytes
2023-01-18 09:44:27 +01:00
Alex Voinea 0c352ac2d1 Disable M47 if TMC2130 drivers are used
flash: -126B
RAM: 0B
2023-01-17 20:37:27 +01:00
Yuri D'Elia 12f5bd3648 wizard: Do not complain about missing calibration if model is disabled
This fixes #3891 without having to set the calibration bit, meaning
that if the model is later re-enabled without a real calibration, a
prompt is shown as expected.
2023-01-16 07:31:33 +01:00
Guðni Már Gilbert 5582114628 optimisation: re-use delay_keep_alive() in a few places
Change in memory:
Flash: -52 bytes
SRAM: 0 bytes
2023-01-15 19:21:55 +01:00
Guðni Már Gilbert 76d1f28c14 optimisation: serialecho_temperatures should print a constant extruder number
Change in memory:
Flash: -18 bytes
SRAM: 0 bytes
2023-01-14 11:22:03 +00:00
Guðni Már Gilbert 62fc19b361 optimisation: combine a few serial logs since extruder is now constant 2023-01-14 11:22:03 +00:00
Guðni Már Gilbert 858e80e806 optimisation: M109 doesn't have a T parameter.
In 8-bit firmware the tool is always 0.

Change in memory:
Flash: -146 bytes
SRAM: 0 bytes
2023-01-14 11:22:03 +00:00
Guðni Már Gilbert ff49c6a0bf optimisation: M104 doesn't have a T parameter
Change in memory:
Flash: -120 bytes
SRAM: 0 bytes
2023-01-14 11:22:03 +00:00
Guðni Már Gilbert 44660f668a optimisation: M105 doesn't have a T parameter
Remove parameter from gcode_M105() extruder is always 0.

Change in memory:
Flash: -64 bytes
SRAM: 0 bytes
2023-01-14 11:22:03 +00:00
Guðni Már Gilbert fa0a522b7d optimisation: re-use serialecho_temperatures()
Change in memory:
Flash: -82 bytes
SRAM: 0 bytes
2023-01-10 07:22:35 +01:00
Guðni Már Gilbert 8c79bab503 optimisation: there is only one extruder when planning a line
Change in memory:
Flash: -50 bytes
SRAM: -3 bytes
2023-01-06 19:33:32 +01:00
Guðni Már Gilbert 534c2e2664 Cleanup: Remove M218
It was only enabled when multiple extruders are enabled

The firmware doesn't support it
and even if the M218 gcode could be used, the code does not compile
2023-01-06 19:30:05 +01:00
Yuri D'Elia e45adb4cee Make M300 S0 pause like Marlin
Follow Marlin's behavior and simply insert a delay for the requested
duration when using M300 S0.

When S is not specified, use the default tone instead.

Fixes #3856
2022-12-31 01:13:45 +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 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 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 da6e56a17e Simplify altfan override initialization 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 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
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 cc3d36c78f Replace labs with fabs
Both degHotend and degTargetHotend return a float
In this case it is better to use fabs()

Change in memory:
Flash: -14 bytes
SRAM: 0 bytes
2022-12-29 08:54:50 +01:00
Guðni Már Gilbert 03511a5a7c Remove redundant ultralcd includes in Marlin_main
This also removes two definitions
- ULTRALCD
- LCD_USE_I2C_BUZZER
Neither of them are defined anywhere
2022-12-27 12:03:56 +00:00
Guðni Már Gilbert 9757502abc Remove pins_arduino.h include
This header is already included with Arduino.h which
is included in Marlin.h header.
2022-12-27 12:03:14 +00:00
Guðni Már Gilbert 72857c902c drop conv2str dependency in Marlin_main 2022-12-27 11:59:22 +00:00
3d-gussner 0bcb4ab59d
Merge pull request #3822 from wavexx/tm_partial_lock
MK3: TM: Prevent lockout on invalid model values
2022-12-20 14:13:56 +01:00
Alex Voinea 2b38080c7e
Merge pull request #3833 from leptun/MK3_fix_MK2.5_softReset 2022-12-20 10:02:14 +01:00
3d-gussner 65f5b9e53d
Merge pull request #3818 from wavexx/tm_default_state
TM: Provide full defaults for model data and enable it by default
2022-12-20 07:08:25 +01:00
Guðni Már Gilbert 4c32e8b403 PFW-1457 make CHECK_FSENSOR into a function 2022-12-18 12:23:20 +00:00
Yuri D'Elia 0972ef70d0 Use menu_set_block() in ThermalStop()
Set a menu block for fatal thermal errors instead of abusing
lcd_return_to_status() to kick the user out of the menus.

This now allows a thermal model error to be recoverable through menu
access.
2022-12-17 16:42:22 +01:00
Yuri D'Elia 6e2f016655 TM: Clear the Stopped state when stopping the current print
We allow resuming from the LCD via start print and resume print,
it makes sense to clear the error on stop too.

For this reason distinguish whether the action is performed
automatically or manually (ie: interactively).

The error is only cleared when the command is run interactively.
2022-12-17 16:11:31 +01:00
Alex Voinea c5d406d12f Fix interrupts not enabled during setup() 2022-12-16 16:46:08 +01:00
Guðni Már Gilbert 2e7c237a17 Cleanup: remove automatic parameter from unload_filament()
In M600 and M702, the Z-lift is taken care of outside this function
so it makes no sense to have a Z-lift within unload_filament()

Only exception to this is in the wizard, there I moved the Z-lift to
happen before we start heating the nozzle.

Change in memory:
Flash: -12 bytes
SRAM: 0 bytes
2022-12-16 16:20:09 +01:00
Alex Voinea d43a7da20d fix watchdog not getting disabled on user app boot 2022-12-16 16:01:29 +01:00
Alex Voinea d80e32fa31 retrigger build 2022-12-16 12:55:30 +01:00
Alex Voinea e8c8945650 Disable the watchdog early in the program 2022-12-16 12:25:44 +01:00
Alex Voinea 451f601697 Fix MK2.5 softReset() 2022-12-16 12:10:47 +01:00