Commit Graph

1879 Commits

Author SHA1 Message Date
dawidpieper b2f6b77cf3 Add separators between blocks 2023-08-16 19:46:57 +02:00
dawidpieper 58014156a0 Fix code formatting 2023-08-16 19:18:33 +02:00
dawidpieper 11d8c157f6 M850 add possibility to set sheet as active 2023-08-15 22:19:55 +02:00
Alex Voinea ef63b57dfd Remove unimplemented M407 from list of gcodes 2023-08-11 09:02:11 +02:00
3d-gussner 500a6558a5 Rebase, fix and update doxygen 2023-08-11 09:02:11 +02:00
Michael Greene f449b06bb2 reprocess patch so I don't have 1200 lines of whitespace changes to review 2023-08-11 09:02:11 +02:00
Guðni Már Gilbert 02332018ec tmc2130: Fix bug with vSense bit and current values
If vSense changes at runtime due to Run current
being changed. Then we must always shift the Hold current
correctly. Whether the vSense is changing 1 -> 0 or 0 ->1

Change in memory (with TMC2130_SERVICE_CODES_M910_M918):
Flash: +76 bytes
SRAM: 0 bytes
2023-08-05 10:41:21 +02:00
3d-gussner 2ab9cbcd83
Merge pull request #923 from cwei/patch-1
Fix upper limit for x
2023-08-02 12:05:38 +02:00
Guðni Már Gilbert a96ee9da62 m600: power panic: unset isPartialBackupAvailable on M600 exit
If no power panic occurred during M600 we should
clear isPartialBackupAvailable to let the power panic
code know to not use the partial backup. We want the
partial backup ONLY when the extruder is parked after a print is saved.

Change in memory:
Flash: +4 bytes
SRAM: 0 bytes
2023-07-27 16:55:08 +00:00
vintagepc a2eafc587a
Merge branch 'MK3' into 2477-redux 2023-07-26 12:34:38 -04:00
3d-gussner ce141a2fa1
Merge pull request #3564 from wavexx/fil_loading_state
Filament loading state fixes
2023-07-26 16:38:29 +02:00
3d-gussner 6feab85252 Rebase update REVO and solve @wavexx comments 2023-07-25 17:24:02 +02:00
3d-gussner 8ae0e1952e Rename `temp_model.h` to `thermal_model.h`
`/temp_model` to `/thermal_model`
`Temperature_model` to `Thermal_model`
minor format in eeprom.h
2023-07-25 17:13:07 +02:00
3d-gussner a6b209d36d Rename `Temperature Model` to `Thermal Model`
`Temperature model` to `Thermal model`
`temperature model` to `thermal model`
2023-07-25 17:13:07 +02:00
3d-gussner 44ae8033eb Rename upper case `TEMP_MODEL` to `THERMAL_MODEL` 2023-07-25 17:13:07 +02:00
3d-gussner dac07d11ba Rename lower case `temp_model` to `thermal_model` 2023-07-25 17:13:07 +02:00
Guðni Már Gilbert f40defd2a9 Rename minsegmenttime --> min_segment_time_us
Also fixed wrong unit in Configuration prinout (M500)
should be us and not ms

Also used %lu format for uint32_t instead of %.2f
2023-07-25 17:10:44 +02:00
Guðni Már Gilbert 6c95d340c1 Remove dead code axis_travel_steps_per_sqr_second 2023-07-25 17:10:44 +02:00
Guðni Már Gilbert 8689a28776 Rename max_acceleration_units_per_sq_second to max_acceleration_mm_per_s2 2023-07-25 17:10:44 +02:00
Guðni Már Gilbert 21faa52aab Rename axis_steps_per_unit to axis_steps_per_mm 2023-07-25 17:10:44 +02:00
Guðni Már Gilbert fa6aae60db optimisation: use SERIAL_PROTOCOLLN
Change in memory:
Flash: -12 bytes
SRAM: 0 bytes
2023-07-25 15:02:49 +00:00
Guðni Már Gilbert 9d15a4e63b optimisation: reduce code size in M916, M917, M918
Change in memory:
Flash: -148 bytes
SRAM: 0 bytes
2023-07-25 15:02:49 +00:00
Guðni Már Gilbert c090868fa2 optimisation: reduce code size in M907
Change in memory:
Flash: -4 bytes
SRAM: 0 bytes
2023-07-25 15:02:49 +00:00
Guðni Már Gilbert 5288d615f8 optimisation: lcd avoid streams
Author: leptun

Change in memory:
Flash: -124 bytes
SRAM: 0 bytes
2023-07-25 15:02:49 +00:00
Yuri D'Elia 074b5d380f Consistently replace loading_flag with eFilamentAction
Remove loading_flag and check for eFilamentAction instead which already
flags both load/unload (in addition to mmu actions).

Correctly transition from AutoLoad to Load as soon as the operation
cannot be cancelled anymore as opposed to resetting it.
2023-07-25 14:30:20 +00:00
Yuri D'Elia dece5d268f Consider any lcd_custom_command to be "ACTIVE"
All custom commands are transitory and eventually switch back to Idle
state by themselves.

It doesn't make any sense to explicitly check for Layer1Cal: any
non-idle state is active by design.

