Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LCD_BED_TRAMMING fixes #25425

Merged
merged 31 commits into from
Mar 18, 2023

Conversation

Farva42
Copy link
Contributor

@Farva42 Farva42 commented Feb 24, 2023

Description

This allows LCD_BED_TRAMMING to work with a stowable probe like MAG_MOUNTED_PROBE, SERVO_PROBE, or TOUCH_MI_PROBE. Before if the probe was not deployed before initiating tramming the printer would not attempt to deploy the probe and loop continually raising Z till it hit Z max.
The no_mem was added to reduce excessive movement before and after probe deploy/stow moves.

This also fixes bed tramming ignoring probe offsets which can cause issues with the printer trying to probe off the print bed.

Requirements

LCD_BED_TRAMMING to be enabled with BED_TRAMMING_USE_PROBE to see the offset issue.
both the above and a prob covered in HAS_STOWABLE_PROBE for that fix

Benefits

Lets printers with HAS_STOWABLE_PROBE use LCD_BED_TRAMMING easily and fixes the probe offset issue.

Related Issues

(#24728)

Fix probe offset not being applied & enable non BLtouch probes to be used without needing to deploy the probe prior to initiating bed tramming
@Farva42
Copy link
Contributor Author

Farva42 commented Feb 24, 2023

Bah sneaky BLtouch flagging HAS_STOWABLE_PROBE via being a Servo probe. I need to guard the probe.deploy and stows from getting called with a bltouch enabled before this is good.

@thinkyhead thinkyhead force-pushed the Bed-corners-leveling branch 3 times, most recently from d36f160 to aba67e5 Compare February 25, 2023 23:32
@thinkyhead thinkyhead force-pushed the Bed-corners-leveling branch 4 times, most recently from 9a103de to 3d86ae6 Compare February 26, 2023 00:11
@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 2 times, most recently from e90c213 to 4b9bb85 Compare March 7, 2023 05:17
This will stop issues if Bed_tramming is enabled with a probe but without tramming using probe.
@Farva42
Copy link
Contributor Author

Farva42 commented Mar 12, 2023

This should be good to go now. If wanted the DISABLED(BLTOUCH) can come out of the NEEDS_PROBE_DEPLOY if wanted but keeping it will mean that it would only deploy before probing instead of potentially being deployed while moving.

@thinkyhead
Copy link
Member

It made sense to merge _lcd_bed_tramming_get_next_position and _lcd_goto_next_corner which also saves some SRAM by removing the global corner_point. Hopefully there are no egregious typos. With the other neutral refinements already merged, this PR is reduced down to the logical changes related to NEEDS_PROBE_DEPLOY. Please confirm that it is still behaving as it was.

I have also been working on general probe refinements, but of course this procedure is different from regular probing, so there are no standard Probe class methods to handle its quirks. The main thing I'm still a little hung up on is when to use line_to_z(current_position.z + BED_TRAMMING_Z_HOP) versus just BED_TRAMMING_Z_HOP. It used to be that when BED_TRAMMING_USE_PROBE is enabled _lcd_goto_next_corner adds current_position.z, and otherwise it doesn't. So I've altered _lcd_goto_next_corner to always add current_position.z but maybe that is inappropriate. It would be worth comparing the behavior with and without BED_TRAMMING_USE_PROBE to make sure the raise amounts are appropriate in each case. I will test this tomorrow evening if you haven't already given feedback.

@Farva42
Copy link
Contributor Author

Farva42 commented Mar 17, 2023

I just got some time to test this. It is now causing looping with use probe enabled it will never exit and just continues to probe over and over. It is also not prompting to raise the bed if a corner is low it will just probe down to where it last hit and then go back up and go to the next corner. I'm going to start testing to see what caused it to start looping.

@Farva42
Copy link
Contributor Author

Farva42 commented Mar 17, 2023

I found the cause of the looping. The line_to_z move down to BED_TRAMMING_HEIGHT was causing the probe to be triggered and causing issues.

In regards to the Tramming hop, having the current position added in was causing a massive hop for me as it would be adding it to the Z height after stowing the probe from the homing which for my setup is 20mm so my hop would be 24mm every time. It could be changed to use Z_CLEARANCE_BETWEEN_PROBES as that should be a safe value as it would already be used between other probings. But I think having the current position can cause some excessive hops in some situations.

@thinkyhead thinkyhead merged commit faa3233 into MarlinFirmware:bugfix-2.1.x Mar 18, 2023
thinkyhead added a commit that referenced this pull request Mar 18, 2023
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
@NarryG
Copy link

NarryG commented Mar 23, 2023

I just got some time to test this. It is now causing looping with use probe enabled it will never exit and just continues to probe over and over. It is also not prompting to raise the bed if a corner is low it will just probe down to where it last hit and then go back up and go to the next corner. I'm going to start testing to see what caused it to start looping.

I'm running the latest bugfix build with this commit merged and am experiencing a similar but slightly different issue with my BLTouch.

It will probe a corner over and over again until I slightly adjust it so it doesn't contact, where it will then prompt me to raise the corner back up.
The probe appears to be deploying while moving back upwards, contacting the plate, which I believe is resulting in a bad reading. If I use this technique of adjusting the bed so it doesn't trigger and properly prompts me to raise the bed, I do not get level corners.

I am currently running a print but can provide a video tonight.

Running on an Ender 3 Pro with an SKR Mini E3 v3 board. BL Touch

shadow578 added a commit to shadow578/Marlin-H32 that referenced this pull request Apr 7, 2023
* [cron] Bump distribution date (2023-03-05)

* 🐛 Fix apply_power for SPINDLE_SERVO (MarlinFirmware#25465)

* 🐛 Fix Flash EEPROM for STM32G0B1CB (MarlinFirmware#25469)

* 🌐 Update Turkish language (MarlinFirmware#25447)

* [cron] Bump distribution date (2023-03-06)

* 🧑‍💻 Script to make non-accented languages

* 🌐 Update Turkish language

Followup to MarlinFirmware#25447

* [cron] Bump distribution date (2023-03-07)

* 🌐 DGUS Reloaded non-accented French (MarlinFirmware#25443)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* 🔧 Add DGUS_LCD_UI RELOADED conditions

* [cron] Bump distribution date (2023-03-08)

* ✨ Extra Z Servo Probe options (MarlinFirmware#21427)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* 🔧 Update some config.ini options

* 🔨 VSCode + Devcontainer support (MarlinFirmware#22420)

* [cron] Bump distribution date (2023-03-09)

* ✨ Z_SAFE_HOMING_POINT_ABSOLUTE (MarlinFirmware#23069)

* [cron] Bump distribution date (2023-03-10)

* ✨ BTT Octopus Max EZ 1.0, SKR 3.0 / 3.0 EZ (MarlinFirmware#25387)

BTT Octopus Max EZ V1.0 (STM32H723VE/ZE), SKR V3.0 / V3.0 EZ (STM32H723VG)

* [cron] Bump distribution date (2023-03-11)

* 🐛 Fix Anet ET4 SD_SS_PIN (MarlinFirmware#25492)

* [cron] Bump distribution date (2023-03-12)

* BTT Octopus … followup (MarlinFirmware#25495)

Followup to MarlinFirmware#25387

* ⚡️ Exit from ISR on AVR already does sei

Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com>

* 🎨 Cosmetic stepper updates

Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com>

* ✨ MAX7219_DEBUG_MULTISTEPPING

Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com>

* ⚡️ Use hal_timer_t for timing vars

Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com>

* ⚡️ Use cached la_active state

Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com>

* ⚡️ Use AxisFlags for step_needed

Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com>

* [cron] Bump distribution date (2023-03-13)

* ⚡️ Major shaper optimization

Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com>

* ⚡️ Set steps_per_isr in calc_multistep_timer_interval

Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com>

* 🔧 Expose MULTISTEPPING_LIMIT option

Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com>

* ⚡️ Optimize speed lookup for AVR

Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com>

* ⚡️ Update ISR cycle counts

Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com>

* 📺 DGUS_RELOADED 1.03 (MarlinFirmware#25490)

* [cron] Bump distribution date (2023-03-14)

* 🐛 Fix Polargraph without Z (MarlinFirmware#25514)

* 🐛 Fix long filename read/report (MarlinFirmware#25509)

* 🩹 Fix IA_CREALITY float, startup (MarlinFirmware#25493)

Followup to MarlinFirmware#25440

* [cron] Bump distribution date (2023-03-15)

* 🎨 Misc. formatting

* 🎨 Misc. tramming menu cleanup (MarlinFirmware#25519)

* 🩹 Fan Menu / Status fixes

Followup to MarlinFirmware#21888

* 🩹 Fix DWIN MarlinUI Fan/E/XY (MarlinFirmware#25502)

* [cron] Bump distribution date (2023-03-16)

* 🔧 Safer default for Z_MIN_PROBE_PIN override (MarlinFirmware#25524)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* ♻️ Refactor PROBE_PT_[123]

* ♻️ Refactor UBL 'G29 J'

* [cron] Bump distribution date (2023-03-17)

* 🚸 Refinements for UBL G29 J (tilt mesh) (MarlinFirmware#25486)

* [cron] Bump distribution date (2023-03-18)

* 🔧 Optional MPC_AUTOTUNE to save 5.5 - 5.8KB

* ✨ Sovol v1.3.1 (Sovol SV06) (MarlinFirmware#25267)

* 🧑‍💻 More IntelliSense-friendly declares

* 🎨 Clean up IA_CREALITY includes (MarlinFirmware#25530)

* 🎨 Suppress warning (MarlinFirmware#25529)

* 🔧 SQUARE_WAVE_STEPPING => EDGE_STEPPING (MarlinFirmware#25526)

Co-Authored-By: Scott Lahteine <thinkyhead@users.noreply.github.com>

* 🚸 Improve Z-Probe raise for deploy (MarlinFirmware#25498)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* 🐛 Fix LVGL / MKS WiFi long filename (MarlinFirmware#25483)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* 🔨 Fix STM32H723Vx_btt for case-sensitive (MarlinFirmware#25535)

* 🐛 Fix FYSETC Cheetah v2.0 Servo/Probe pins (MarlinFirmware#24635)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* 🐛 Prevent MPC E-permm overrun in Load Filament (MarlinFirmware#25531)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* 🚸 Fix / improve LCD_BED_TRAMMING (MarlinFirmware#25425)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* 🔧 Sanity-check PRINTCOUNTER_SAVE_INTERVAL + ESP32 I2S Exp (MarlinFirmware#25527)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* ⚡️ Smart Adaptive Multi-Stepping (MarlinFirmware#25474)

* 🚸 Temperature Variance Monitor tweaks (MarlinFirmware#23571)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* 🩹 Fix Ender 2 stock LCD (MarlinFirmware#25538)

* ⚡️ Misc. optimizations

* [cron] Bump distribution date (2023-03-19)

* ✨ REPORT_ADAPTIVE_FAN_SLOWING (MarlinFirmware#25537)

* 🩹 Fix a serial_ternary

* ✨ Z_SERVO_DEACTIVATE_AFTER_STOW (MarlinFirmware#24215)

* 🐛 Avoid step rate overflow (MarlinFirmware#25541)

* [cron] Bump distribution date (2023-03-20)

* ✨ PROBING_TOOL (MarlinFirmware#24411)

* [cron] Bump distribution date (2023-03-22)

* ✨ FILAMENT_SWITCH_AND_MOTION (MarlinFirmware#25548)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* 🧑‍💻 ExtUI::onSetPowerLoss

* [cron] Bump distribution date (2023-03-23)

* 🎨 calibration_stage => stage

* [cron] Bump distribution date (2023-03-24)

* 🩹 Reset touch screen calibration on failure (MarlinFirmware#25334)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* 🎨 TMC SPI Pins

Co-Authored-By: Martin Turski <turningtides@outlook.de>

* 🎨 Pins header comments

Co-Authored-By: Martin Turski <turningtides@outlook.de>

* 🎨 Wrap font includes

Co-Authored-By: Martin Turski <turningtides@outlook.de>

* 🎨 LPC_SOFTWARE_SPI => SOFTWARE_SPI

Co-Authored-By: Martin Turski <turningtides@outlook.de>

* 🔨 INI Updates

Co-Authored-By: Martin Turski <turningtides@outlook.de>

* 🎨 Misc. fixes, cleanup

Co-Authored-By: Martin Turski <turningtides@outlook.de>

* 🩹 Update TRONXY_V10 SPI_FLASH pins

* [cron] Bump distribution date (2023-03-25)

* 🩹 Fix Chitu3D V6 default probe pin (MarlinFirmware#25552)

* 🔧 Remove TVPM warning (MarlinFirmware#25551)

* 🐛 Fix MKS Gen L 2.1 MOSFET pins (MarlinFirmware#25542)

* 🩹 Refine MKS boards with a dedicated FAN port (MarlinFirmware#25567)

* 🎨 Rename FAN_PIN to FAN0_PIN (MarlinFirmware#25568)

* 📝 Fix spelling (MarlinFirmware#25563)

* [cron] Bump distribution date (2023-03-26)

* 🎨 Timer tweaks

* 🔧 Refactor endstop state config (MarlinFirmware#25574)

* ✨ AnyCubic Vyper / Vyper LCD (MarlinFirmware#25405)

* 🩹 Fix Touch Calibration first point (MarlinFirmware#25298)

* 🧑‍💻 Auto Fan / Cooler Fan updates (MarlinFirmware#25554)

* 🐛 Prevent divide-by-zero in calc_timer_interval (MarlinFirmware#25557)

* 🔧 Sanity-check for endstop inverting

Followup to MarlinFirmware#25574

* 🔧 Clarify axis disable / timeout (MarlinFirmware#25571)

* [cron] Bump distribution date (2023-03-27)

* 🔨 Fix thread-unsafe deque iteration

* 🐛 Fix AnyCubic Vyper ProcessPanelRequest

Followup to MarlinFirmware#25405

* 🎨 Suppress a type warning (MarlinFirmware#25575)

* ⚡️ Improve TFT DMA for STM32 (MarlinFirmware#25359)

* 🐛 Fix M23 long filename support (MarlinFirmware#25540)

* [cron] Bump distribution date (2023-03-28)

* 🎨 Misc. cleanup

* 🔧 Fix up WiFi options (MarlinFirmware#25586)

* 🔨 Update config.ini endstop states

Followup to MarlinFirmware#25574

* [cron] Bump distribution date (2023-03-29)

* 🔧 Impose Hephestos 2 Bed Kit requirements (MarlinFirmware#25585)

* 🎨 Remove unused ProUI : UBLValidMesh (MarlinFirmware#25591)

* 🔨 Improve Docker local tests support (MarlinFirmware#25583)

* 🔨 MarlinSimUI updates (MarlinFirmware#25589)

* [cron] Bump distribution date (2023-03-30)

* 🩹 Update Trigorilla V006 fan pin

Followup to MarlinFirmware#25568

* 🩹 Fix Ender-3 V2 with no fan

* 🐛 Fix _HAS_FAN for fan on Pin 0

* 🎨 Refine probe, more debug

* 🩹 Fix displayed mix percentages

* [cron] Bump distribution date (2023-03-31)

* 🔧  DGUS_LCD_UI selectable options

* 🔧 Fix SENSORLESS hit state error (MarlinFirmware#25604)

* 🧑‍💻 CardReader adjustments (MarlinFirmware#25611)

* [cron] Bump distribution date (2023-04-01)

* 🎨  HAS_SHAPING => HAS_ZV_SHAPING

* ✨ Fixed-Time Motion with Input Shaping by Ulendo (MarlinFirmware#25394)

Co-authored-by: Ulendo Alex <alex@ulendo.io>

* 🐛 Fix Long FIlename lookup (MarlinFirmware#25598)

* 🌐 Update Italian language (MarlinFirmware#25587)

* 🔨 Move Docker local test script

Followup to MarlinFirmware#25583

* 🩹 FT_MOTION Followup

* 🐛 Ensure root for 'M503 C'

* 🐛 Clean up DELTA babystep Z

* 🐛 INVERT_*_DIR for FT_MOTION (MarlinFirmware#25637)

* 🔧 Move DOGLCD options

* 🧑‍💻 Update pinsformat.js

* 📝 Update Ender # labels

* [cron] Bump distribution date (2023-04-07)

* 🚸 Support CoreXY without Z (MarlinFirmware#25630)

* 🎨 Apply const (MarlinFirmware#25643)

* update `pins_Aquila_X2.h` to new format

---------

Co-authored-by: thinkyhead <thinkyhead@users.noreply.github.com>
Co-authored-by: Hans-Christian Ebke <ebke@cs.rwth-aachen.de>
Co-authored-by: alextrical <35117191+alextrical@users.noreply.github.com>
Co-authored-by: Abdullah YILMAZ <h.abdullahyilmaz@hotmail.com>
Co-authored-by: albatorsssx <albator_ssx@hotmail.com>
Co-authored-by: Kurt Haenen <Misterke@users.noreply.github.com>
Co-authored-by: Sion Williams <sion5@hotmail.co.uk>
Co-authored-by: Evgeniy Zhabotinskiy <evg-zhabotinsky@users.noreply.github.com>
Co-authored-by: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com>
Co-authored-by: tombrazier <68918209+tombrazier@users.noreply.github.com>
Co-authored-by: Neo2003 <Neo2003@users.noreply.github.com>
Co-authored-by: jbubik <jbubik@centrum.cz>
Co-authored-by: Eduard Sukharev <sukharev.eh@gmail.com>
Co-authored-by: Davide Rombolà <davide.rombola@gmail.com>
Co-authored-by: dwzg <50058606+dwzg@users.noreply.github.com>
Co-authored-by: ellensp <530024+ellensp@users.noreply.github.com>
Co-authored-by: jamespearson04 <jamespearson04@hotmail.co.uk>
Co-authored-by: Michael Hill <mhill@hillsoftware.com>
Co-authored-by: James Gilliland <neclimdul@gmail.com>
Co-authored-by: Liam Powell <liam+github@liampwll.com>
Co-authored-by: George Fu <nailao_5918@163.com>
Co-authored-by: Piotr Paczyński <ppaczyn@gmail.com>
Co-authored-by: Farva42 <100859196+Farva42@users.noreply.github.com>
Co-authored-by: John Robertson <john@cirtech.co.uk>
Co-authored-by: John Lagonikas <39417467+zeleps@users.noreply.github.com>
Co-authored-by: StevilKnevil <stevilknevil@hotmail.co.uk>
Co-authored-by: FilippoR <filippo.rossoni@gmail.com>
Co-authored-by: BIGTREETECH <38851044+bigtreetech@users.noreply.github.com>
Co-authored-by: Martin Turski <turningtides@outlook.de>
Co-authored-by: Giuliano Zaro <3684609+GMagician@users.noreply.github.com>
Co-authored-by: Bob Kuhn <bob.kuhn@att.net>
Co-authored-by: Alexander Gavrilenko <jmz52@users.noreply.github.com>
Co-authored-by: Andrew <18502096+classicrocker883@users.noreply.github.com>
Co-authored-by: John Unland <junland.foss@gmail.com>
Co-authored-by: Chris Pepper <p3p@p3psoft.co.uk>
Co-authored-by: Ulendo Alex <alex@ulendo.io>
EvilGremlin pushed a commit to EvilGremlin/Marlin that referenced this pull request Apr 8, 2023
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
thinkyhead added a commit that referenced this pull request Apr 10, 2023
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
thinkyhead added a commit to thinkyhead/Marlin that referenced this pull request May 16, 2023
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
EvilGremlin pushed a commit to EvilGremlin/Marlin that referenced this pull request May 17, 2023
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
tspiva pushed a commit to tspiva/Marlin that referenced this pull request May 25, 2023
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Andy-Big pushed a commit to Andy-Big/Marlin_FB_Reborn that referenced this pull request Jul 9, 2023
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants