Browse Source

Merge pull request #6327 from Bob-the-Kuhn/M43-toggle-&-Z-probe-fixes

M43 Toggle & Z servo test - fix bug & add another check
Scott Lahteine 7 years ago
parent
commit
de569e3d4e
2 changed files with 10 additions and 8 deletions
  1. 1
    1
      .travis.yml
  2. 9
    7
      Marlin/Marlin_main.cpp

+ 1
- 1
.travis.yml View File

334
   # RA_CONTROL_PANEL
334
   # RA_CONTROL_PANEL
335
   #
335
   #
336
   - restore_configs
336
   - restore_configs
337
-  - opt_enable RA_CONTROL_PANEL
337
+  - opt_enable RA_CONTROL_PANEL PINS_DEBUGGING
338
   - build_marlin
338
   - build_marlin
339
   #
339
   #
340
   ######## I2C LCD/PANELS ##############
340
   ######## I2C LCD/PANELS ##############

+ 9
- 7
Marlin/Marlin_main.cpp View File

5841
     #if !(NUM_SERVOS >= 1 && HAS_SERVO_0)
5841
     #if !(NUM_SERVOS >= 1 && HAS_SERVO_0)
5842
       SERIAL_ERROR_START;
5842
       SERIAL_ERROR_START;
5843
       SERIAL_ERRORLNPGM("SERVO not setup");
5843
       SERIAL_ERRORLNPGM("SERVO not setup");
5844
+    #elif !HAS_Z_SERVO_ENDSTOP
5845
+      SERIAL_ERROR_START;
5846
+      SERIAL_ERRORLNPGM("Z_ENDSTOP_SERVO_NR not setup");
5844
     #else
5847
     #else
5845
-
5846
-      #if !defined(z_servo_angle)
5847
-        const int z_servo_angle[2] = Z_SERVO_ANGLES;
5848
-      #endif
5849
-      uint8_t probe_index = code_seen('P') ? code_value_byte() : 0;
5848
+      uint8_t probe_index = code_seen('P') ? code_value_byte() : Z_ENDSTOP_SERVO_NR;
5850
       SERIAL_PROTOCOLLNPGM("Servo probe test");
5849
       SERIAL_PROTOCOLLNPGM("Servo probe test");
5851
       SERIAL_PROTOCOLLNPAIR(".  using index:  ", probe_index);
5850
       SERIAL_PROTOCOLLNPAIR(".  using index:  ", probe_index);
5852
       SERIAL_PROTOCOLLNPAIR(".  deploy angle: ", z_servo_angle[0]);
5851
       SERIAL_PROTOCOLLNPAIR(".  deploy angle: ", z_servo_angle[0]);
5862
         probe_inverting = Z_MIN_ENDSTOP_INVERTING;
5861
         probe_inverting = Z_MIN_ENDSTOP_INVERTING;
5863
       #elif ENABLED(Z_MIN_PROBE_ENDSTOP)
5862
       #elif ENABLED(Z_MIN_PROBE_ENDSTOP)
5864
         #define PROBE_TEST_PIN Z_MIN_PROBE_PIN
5863
         #define PROBE_TEST_PIN Z_MIN_PROBE_PIN
5865
-
5866
         SERIAL_PROTOCOLLNPAIR(". probe uses Z_MIN_PROBE_PIN: ", PROBE_TEST_PIN);
5864
         SERIAL_PROTOCOLLNPAIR(". probe uses Z_MIN_PROBE_PIN: ", PROBE_TEST_PIN);
5867
         SERIAL_PROTOCOLLNPGM(". uses Z_MIN_PROBE_ENDSTOP_INVERTING (ignores Z_MIN_ENDSTOP_INVERTING)");
5865
         SERIAL_PROTOCOLLNPGM(". uses Z_MIN_PROBE_ENDSTOP_INVERTING (ignores Z_MIN_ENDSTOP_INVERTING)");
5868
         SERIAL_PROTOCOLPGM(". Z_MIN_PROBE_ENDSTOP_INVERTING: ");
5866
         SERIAL_PROTOCOLPGM(". Z_MIN_PROBE_ENDSTOP_INVERTING: ");
5887
       if (probe_inverting != deploy_state) SERIAL_PROTOCOLLNPGM("WARNING - INVERTING setting probably backwards");
5885
       if (probe_inverting != deploy_state) SERIAL_PROTOCOLLNPGM("WARNING - INVERTING setting probably backwards");
5888
       refresh_cmd_timeout();
5886
       refresh_cmd_timeout();
5889
       if (deploy_state != stow_state) {
5887
       if (deploy_state != stow_state) {
5890
-        SERIAL_PROTOCOLLNPGM("TLTouch detected");         // BLTouch clone?
5888
+        SERIAL_PROTOCOLLNPGM("BLTouch clone detected");
5891
         if (deploy_state) {
5889
         if (deploy_state) {
5892
           SERIAL_PROTOCOLLNPGM(".  DEPLOYED state: HIGH (logic 1)");
5890
           SERIAL_PROTOCOLLNPGM(".  DEPLOYED state: HIGH (logic 1)");
5893
           SERIAL_PROTOCOLLNPGM(".  STOWED (triggered) state: LOW (logic 0)");
5891
           SERIAL_PROTOCOLLNPGM(".  STOWED (triggered) state: LOW (logic 0)");
5896
           SERIAL_PROTOCOLLNPGM(".  DEPLOYED state: LOW (logic 0)");
5894
           SERIAL_PROTOCOLLNPGM(".  DEPLOYED state: LOW (logic 0)");
5897
           SERIAL_PROTOCOLLNPGM(".  STOWED (triggered) state: HIGH (logic 1)");
5895
           SERIAL_PROTOCOLLNPGM(".  STOWED (triggered) state: HIGH (logic 1)");
5898
         }
5896
         }
5897
+        #if ENABLED(BLTOUCH)
5898
+          SERIAL_PROTOCOLLNPGM("ERROR: BLTOUCH enabled - set this device up as a Z Servo Probe with inverting as true.");
5899
+        #endif
5900
+
5899
       }
5901
       }
5900
       else {                                           // measure active signal length
5902
       else {                                           // measure active signal length
5901
         servo[probe_index].move(z_servo_angle[0]); //deploy
5903
         servo[probe_index].move(z_servo_angle[0]); //deploy

Loading…
Cancel
Save