소스 검색

add BLTouch retry to a second place & add/update delays

=================================================

implement requested changes

=================================================

remove delays (they're in another PR) & move return
Bob-the-Kuhn 8 년 전
부모
커밋
a44b3432c1
1개의 변경된 파일18개의 추가작업 그리고 2개의 파일을 삭제
  1. 18
    2
      Marlin/Marlin_main.cpp

+ 18
- 2
Marlin/Marlin_main.cpp 파일 보기

@@ -1993,6 +1993,19 @@ static void clean_up_after_endstop_or_probe_move() {
1993 1993
     }
1994 1994
 
1995 1995
     void set_bltouch_deployed(const bool deploy) {
1996
+      if (deploy && TEST_BLTOUCH()) {      // If BL-Touch says it's triggered
1997
+        bltouch_command(BLTOUCH_RESET);    // try to reset it.
1998
+        bltouch_command(BLTOUCH_DEPLOY);   // Also needs to deploy and stow to
1999
+        bltouch_command(BLTOUCH_STOW);     // clear the triggered condition.
2000
+        safe_delay(1500);             // wait for internal self test to complete
2001
+                                           //   measured completion time was 0.65 seconds
2002
+                                           //   after reset, deploy & stow sequence
2003
+        if (TEST_BLTOUCH()) {              // If it still claims to be triggered...
2004
+          SERIAL_ERROR_START;
2005
+          SERIAL_ERRORLNPGM(MSG_STOP_BLTOUCH);
2006
+          stop();                          // punt!
2007
+        }
2008
+      }
1996 2009
       bltouch_command(deploy ? BLTOUCH_DEPLOY : BLTOUCH_STOW);
1997 2010
       #if ENABLED(DEBUG_LEVELING_FEATURE)
1998 2011
         if (DEBUGGING(LEVELING)) {
@@ -2023,8 +2036,11 @@ static void clean_up_after_endstop_or_probe_move() {
2023 2036
     #if ENABLED(BLTOUCH)
2024 2037
       if (deploy && TEST_BLTOUCH()) {      // If BL-Touch says it's triggered
2025 2038
         bltouch_command(BLTOUCH_RESET);    // try to reset it.
2026
-        set_bltouch_deployed(true);        // Also needs to deploy and stow to
2027
-        set_bltouch_deployed(false);       // clear the triggered condition.
2039
+        bltouch_command(BLTOUCH_DEPLOY);   // Also needs to deploy and stow to
2040
+        bltouch_command(BLTOUCH_STOW);     // clear the triggered condition.
2041
+        safe_delay(1500);                  // wait for internal self test to complete
2042
+                                           //   measured completion time was 0.65 seconds
2043
+                                           //   after reset, deploy & stow sequence
2028 2044
         if (TEST_BLTOUCH()) {              // If it still claims to be triggered...
2029 2045
           SERIAL_ERROR_START;
2030 2046
           SERIAL_ERRORLNPGM(MSG_STOP_BLTOUCH);

Loading…
취소
저장