Guðni Már Gilbert
caf98936e3
Minor cleanup
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
b9c23cd6b8
Add Unloading message to LCD
...
Also made mmu_M600_load_filament static to limit its scope
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
d5cdb412ba
Introduce a way to read the previous tool used
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
2d02877686
Disable automatic in M600
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
e39bc3f12d
During Tx, temporarily allow cold extrusion
...
This prevents a FSENSOR DIDNT TRIGGER error
and allows the bondtech gears to grab the filament.
2022-09-16 10:22:38 +02:00
D.R.racer
45a5e719a2
Disable filRunout when MMU.Enabled()
...
It turned out the runout is caused by the ramming sequence in the G-code, which is interpreted before the actual MMU command gets into processing.
The frequency of these errors/runouts differed one machine from another and was really hard to track down.
Therefore - once the MMU is enabled (active and running) we'll disable filament runout handling caused by the printer's filament sensor.
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
a1881b4a07
Disable filament runout when MMU is unloading
2022-09-16 10:22:38 +02:00
VintagePC
762080ab1a
Fix some partking and recovery bugs
2022-09-16 10:22:38 +02:00
D.R.racer
8b6941d493
Temporarily disable runout
...
There are still printers which suffer from spurious runouts for no reason.
For testing purposes, runout will be disabled until the real cause is found.
2022-09-16 10:22:38 +02:00
D.R.racer
01f926f074
Fix build MK25S
2022-09-16 10:22:38 +02:00
VintagePC
f155c7664d
Add missing CheckUserInput calls, fix bad array entry for FW_update
2022-09-16 10:22:38 +02:00
VintagePC
e8088b0161
Allow reset if the EEPROM is set to "on"
2022-09-16 10:22:38 +02:00
VintagePC
888a37450b
Fix wrong return
2022-09-16 10:22:38 +02:00
VintagePC
73c486cc2f
- Fix DisableMMU button on FW incompat
...
5823c14
- Implement eeprom var, fix reset
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
204b43dce4
PFW-1336
...
The following situation is now fixed, steps:
1. Load filament through LCD
2. Load to nozzle through LCD
3. Before filament reaches Fsensor => turn off the printer
4. Wait a few seconds and then turn the printer on again
5. Start a print through the SD card
6. Printer will unload and then re-load the filament
Previously in step 6, the printer would start a print without any
filament loaded.
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
46184a9447
Update printer name if M862.3 is called but not M862.2
2022-09-16 10:22:38 +02:00
D.R.racer
236098dbca
Make init MMU error screens send buttons (Idle mode)
2022-09-16 10:22:38 +02:00
D.R.racer
b880559ba7
Reset MMU upon start + fix reporting its start errors
2022-09-16 10:22:38 +02:00
D.R.racer
1ff7459743
Re-enable filament runout + add debug msgs
...
Needs a fix on the MMU side (report FeedToBondtech::DisengageIdler)
2022-09-16 10:22:38 +02:00
D.R.racer
b6b265e371
Hack around old MMU FW's msgs
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
c1134e7e68
Cleanup: Remove an old comment
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
bd932b3b10
Cleanup: Fix two compiler warnings
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
cfc56af95c
Cleanup: fix parameter comments
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
268c96334b
Cleanup: Pull out PrusaErrorCodeIndex
...
Saves 8 bytes of flash
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
d49e858cf7
PFW-1323 Fix MMU error screen doesn't disappear when error resolved on the MMU
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
7b91e73c8b
Fix issue where error screen updates too slowly in manage_response
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
98d07e6a09
Call lcd_set_custom_characters_nextpage
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
5ced30d8ca
Cleanup: Add comments and reduce code size slightly
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
352a22c22e
Cleanup: Remove unused callback
...
Remove unused callback in lcd_show_multiscreen_message_with_choices_and_wait_P
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
ecb4d08049
PFW-1318 Rewrite the implementation to be non-blocking
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert
dc87bbae11
Fix compile error
2022-09-16 10:22:38 +02:00
D.R.racer
0e75a03c8c
Reuse FSensor runout blocking impl. throughout the whole FW
2022-09-16 10:22:38 +02:00
D.R.racer
eed816d9de
Fix build
2022-09-16 10:22:38 +02:00
D.R.racer
d7270e0b80
Fix lang build
2022-09-16 10:22:38 +02:00
D.R.racer
f04d83fc4c
Update printer's type (MMU/non-MMU) at runtime
...
+ reformat utils.cpp
2022-09-16 10:22:38 +02:00
D.R.racer
5082da78d2
Convert button on LCD into button for MMU
...
- Dependent on current MMU error being processed
- Includes rename of LEFT_BUTTON_CHOICE -> LCD_LEFT_BUTTON_CHOICE (and right, middle as well) to avoid confusion with MMU buttons' ordering
2022-09-16 10:22:38 +02:00
D.R.racer
a0e9a302b8
Suppress communication drop-out < 8s (MMU in bootloader)
...
PFW-1327
2022-09-16 10:22:38 +02:00
D.R.racer
ba8332cd3e
Fix MK25 build
2022-09-16 10:22:38 +02:00
D.R.racer
d628525a94
Fix build MK25S
2022-09-16 10:22:38 +02:00
D.R.racer
f3f2086f29
Fix compilation MK3
2022-09-16 10:22:38 +02:00
D.R.racer
0bd3dfdcf7
This starts to print ;)
...
Temporarily disabled filament runout as this breaks ToolChange operation
yet for unknown reason.
2022-09-16 10:22:38 +02:00
D.R.racer
456ddbb538
Handle the new MMU states (slow load to fsensor)
2022-09-16 10:22:38 +02:00
D.R.racer
5f9ca6a6f3
Reorder errors list according to Prusa-Error-Codes #61
2022-09-16 10:22:37 +02:00
D.R.racer
8a92865969
Update MK3S to match MMU PR#168
...
- new progress and error codes
- remove #error from mmu2_power.cpp as it makes no sense
- remove temporary error translation code
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
33650c6e56
Remove redundant call to lcd_update_enable
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
f1803357b0
Fix default selection after changes in PFW-1312
...
The Yes and No are reverted. Before PFW-132 Yes is 1 and No is 0
Now they are Yes is 0, and No is 1
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
45edc69cc4
Add back menu it confirm if extrusion has correct color after loading to nozzle via LCD
...
I've added the call to this message via the menu function to ensure it
only appears when interacting with the LCD
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
1c26875e0e
PFW-1318 Implement callback to render status line
...
To render the thermometer and degree symbols
the CGRAM table will instead swap out
the feedrate and clock symbol when
lcd_set_custom_characters_nextpage()
is called.
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
452f39dc4b
fixup
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
3b0fba14ac
Remove unused parameter nlines to simplify things
...
This allows us to remove one overload
of lcd_display_message_fullscreen_P
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
e817a2d321
Don't block OnMMUProgressMsg while waiting for fsensor to trigger
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
0aa3a5855e
Add TODO to prompt user if extruder is extruding correct color
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
1c25041134
Add the load to nozzle sequence once the MK3S takes control and MMU has disengaged idler.
...
Also removed ProgressCode::FeedingToNozzle from switch-case since it is not used for this purpose at the moment.
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
3e77f9f3a1
Reduce grinding when loading to the fsensor
...
- We need to take into account additional 35mm move by the MMU.
- While the fsensor is not triggered, reduce the extruder movement each step from 20mm to 5mm. This should help reduce the variance in the filaments position before we run the final load to nozzle sequence.
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
450ce0fc64
Improve load to nozzle sequence
...
- Fixed a bug where the feed rate was 60x higher than intended
- Adjusted the sequence via trial and error. The sequence where the filament has not exited the nozzle is 35mm shorter than the previous implementation
- I reduced the feed rate slightly (by 1mm/s) on the fast load sequence
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
50cd6e77cc
Initial commit for loading filament to the nozzle
2022-09-16 10:22:37 +02:00
D.R.racer
87ed42ba9b
Fix FW update needed button order
2022-09-16 10:22:37 +02:00
D.R.racer
108f439bb7
Make sure the MMU error title never overflows on the LCD
2022-09-16 10:22:37 +02:00
D.R.racer
68b007c759
Fix compile-time conversion MMU2 ErrorCode -> Prusa-Error-Code
...
and hide some of the implementation details into mmu2_error_converter.cpp
which makes the code in mmu_reporting.cpp much easier to read.
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
138a0d21c7
Change default selection parameter from bool to uint8_t
...
This allows us make any of the three button choices the default selection
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
89e2bc4d6b
Change name of variable 'yes' to be more descriptive
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
c1ec80817c
Update the error menu after merging new changes
...
Will test this tomorrow
2022-09-16 10:22:37 +02:00
D.R.racer
c28354bf92
Update error codes + constexpr FindErrorIndex
...
Beware - requires avr-gcc 7.3!
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
6e1cf7e98c
Fixup
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
031c588802
Make all choice menus return consistent values
...
Such that left = 0, middle = 1, and right = 2
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
37bfd8ecd1
Checkpoint
...
- combined lcd_show_three_choices_prompt_P and lcd_show_two_choices_prompt_P into one function called lcd_show_choices_prompt_P
- Removed third_col parameter
- Added an enum to make the button selection result more readable
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
8dbb883971
Add helper macros to parse nibbles
...
Also made the button operations and nibbles constant since they should not be modified.
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
e6a3fa5e40
Remove unused includes after I moved the MMU error screen
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
83fefe10c1
Checkpoint:
...
- Rename lcd_show_multiscreen_message_two_choices_and_wait_P to lcd_show_multiscreen_message_with_choices_and_wait_P
- Move MMU error screen from ReportError() to ReportErrorHook()
- Fix the menu selection to work for menus with either two choices or three choices
- The buttons shown on the MMU error menu are now determined by the definition of btnOperation[]
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
96ff291f59
Implement PFW-1312 in MMU code
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
734e176445
Don't disable LCD updates in menu_item_function_P
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
ffe8c7c31a
Update lcd_show_multiscreen_message_two_choices_and_wait_P
...
to support 3 choices
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
39df6440ce
Allow LCD to be updated in manage_response loop
...
Also removed one TODO which David mentioned is not needed anymore
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
74ea9a7e43
Remove class LcdUpdateDisabler
...
Calling lcd_update_enable directly gives us more control
This also save a bit of flash memory
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
1ba314d95b
Print the MMU progress into status screen
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
15fbb93a8c
add that downwards facing >> character
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
b59c9da9ee
Move extruder when loading filament to fsensor
...
When the fsensor see filament, stop the extruder
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
96540d6e2d
Fix return value of WhereIsFilament()
...
getFilamentPresent returns the state of the IO pin of the sensor.
So we should use AT_FSENSOR instead of IN_NOZZLE
since the fsensor does not know if the filament is actually in the nozzle.
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
11290c1123
Add a read function for mmu_print_saved
...
and remove the old extern value which is not used anymore
I had to remove "MMU2::" from mmu2_protocol_logic.cpp, otherwise the build failed.
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert
dcebad21c8
Add missing spaces to ErrorCode messages
...
Such that:
MMU2:E=32766ErrorTitleTextDescription
Becomes:
MMU2:E=32766 ErrorTitle TextDescription
Also simplified the process of combining ErrorTitle and TextDescription
into the msg buffer by using snprintf. This is saver since we only
use dstSize in one place instead of two.
2022-09-16 10:21:53 +02:00
Guðni Már Gilbert
6fab95f145
Fix PROGMEM read in ErrorCode message
...
This could cause the printer to crash. The Serial Stream would show
a garbled string.
Also included in this commit:
* The buffer size is increased from 64 bytes to 192 bytes. We need to
take into account the length of the ErrorTitle and ErrorDescription.
* Fix overwrite in ErrorCode message buffer.
2022-09-16 10:21:53 +02:00
Guðni Már Gilbert
52f7fb8c51
Add missing space in ProgressCode message
...
Such that:
MMU2:P=123EngageIdler
Becomes:
MMU2:P=123 EngageIdler
2022-09-16 10:21:53 +02:00
Guðni Már Gilbert
2142cb0849
Fix overwrite in ProgressCode message buffer
...
When snprintf() if called we need to read the return value to see how
many bytes were written. Then when we call strncpy_P() through
TranslateProgress(), we need to tell the code to start writing
at byte 'len', or &msg[len]. Also we need to update the byte size
which strncpy_P() is allowed to write (64 - len).
2022-09-16 10:21:53 +02:00
Guðni Már Gilbert
4b71466526
Fix PROGMEM read in ProgressCode message
...
This could cause the printer to crash. The Serial Stream would show
a garbled string and the same corruption would appear on the Status
Screen's status line.
2022-09-16 10:21:53 +02:00
Guðni Már Gilbert
d6044387d9
Fix crash in manage_response
...
The watchdog needs to be kicked in the for(;;) loop.
This is usually done by calling manage_heater before
manage_inactivity.
2022-09-16 10:21:53 +02:00
Alex Voinea
c0a6d1343a
Increase RX buffer size
2022-09-16 10:21:53 +02:00
Alex Voinea
c201a5791a
Implement MMU hw reset
2022-09-16 10:21:53 +02:00
Alex Voinea
cc177ec5ad
Remove old mmu.cpp
2022-09-16 10:21:53 +02:00
D.R.racer
b27f690556
Add ProgressCodes -> text converter
2022-09-16 10:21:53 +02:00
D.R.racer
9140ebba55
Add MMU FW version variables
...
hardcoded for now, but API ready
2022-09-16 10:21:53 +02:00
D.R.racer
22287fec5d
Add original M600 MMU handling
...
seems to be almost unrelated to MMU function at all,
so returning it almost intact.
2022-09-16 10:21:53 +02:00
D.R.racer
87d9f9aba7
Introduce MMU errors + their texts
2022-09-16 10:21:53 +02:00
Alex Voinea
74fad4f8f6
Implement fsensor raii event suppression
2022-09-16 10:21:53 +02:00
D.R.racer
1211ad9360
Report state of fsensor into the MMU code
2022-09-16 10:21:53 +02:00
D.R.racer
825eed97d4
Fix build after rebase
2022-09-16 10:21:53 +02:00
D.R.racer
4fa4b3b2fc
Refactor Tx/Tc/T? commands
2022-09-16 10:21:53 +02:00
D.R.racer
4732859a98
Avoid exposing internal variables of fsensor
...
makes the code a bit shorter as well, because the compiler can be sure
that the variables are not accessed from the outside of the
fsensor.cpp compilation unit.
2022-09-16 10:21:53 +02:00
D.R.racer
db0374896f
Implement mmu2 serial interface
2022-09-16 10:21:53 +02:00
D.R.racer
208e620660
Return ir_sensor_detected + related functionality
2022-09-16 10:21:53 +02:00
D.R.racer
5870bbc524
Prune most of TODO from mmu2.cpp
...
+ refactor sound.h for better readability
2022-09-16 10:21:53 +02:00
D.R.racer
2e293e90a0
MMU2 interface overhaul
...
First port of the new MMU2-printer interface into 8bit FW.
2022-09-16 10:21:53 +02:00
Alex Voinea
c27e4623c5
Fix build (??)
2022-09-16 10:20:32 +02:00
Alex Voinea
329745368e
Improve PAT9125 UI implementation
2022-09-16 10:20:32 +02:00
Alex Voinea
340bc87110
Checkpoint: jam detection
2022-09-16 10:20:32 +02:00
Alex Voinea
65b2881b06
PAT9125 first prototype
2022-09-16 10:17:33 +02:00
Alex Voinea
c5c4c21124
Update Sensor info menu documentation
2022-09-16 10:17:04 +02:00
Alex Voinea
bdfd3305cb
Cleanup pat9125.h
2022-09-16 10:17:04 +02:00
Alex Voinea
c46b97ec2d
Add base code for PAT9125_sensor
2022-09-16 10:17:04 +02:00
Alex Voinea
90b78616b7
Fix reinit on error
2022-09-16 10:17:04 +02:00
Alex Voinea
fba6d44f33
fsensor event blanking
2022-09-16 10:17:04 +02:00
Alex Voinea
52b44ad178
fsensor add deinit
2022-09-16 10:17:04 +02:00
Alex Voinea
ea23e6d924
Fix MK2 build?
2022-09-16 10:17:04 +02:00
Alex Voinea
bbe1b1145e
Correct ifdefs for all IR sensor types
2022-09-16 10:17:04 +02:00
Alex Voinea
a256370c39
Remove original marlin fsensor code
2022-09-16 10:17:04 +02:00
Alex Voinea
f9ff929bbe
Enable fsensor when preparing for shipping
2022-09-16 10:17:04 +02:00
Alex Voinea
d2bfe422f1
Separate runout and enabled settings
2022-09-16 10:17:04 +02:00
Alex Voinea
b741707c0e
Fsensor error state
2022-09-16 10:17:04 +02:00
Alex Voinea
cfe8444fe3
Revert menu hack
2022-09-16 10:17:04 +02:00
Alex Voinea
5484882758
Checkpoint after a lot of removal
2022-09-16 10:17:04 +02:00
Alex Voinea
8fae5e708e
Remove unused fsensor variables
2022-09-16 10:09:20 +02:00
Alex Voinea
fc49ba115a
Move more IR sensor analog stuff to Filament_sensor.h
2022-09-16 10:09:20 +02:00
Alex Voinea
b52022f6c6
More dead code removal
2022-09-16 10:08:39 +02:00
Alex Voinea
241c4cc86c
Remove dead code
2022-09-16 10:08:39 +02:00
Alex Voinea
6663f719f6
Remove old fsensor_init()
2022-09-16 10:08:39 +02:00
Alex Voinea
43db24e4fe
IR_sensor_analog voltage readings
2022-09-16 10:08:39 +02:00
Alex Voinea
7224b5c2b6
Remove OQ and add fancy autoload interaction
2022-09-16 10:08:39 +02:00
Alex Voinea
d84e6bda63
Remove old fsensor init
2022-09-16 10:07:49 +02:00
Alex Voinea
338f1f7615
IR volt debugging
2022-09-16 10:07:49 +02:00
Alex Voinea
f03922f7cf
Fix repeated autoload menu
2022-09-16 10:07:49 +02:00
Alex Voinea
45e43137a5
Filament sensor refactoring initial
2022-09-16 10:07:49 +02:00
Alex Voinea
ce0d8f2f12
Correct sensor orientation for old pat9125 init
2022-09-16 10:06:26 +02:00
Alex Voinea
4f08caaa2b
Shorter TWI timeout
2022-09-16 10:06:26 +02:00
Alex Voinea
47e610a2c6
Add disable() to swi2c as well
2022-09-16 10:06:26 +02:00
Alex Voinea
abbf2a3927
twi safe init
2022-09-16 10:06:26 +02:00
Alex Voinea
28c527fece
Use _check instead of register read for probe()
2022-09-16 10:06:26 +02:00
Alex Voinea
54b98c4e63
swi2c safe init
2022-09-16 10:06:26 +02:00
Alex Voinea
8b9bb23652
Unflip the hardcoded flip of the Y axis
2022-09-16 10:06:26 +02:00
Alex Voinea
f4dbf424e4
Use PAT9125 new init sequence
2022-09-16 10:06:26 +02:00
3d-gussner
d706ebb556
Update forgotten MSG_ c=
2022-09-14 11:33:24 +02:00
3d-gussner
6e3be50389
Clean up
2022-09-14 11:33:24 +02:00
3d-gussner
f65e8ae5dd
Add MSG_ALWAYS
2022-09-14 11:33:24 +02:00
3d-gussner
129b646c58
Fix MSG_ c=
...
Add MSG_ to messages.c/h
2022-09-14 11:33:24 +02:00
3d-gussner
ee6821eb0e
Add missing MSG_ c= r=
2022-09-14 11:33:24 +02:00
3d-gussner
270a1086ab
No translation needed
2022-09-14 11:33:24 +02:00
3d-gussner
0a68de0bbe
Update MSG c=xx
...
Mark unused strings as `_n`
2022-09-14 11:33:24 +02:00
3d-gussner
fd2d62dcd4
Set reserved space back after cherry-pick
2022-09-14 11:33:24 +02:00
3d-gussner
83315d0494
Update config.h translation documentation and move language to group2
...
Update fw-build.sh
- Output used space of each translation (easier to troubleshoot)
- Read config.h max size per translation
- output variant .map files (easier to troubleshoot and finding missing/unused messages)
2022-09-14 11:33:24 +02:00
Yuri D'Elia
35c3e3ce68
Remove MSG_M117_V2_CALIBRATION
...
This message is never actually shown on the LCD (it's immediately
overwritten by other content). It also include g-code in a translatable
string, which is not a good idea. It's also otherwise identical to
MSG_V2_CALIBRATION, which we should have used.
Just remove it and save some space in the process.
2022-09-14 11:33:24 +02:00
Yuri D'Elia
c7354bdfe8
lang: Fix usage of new non-translated strings
...
Fix cherry-pick
2022-09-14 11:33:24 +02:00
Yuri D'Elia
7a80252556
lang: Add support for raw catalog references with _R
...
_R marks a raw catalog entry as Referenced (= used) for cases where the
catalog pointers are handled at a lower level.
2022-09-14 11:33:24 +02:00
Yuri D'Elia
05093fbf49
lang: Add inline documentation for the various language macros
2022-09-14 11:33:24 +02:00
Alex Voinea
510f13b24a
Make the diag pins open collector with pullup.
...
Solves random crash detected on startup
2022-09-14 07:39:47 +02:00
Alex Voinea
bb57d99c35
Remove the crashDetection software counters and use sfilt
2022-09-14 07:39:47 +02:00
D.R.racer
996f9943a1
Extract PRINTER_ACTIVE into a noinline function
...
Having the original PRINTER_ACTIVE macro copied at multiple spots doesn't make sense.
Refactoring it into a non-inline function saved ~400 bytes of code.
It should be safe in terms of performance, all occurrences are at non-time critical spots.
2022-09-14 07:31:39 +02:00
Yuri D'Elia
16d666302b
Allow choice positioning. Balance Yes/No messages.
...
Add an additional parameter to control the position of second choice
prompt position (while defaulting to the old).
This allows Yes/No prompts to be equally spaced.
2022-09-14 07:30:57 +02:00
Yuri D'Elia
b41fb8a13a
Unify fullscreen/multiscreen/yes-no prompt message handling
...
Modify lcd_show_multiscreen_message_two_choices_and_wait_P to also
handle single-screen or empty (no-clear) prompts, making other functions
redundant. Saves 76 bytes.
Change existing functions to simply call
lcd_show_multiscreen_message_two_choices_and_wait_P with the correct
arguments.
This changes the prompt of existing Yes/No messages: the previous prompt
would use the last two lines of the LCD, while the new prompt is using
just the last line of the LCD instead.
Translation do not require updates, since the Yes/No translation was
already the same in both implementations.
2022-09-14 07:30:57 +02:00
Yuri D'Elia
d78506a8ea
TM: Rename D70 I to D70 S for consistency with M310 S
2022-09-02 15:59:29 +02:00
Yuri D'Elia
9dbee61b74
TM: Remove an unnecessary fabsf call
...
Ironically gcc was stripping that one for us already.
2022-09-02 15:59:29 +02:00
Yuri D'Elia
81238fbb15
Move MSG_PAUSED_THERMAL_ERROR outside TEMP_MODEL
...
MSG_PAUSED_THERMAL_ERROR is not specific to model-checking and can be
used also on MK25* variants.
2022-09-02 15:59:29 +02:00
Yuri D'Elia
b48c698562
TM: Update default C/R0 estimates for MK3/MK3S variants
2022-09-02 15:59:29 +02:00
Yuri D'Elia
10c524fdb3
TM: Add M310 [F] parameter to enable autotune self-test
2022-09-02 15:59:29 +02:00
Yuri D'Elia
9b9ce1733c
TM: Allow to keep model checking enabled during autotuning
...
Allow running the model checking during autotuning, with the only
exception being the parameter estimation stage where we alter the same
value which is used by the checker (done to conserve memory/code).
With previous changes the model checker will disable/enable itself when
passing through an unavailable R vector entry, allowing to start the
calibration by checking only the stages where the part fan is disabled.
The C/R0 values should be stable enough to provide a fail-safe mechanism
for printers of the same variant right from the factory.
2022-09-02 15:59:29 +02:00
Yuri D'Elia
ff459a6427
TM: Handle dynamic parameter changing
...
Instead of assuming the model state is always valid, allow NAN values to
pass-through the various check/estimation stages.
This allows running the model checker with incomplete parameters (for
example, missing entries in the R vector) and resume automatically.
2022-09-02 15:59:29 +02:00
Yuri D'Elia
54e5702f30
TM: Move initial R0 initialization closer to usage
2022-09-02 15:59:29 +02:00
Yuri D'Elia
9b5ef75b68
Correctly translate thermal model LCD messages
2022-09-02 15:59:29 +02:00
Yuri D'Elia
331de988f7
TM: Avoid an useless float promotion
2022-09-02 15:59:29 +02:00
3d-gussner
66b97683bb
Update build.sh and travis to build EN_ONLY
...
Change FARM_MODE
- Active only on EINSYs in EN_ONLY
- Active on miniRAMBo in all languages
2022-08-30 13:57:43 +02:00
Alex Voinea
f5840e1b02
Fix minirambo build
2022-08-30 13:57:43 +02:00
Alex Voinea
d1c545fdd6
Disable farm mode in config file
2022-08-30 13:57:43 +02:00
Alex Voinea
ec84c22865
Remove unused define
2022-08-30 13:57:43 +02:00
Alex Voinea
2959cc0b64
Do not compile farm lcd_commands
2022-08-30 13:57:43 +02:00
Alex Voinea
2b4c2127e6
Make lcd function static
2022-08-30 13:57:43 +02:00
Alex Voinea
3537024ba2
Remove forgotten config in MK2_minirambo_1.0a
2022-08-30 13:57:43 +02:00
Alex Voinea
8033b65a02
Isolate farm preheat config
2022-08-30 13:57:43 +02:00
Alex Voinea
435ee66bdd
Move all farm configuration to header
2022-08-30 13:57:43 +02:00
Alex Voinea
d049d09623
Isolate FARM_DEFAULT_SAFETYTIMER_TIME_ms
2022-08-30 13:57:43 +02:00
Alex Voinea
39eb728d54
More farm optimizations
...
Kudos @gudnimg
2022-08-30 13:57:43 +02:00
Alex Voinea
d1c30c338f
Fix farmless mode
2022-08-30 13:57:43 +02:00
Alex Voinea
bef7b086e3
Isolate the entire farm and statistics code
2022-08-30 13:57:43 +02:00
Alex Voinea
7d597eb8b0
Move farm mode to separate file
2022-08-30 13:57:43 +02:00
Alex Voinea
4e7d686b83
Merge pull request #3574 from leptun/extra_optimizations
...
More optimizations for 3.12 to fit
2022-08-29 19:25:46 +03:00
Alex Voinea
692f51c51e
Save target bed temperature, not current temperature
2022-08-28 11:21:17 +03:00
Guðni Már Gilbert
37c9dcbe53
Optimise calculations to use hypot() where possible
...
flash: -122
RAM: 0
It is defined: hypot(x,y) = sqrtf(x*x + y*y)
2022-08-26 19:36:28 +03:00
Alex Voinea
7d72f0ee2e
better lcd printing for IP address
...
flash: -46
RAM: 0
2022-08-26 19:33:53 +03:00
Guðni Már Gilbert
4e798c9ed1
Remove unused variable maxlimit_status
...
flash: 0
RAM: -1
2022-08-26 19:29:32 +03:00
Guðni Már Gilbert
7711969e57
ftostr12ns: change xx from long to int
...
flash: -44
RAM: 0
Largest expected number is 999 after the multiplication by 100.
I measured the execution time drops from ~170us to ~73us.
2022-08-26 19:28:36 +03:00
Guðni Már Gilbert
88e0e33fb2
Use set_destination_to_current instead of memcpy
...
flash: -14
RAM: 0
2022-08-26 19:27:16 +03:00
Guðni Már Gilbert
7d86a0d121
Reduce a few magic numbers for FILENAME_LENGTH
...
flash: 0
RAM: 0
2022-08-26 19:26:26 +03:00
Guðni Már Gilbert
22582e560e
Remove one redundant st_synchronize() call
...
flash: -4
RAM: 0
st_synchronize() is called just before leaving gcode_G28() so we don't need to call it again just after leaving gcode_G28()
2022-08-26 19:25:07 +03:00
Guðni Már Gilbert
89fc9f7a62
Optimise lcd_menu_show_sensors_state()
...
flash: -22
RAM: 0
menu_lcd_lcdupdate_func() takes care of starting lcd_timeoutToStatus if the knob is clicked.
When the knob is clicked we only want to back out of the menu.
This changes makes the menus slightly more conistant behind the scenes.
2022-08-26 19:22:23 +03:00
Guðni Már Gilbert
c2340d3648
lcd_babystep_z should not start lcd_timeoutToStatus
...
flash: -8
RAM: 0
When the menu is entered and left the function
menu_lcd_lcdupdate_func() takes care of resetting the timer.
Currently the firmware will reset the timer twice when the lcd_babystep_z menu is entered. This commit fixes that.
2022-08-26 19:20:22 +03:00
Guðni Már Gilbert
74d6aead2f
Optimise if statements in lcd_tune_menu
...
flash: -10
RAM: 0
I am basically combining two if statements if(SilentModeMenu == SILENT_MODE_NORMAL)
2022-08-26 19:17:07 +03:00
Alex Voinea
25350dfbbc
Remove unused variable bFilamentFirstRun
...
flash: 0
RAM: -1
2022-08-26 19:14:40 +03:00
Alex Voinea
4ded6f195e
Move string to progmem
...
flash: -52
RAM: -6
2022-08-26 18:59:53 +03:00
Guðni Már Gilbert
f7ae3039f8
Don't include M851 in build if Auto Bed Leveling is not enabled
...
The variable cs.zprobe_zoffset is not used unless
auto bed leveling is enabled
2022-08-26 15:35:28 +00:00
Guðni Már Gilbert
d87999a020
workDirDepth can be one byte
...
We set the max working directory depth to 6 (see MAX_DIR_DEPTH)
Changes save 1 byte of SRAM and 50 bytes of flash
2022-08-26 10:56:02 +02:00
Alex Voinea
c7762386df
Merge pull request #3565 from wavexx/m115_respect_settings
...
Do not prompt on M115 if FW version check has been disabled
2022-08-25 19:43:12 +03:00
Yuri D'Elia
cf1edc85c3
Set a few function attributes to conserve space
2022-08-25 16:50:06 +02:00
Yuri D'Elia
7c8539a9f9
Report correct fan speeds in M155 during calibration
2022-08-25 16:15:51 +02:00
Alex Voinea
78534f3b48
Start at the first segment, not the last segment
2022-08-24 20:19:26 +03:00