ソースを参照

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
     }
1993
     }
1994
 
1994
 
1995
     void set_bltouch_deployed(const bool deploy) {
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
       bltouch_command(deploy ? BLTOUCH_DEPLOY : BLTOUCH_STOW);
2009
       bltouch_command(deploy ? BLTOUCH_DEPLOY : BLTOUCH_STOW);
1997
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2010
       #if ENABLED(DEBUG_LEVELING_FEATURE)
1998
         if (DEBUGGING(LEVELING)) {
2011
         if (DEBUGGING(LEVELING)) {
2023
     #if ENABLED(BLTOUCH)
2036
     #if ENABLED(BLTOUCH)
2024
       if (deploy && TEST_BLTOUCH()) {      // If BL-Touch says it's triggered
2037
       if (deploy && TEST_BLTOUCH()) {      // If BL-Touch says it's triggered
2025
         bltouch_command(BLTOUCH_RESET);    // try to reset it.
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
         if (TEST_BLTOUCH()) {              // If it still claims to be triggered...
2044
         if (TEST_BLTOUCH()) {              // If it still claims to be triggered...
2029
           SERIAL_ERROR_START;
2045
           SERIAL_ERROR_START;
2030
           SERIAL_ERRORLNPGM(MSG_STOP_BLTOUCH);
2046
           SERIAL_ERRORLNPGM(MSG_STOP_BLTOUCH);

読み込み中…
キャンセル
保存