Fix this check in the main menu. This is probably incomplete (Layer1Cal
is incorrectly used in several other places).
2023-07-25 14:27:00 +00:00
Guðni Már Gilbert 1984091c10 Rename axis_steps_per_sqr_second to max_acceleration_steps_per_s2 2023-07-25 09:00:47 +02:00
Guðni Már Gilbert 3819f7a473 tmc2130: Refactor code for setting/changing currents
- Always re-calculate the Vsense flag when the currents are changed
- Make sure Hold current is not larger than Run current
- Added SetCurrents() function from MMU FW
- Added MotorCurrents structure from MMU FW
- Various code size optimisations e.g. in power panic

Change in memory:
Flash: -10 bytes
SRAM: +4 bytes
2023-07-25 08:56:43 +02:00
Guðni Már Gilbert 2cd5ab2349 power panic: add readable flags and optimise ISR(INT4_vect)
Add more readable names for the EEPROM_UVLO values

Change in memory:
Flash: -14 bytes
SRAM: 0 bytes
2023-07-18 11:29:03 +02:00
Guðni Már Gilbert fa843a4a9b power panic: implement partial back up in RAM
A partial backup is needed in scenarios where the extruder may be
parked after a print is saved. For example during a blocking wait for the user in M600
Or during a MMU error screen.

A sudden power panic at this point would previously save the parked position
into EEPROM. When the print is recovered it would print in mid air.
2023-07-18 11:29:03 +02:00
Guðni Már Gilbert 6ccd12c7e8 power panic: re-use saved_pos
This allows us to restore the position of all axis saved in RAM

If the extruder had been parked to the side for example
due to filament runout. Then the original position (before parking)
should now be restored

Change in memory:
Flash: +40 bytes
SRAM: 0 bytes
2023-07-18 11:29:03 +02:00
Guðni Már Gilbert 97c27525d4 power panic: re-use saved_extruder_relative_mode
Change in memory:
Flash: +8 bytes
SRAM: 0 bytes
2023-07-18 11:29:03 +02:00
Guðni Már Gilbert a2ac513794 power panic: re-use target temps from RAM
If a print has been saved to RAM such as during a filament runout,
do not overwrite these saved values if a sudden
power panic appears.

Additionally, change the saved types to be the same as power panic when saving to RAM:
- Bed target temperature is uint8_t (0 to 255) instead of float
- Extruder target temperature is uint16_t instead of float

Doing this change allows us to re-use the same global variables and
avoid creating local variables during power panic.

Change in memory:
Flash: -246 bytes
SRAM: -5 bytes
2023-07-18 11:29:03 +02:00
Guðni Már Gilbert a45e432030 power panic: Re-use code to save feedrate, segment index, and start position
Saves ~80B of Flash
2023-07-18 11:29:03 +02:00
Guðni Már Gilbert 67403603ed power panic: Re-use saving print file state
This also adds the Gcode position into EEPROM
for Octoprint/PrusaLink prints.
Though the recovery part doesn't support that yet.
2023-07-18 11:29:03 +02:00
Guðni Már Gilbert 2902fcaa71 power panic: Add two functions
These functions should be able to be re-used during a power panic

- save_print_file_state
- restore_print_file_state

No functional change at the moment.
2023-07-18 11:29:03 +02:00
Guðni Már Gilbert 526a1dcc63 power panic: Move code into a separate file 2023-07-18 11:29:03 +02:00
RoboMagus 2d461572dd Fix command parameters offset 2023-07-13 11:05:29 +02:00
RoboMagus 4450dbe4dd Update serial echo macro to print from PGM 2023-07-13 11:05:29 +02:00
RoboMagus d9e6dd4efe Update usage comment 2023-07-13 11:05:29 +02:00
RoboMagus 5baa74a425 Add M118 Gcode support 2023-07-13 11:05:29 +02:00
3d-gussner 7f95c54305 Move `Language update` to first row 2023-07-13 10:08:09 +02:00
3d-gussner 9421785190 Update doxygen and po files 2023-06-29 08:23:13 +02:00
3d-gussner 10e2357cc5 Change MMU2 to MMU3 2023-06-27 11:41:09 +02:00
Guðni Már Gilbert 7dc370a7e1 Move ISR7 code to fancheck.cpp 2023-05-23 07:43:40 +02:00
Guðni Már Gilbert 963bd508a4 Fix MK25 compiler warning
warning: 't_fan_rising_edge' defined but not used [-Wunused-variable]
2023-05-23 07:43:40 +02:00
Alex Voinea 0612a38885
Fix stepper inactivity timeout 2023-05-13 08:18:39 +02:00
3d-gussner 0c453b53cd
Merge pull request #4193 from gudnimg/unload-sequence-improvements
Fix unload sequence for users without MMU
2023-05-10 07:29:16 +02:00
Guðni Már Gilbert e24c2200f1 Set FILAMENTCHANGE_FINALRETRACT instead of hardcoded 0 2023-05-08 19:33:42 +00:00
Guðni Már Gilbert 71180ac284 Cleanup M600 init
Instead of removing FILAMENTCHANGE_FINALRETRACT
just set it to 0

No change in memory
2023-05-06 15:24:54 +00:00