Commit Graph

36 Commits

Author SHA1 Message Date
gudnimg 40d3830e6d Simplify filament_presence_check usage
Pull all checks needed into the function such that the caller
only needs to check the return value

Also added description for the filament_presence_check function
2024-08-24 07:10:23 +00:00
Guðni Már Gilbert b7caf36207 optimisation: deduplicate printer check toggle menus
This saves ~100B of flash
2024-08-24 07:10:23 +00:00
Guðni Már Gilbert bf72ecc3f9 Add filament presence check at start of print
A new menu setting is added to configure how strict the check should be.

- None: No check is performed
- Warning (default): The user is warned about missing and is prompted to continue with Yes/No. If No is selected, the print is aborted. If no user input is given (e.g. from host printing) then the warning will expire in 30 seconds and assume the Yes option was selected
- Strict: If the filament is not detected when a print is started, it is immediately canceled.

The check is currently performed on G-codes: M24 and M75. Starting a SD print and Host print respectively.
2024-08-24 07:10:23 +00:00
gudnimg 10d156b28c tests: Fix a compiler warning in tests -fpermissive
Prusa-Firmware/tests/../Firmware/util.h:114:25: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
  114 |         pStrEnd = strchr(this->ptr, '"');
      |                   ~~~~~~^~~~~~~~~~~~~~~~
      |                         |
      |                         const char*
2024-08-09 14:57:07 +00:00
3d-gussner d276695ce7 Set Ready 2023-11-22 07:58:13 +01:00
gudnimg bcc7a16e1c PFW-1523 Trim trailing whitespace in util.h 2023-11-07 07:27:26 +00:00
gudnimg ed376009aa PFW-1523 Force inline unquoted_string constructor
Saves 36 bytes of flash
2023-11-04 20:57:31 +00:00
gudnimg cdb559040c PFW-1523 Refactor parsing quoted strings
My plan is to re-use this function in M79
in a later commit. The firmware doesn't
have a dedicated parser like Marlin 2.1
so this is my attempt to not duplicate the parsing of a quoted string in G-codes

Change in memory (MK3S+ Multilang):
Flash: -50 bytes
SRAM: 0 bytes
2023-11-04 17:45:14 +00:00
Guðni Már Gilbert 415c0c79d1 Fix FW_COMMIT_HASH compiler warning
On my end, the default length for the abbreviated commit hash is 9 characters.
This won't fit into uint32_t (4 bytes).

Instead change FW_COMMIT_HASH into a string
and create preprocessor symbol for the string length
such that it's known at compile time.

If the string should be longer or shorter
then only FW_COMMIT_HASH_LENGTH needs to be configured on the CMake side
2023-10-07 21:01:28 +00:00
VintagePC 916d02824e Initial round of changes to address some cmake features 2023-09-07 18:46:47 -04:00
3d-gussner 6feab85252 Rebase update REVO and solve @wavexx comments 2023-07-25 17:24:02 +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
Guðni Már Gilbert ccabf1fa31 Remove random //-// comments 2023-04-22 13:39:08 +00: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 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 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 d84e497007
Merge pull request #3805 from 3d-gussner/MK3_Fix_M862.4_strict
MK3: Fix `M862.4` with [strict] mode
2022-12-12 12:38:15 +01:00
3d-gussner 6f5a67491c Fix `M862.4` with [strict] mode
Max 8 falvor versions
2022-12-06 13:18:52 +01:00
Alex Voinea 52965bd05d Avoid using global variables
Flash: -68B
RAM: -4B
2022-12-05 16:43:51 +01:00
D.R.racer fea1520dfb Fix & optimize FW version parsing and checking
PFW-1433
2022-11-23 13:34:13 +01:00
Alex Voinea dcc48c0052 Remove eeprom _int8t functions
flash: -48B
RAM: -4B
2022-11-18 14:50:07 +01:00
Guðni Már Gilbert e39d1458a1 Fix lost changes during rebase 2022-09-16 10:23:47 +02:00
D.R.racer 0537908d8c Fixup 2 2022-09-16 10:23:47 +02:00
Yuri D'Elia 4f22de2333 Do *not* shorten the current command in printer_smodel_check
printer_smodel_check was incorrectly substituting the final " with a
null in the command to simplify the model string comparison, but in
doing so was also corrupting the next pop from the cmdqueue.

We can modify the current strchr_pointer as long as we *don't* change
it's length. This can cause an incorrect extra read from the queue,
resulting in the last command to be completely ignored.
2022-08-06 23:15:46 +02:00
Alex Voinea 2f4119a6d7 M552 - Printer IP address 2021-02-02 13:21:16 +02:00
D.R.racer 8a083c9970 Add PVB preheat and 0.8mm nozzle presets
minor features reflecting the latest announcement

Needs some 300B of CPU flash though, after 3.9.3 we need to optimize code
size again.
2021-01-08 13:52:39 +01:00
MRprusa3d 89de5aac77 default nozzle diameter for farm mode 2019-09-23 17:13:33 +02:00
MRprusa3d 8229a45187 pre-production version ;-) 2019-07-09 12:16:51 +02:00
MRprusa3d a3a7f3106e print parameters checking 2019-07-03 17:21:11 +02:00
MRprusa3d 1f131f66e0 print parameters checking
nozzle diameter
2019-03-14 00:36:56 +01:00
PavelSindler 85bc19b77c force selftest if user upgraded from 3.1.2-RC1 or older fw version 2018-02-27 17:52:13 +01:00
PavelSindler 43d696659f 3.0.12-RC2 sync 2017-06-29 18:35:43 +02:00
michalprusa 307d17422d 3.0.6 sync 2016-08-11 10:42:53 +02:00
michalprusa 30f0528aba Initial commit 2016-07-22 15:28:01 +02:00