Bladeren bron

Implement SERVO_DELAY as array

This modify give SERVO_DELAY x servo basis
GMagician 7 jaren geleden
bovenliggende
commit
e9c72978c7
37 gewijzigde bestanden met toevoegingen van 39 en 36 verwijderingen
  1. 1
    0
      .travis.yml
  2. 1
    1
      Marlin/Conditionals_LCD.h
  3. 1
    1
      Marlin/Configuration.h
  4. 1
    1
      Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h
  5. 1
    1
      Marlin/example_configurations/AliExpress/CL-260/Configuration.h
  6. 1
    1
      Marlin/example_configurations/Anet/A6/Configuration.h
  7. 1
    1
      Marlin/example_configurations/Anet/A8/Configuration.h
  8. 1
    1
      Marlin/example_configurations/BQ/Hephestos/Configuration.h
  9. 1
    1
      Marlin/example_configurations/BQ/Hephestos_2/Configuration.h
  10. 1
    1
      Marlin/example_configurations/BQ/WITBOX/Configuration.h
  11. 1
    1
      Marlin/example_configurations/Cartesio/Configuration.h
  12. 1
    1
      Marlin/example_configurations/Creality/CR-10/Configuration.h
  13. 1
    1
      Marlin/example_configurations/Felix/Configuration.h
  14. 1
    1
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  15. 1
    1
      Marlin/example_configurations/Geeetech/GT2560/Configuration.h
  16. 1
    1
      Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h
  17. 1
    1
      Marlin/example_configurations/Infitary/i3-M508/Configuration.h
  18. 1
    1
      Marlin/example_configurations/Malyan/M150/Configuration.h
  19. 1
    1
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  20. 1
    1
      Marlin/example_configurations/RigidBot/Configuration.h
  21. 1
    1
      Marlin/example_configurations/SCARA/Configuration.h
  22. 1
    1
      Marlin/example_configurations/TinyBoy2/Configuration.h
  23. 1
    1
      Marlin/example_configurations/Velleman/K8200/Configuration.h
  24. 1
    1
      Marlin/example_configurations/Velleman/K8400/Configuration.h
  25. 1
    1
      Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h
  26. 1
    1
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  27. 1
    1
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h
  28. 1
    1
      Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h
  29. 1
    1
      Marlin/example_configurations/delta/generic/Configuration.h
  30. 1
    1
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  31. 1
    1
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  32. 1
    1
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  33. 1
    1
      Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h
  34. 1
    1
      Marlin/example_configurations/makibox/Configuration.h
  35. 1
    1
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  36. 1
    1
      Marlin/example_configurations/wt150/Configuration.h
  37. 3
    1
      Marlin/servo.cpp

+ 1
- 0
.travis.yml Bestand weergeven

114
   #
114
   #
115
   - restore_configs
115
   - restore_configs
116
   - opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
116
   - opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
117
+  - opt_set NUM_SERVOS 1
117
   - opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
118
   - opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
118
   - opt_enable_adv EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET
119
   - opt_enable_adv EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET
119
   - build_marlin
120
   - build_marlin

+ 1
- 1
Marlin/Conditionals_LCD.h Bestand weergeven

377
     #endif
377
     #endif
378
     #undef DEACTIVATE_SERVOS_AFTER_MOVE
378
     #undef DEACTIVATE_SERVOS_AFTER_MOVE
379
     #undef SERVO_DELAY
379
     #undef SERVO_DELAY
380
-    #define SERVO_DELAY 50
380
+    #define SERVO_DELAY { 50 }
381
     #ifndef BLTOUCH_DELAY
381
     #ifndef BLTOUCH_DELAY
382
       #define BLTOUCH_DELAY 375
382
       #define BLTOUCH_DELAY 375
383
     #endif
383
     #endif

+ 1
- 1
Marlin/Configuration.h Bestand weergeven

1595
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1595
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1596
 // 300ms is a good value but you can try less delay.
1596
 // 300ms is a good value but you can try less delay.
1597
 // If the servo can't reach the requested position, increase it.
1597
 // If the servo can't reach the requested position, increase it.
1598
-#define SERVO_DELAY 300
1598
+#define SERVO_DELAY { 300 }
1599
 
1599
 
1600
 // Servo deactivation
1600
 // Servo deactivation
1601
 //
1601
 //

+ 1
- 1
Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h Bestand weergeven

1615
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1615
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1616
 // 300ms is a good value but you can try less delay.
1616
 // 300ms is a good value but you can try less delay.
1617
 // If the servo can't reach the requested position, increase it.
1617
 // If the servo can't reach the requested position, increase it.
1618
-#define SERVO_DELAY 300
1618
+#define SERVO_DELAY { 300 }
1619
 
1619
 
1620
 // Servo deactivation
1620
 // Servo deactivation
1621
 //
1621
 //

+ 1
- 1
Marlin/example_configurations/AliExpress/CL-260/Configuration.h Bestand weergeven

1595
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1595
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1596
 // 300ms is a good value but you can try less delay.
1596
 // 300ms is a good value but you can try less delay.
1597
 // If the servo can't reach the requested position, increase it.
1597
 // If the servo can't reach the requested position, increase it.
1598
-#define SERVO_DELAY 300
1598
+#define SERVO_DELAY { 300 }
1599
 
1599
 
1600
 // Servo deactivation
1600
 // Servo deactivation
1601
 //
1601
 //

+ 1
- 1
Marlin/example_configurations/Anet/A6/Configuration.h Bestand weergeven

1754
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1754
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1755
 // 300ms is a good value but you can try less delay.
1755
 // 300ms is a good value but you can try less delay.
1756
 // If the servo can't reach the requested position, increase it.
1756
 // If the servo can't reach the requested position, increase it.
1757
-#define SERVO_DELAY 300
1757
+#define SERVO_DELAY { 300 }
1758
 
1758
 
1759
 // Servo deactivation
1759
 // Servo deactivation
1760
 //
1760
 //

+ 1
- 1
Marlin/example_configurations/Anet/A8/Configuration.h Bestand weergeven

1603
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1603
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1604
 // 300ms is a good value but you can try less delay.
1604
 // 300ms is a good value but you can try less delay.
1605
 // If the servo can't reach the requested position, increase it.
1605
 // If the servo can't reach the requested position, increase it.
1606
-#define SERVO_DELAY 300
1606
+#define SERVO_DELAY { 300 }
1607
 
1607
 
1608
 // Servo deactivation
1608
 // Servo deactivation
1609
 //
1609
 //

+ 1
- 1
Marlin/example_configurations/BQ/Hephestos/Configuration.h Bestand weergeven

1586
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1586
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1587
 // 300ms is a good value but you can try less delay.
1587
 // 300ms is a good value but you can try less delay.
1588
 // If the servo can't reach the requested position, increase it.
1588
 // If the servo can't reach the requested position, increase it.
1589
-#define SERVO_DELAY 300
1589
+#define SERVO_DELAY { 300 }
1590
 
1590
 
1591
 // Servo deactivation
1591
 // Servo deactivation
1592
 //
1592
 //

+ 1
- 1
Marlin/example_configurations/BQ/Hephestos_2/Configuration.h Bestand weergeven

1596
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1596
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1597
 // 300ms is a good value but you can try less delay.
1597
 // 300ms is a good value but you can try less delay.
1598
 // If the servo can't reach the requested position, increase it.
1598
 // If the servo can't reach the requested position, increase it.
1599
-#define SERVO_DELAY 300
1599
+#define SERVO_DELAY { 300 }
1600
 
1600
 
1601
 // Servo deactivation
1601
 // Servo deactivation
1602
 //
1602
 //

+ 1
- 1
Marlin/example_configurations/BQ/WITBOX/Configuration.h Bestand weergeven

1586
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1586
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1587
 // 300ms is a good value but you can try less delay.
1587
 // 300ms is a good value but you can try less delay.
1588
 // If the servo can't reach the requested position, increase it.
1588
 // If the servo can't reach the requested position, increase it.
1589
-#define SERVO_DELAY 300
1589
+#define SERVO_DELAY { 300 }
1590
 
1590
 
1591
 // Servo deactivation
1591
 // Servo deactivation
1592
 //
1592
 //

+ 1
- 1
Marlin/example_configurations/Cartesio/Configuration.h Bestand weergeven

1594
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1594
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1595
 // 300ms is a good value but you can try less delay.
1595
 // 300ms is a good value but you can try less delay.
1596
 // If the servo can't reach the requested position, increase it.
1596
 // If the servo can't reach the requested position, increase it.
1597
-#define SERVO_DELAY 300
1597
+#define SERVO_DELAY { 300 }
1598
 
1598
 
1599
 // Servo deactivation
1599
 // Servo deactivation
1600
 //
1600
 //

+ 1
- 1
Marlin/example_configurations/Creality/CR-10/Configuration.h Bestand weergeven

1607
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1607
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1608
 // 300ms is a good value but you can try less delay.
1608
 // 300ms is a good value but you can try less delay.
1609
 // If the servo can't reach the requested position, increase it.
1609
 // If the servo can't reach the requested position, increase it.
1610
-#define SERVO_DELAY 300
1610
+#define SERVO_DELAY { 300 }
1611
 
1611
 
1612
 // Servo deactivation
1612
 // Servo deactivation
1613
 //
1613
 //

+ 1
- 1
Marlin/example_configurations/Felix/Configuration.h Bestand weergeven

1577
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1577
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1578
 // 300ms is a good value but you can try less delay.
1578
 // 300ms is a good value but you can try less delay.
1579
 // If the servo can't reach the requested position, increase it.
1579
 // If the servo can't reach the requested position, increase it.
1580
-#define SERVO_DELAY 300
1580
+#define SERVO_DELAY { 300 }
1581
 
1581
 
1582
 // Servo deactivation
1582
 // Servo deactivation
1583
 //
1583
 //

+ 1
- 1
Marlin/example_configurations/Felix/DUAL/Configuration.h Bestand weergeven

1577
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1577
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1578
 // 300ms is a good value but you can try less delay.
1578
 // 300ms is a good value but you can try less delay.
1579
 // If the servo can't reach the requested position, increase it.
1579
 // If the servo can't reach the requested position, increase it.
1580
-#define SERVO_DELAY 300
1580
+#define SERVO_DELAY { 300 }
1581
 
1581
 
1582
 // Servo deactivation
1582
 // Servo deactivation
1583
 //
1583
 //

+ 1
- 1
Marlin/example_configurations/Geeetech/GT2560/Configuration.h Bestand weergeven

1610
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1610
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1611
 // 300ms is a good value but you can try less delay.
1611
 // 300ms is a good value but you can try less delay.
1612
 // If the servo can't reach the requested position, increase it.
1612
 // If the servo can't reach the requested position, increase it.
1613
-#define SERVO_DELAY 300
1613
+#define SERVO_DELAY { 300 }
1614
 
1614
 
1615
 // Servo deactivation
1615
 // Servo deactivation
1616
 //
1616
 //

+ 1
- 1
Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h Bestand weergeven

1595
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1595
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1596
 // 300ms is a good value but you can try less delay.
1596
 // 300ms is a good value but you can try less delay.
1597
 // If the servo can't reach the requested position, increase it.
1597
 // If the servo can't reach the requested position, increase it.
1598
-#define SERVO_DELAY 300
1598
+#define SERVO_DELAY { 300 }
1599
 
1599
 
1600
 // Servo deactivation
1600
 // Servo deactivation
1601
 //
1601
 //

+ 1
- 1
Marlin/example_configurations/Infitary/i3-M508/Configuration.h Bestand weergeven

1599
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1599
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1600
 // 300ms is a good value but you can try less delay.
1600
 // 300ms is a good value but you can try less delay.
1601
 // If the servo can't reach the requested position, increase it.
1601
 // If the servo can't reach the requested position, increase it.
1602
-#define SERVO_DELAY 300
1602
+#define SERVO_DELAY { 300 }
1603
 
1603
 
1604
 // Servo deactivation
1604
 // Servo deactivation
1605
 //
1605
 //

+ 1
- 1
Marlin/example_configurations/Malyan/M150/Configuration.h Bestand weergeven

1623
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1623
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1624
 // 300ms is a good value but you can try less delay.
1624
 // 300ms is a good value but you can try less delay.
1625
 // If the servo can't reach the requested position, increase it.
1625
 // If the servo can't reach the requested position, increase it.
1626
-#define SERVO_DELAY 300
1626
+#define SERVO_DELAY { 300 }
1627
 
1627
 
1628
 // Servo deactivation
1628
 // Servo deactivation
1629
 //
1629
 //

+ 1
- 1
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h Bestand weergeven

1595
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1595
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1596
 // 300ms is a good value but you can try less delay.
1596
 // 300ms is a good value but you can try less delay.
1597
 // If the servo can't reach the requested position, increase it.
1597
 // If the servo can't reach the requested position, increase it.
1598
-#define SERVO_DELAY 300
1598
+#define SERVO_DELAY { 300 }
1599
 
1599
 
1600
 // Servo deactivation
1600
 // Servo deactivation
1601
 //
1601
 //

+ 1
- 1
Marlin/example_configurations/RigidBot/Configuration.h Bestand weergeven

1595
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1595
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1596
 // 300ms is a good value but you can try less delay.
1596
 // 300ms is a good value but you can try less delay.
1597
 // If the servo can't reach the requested position, increase it.
1597
 // If the servo can't reach the requested position, increase it.
1598
-#define SERVO_DELAY 300
1598
+#define SERVO_DELAY { 300 }
1599
 
1599
 
1600
 // Servo deactivation
1600
 // Servo deactivation
1601
 //
1601
 //

+ 1
- 1
Marlin/example_configurations/SCARA/Configuration.h Bestand weergeven

1607
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1607
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1608
 // 300ms is a good value but you can try less delay.
1608
 // 300ms is a good value but you can try less delay.
1609
 // If the servo can't reach the requested position, increase it.
1609
 // If the servo can't reach the requested position, increase it.
1610
-#define SERVO_DELAY 300
1610
+#define SERVO_DELAY { 300 }
1611
 
1611
 
1612
 // Servo deactivation
1612
 // Servo deactivation
1613
 //
1613
 //

+ 1
- 1
Marlin/example_configurations/TinyBoy2/Configuration.h Bestand weergeven

1651
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1651
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1652
 // 300ms is a good value but you can try less delay.
1652
 // 300ms is a good value but you can try less delay.
1653
 // If the servo can't reach the requested position, increase it.
1653
 // If the servo can't reach the requested position, increase it.
1654
-#define SERVO_DELAY 300
1654
+#define SERVO_DELAY { 300 }
1655
 
1655
 
1656
 // Servo deactivation
1656
 // Servo deactivation
1657
 //
1657
 //

+ 1
- 1
Marlin/example_configurations/Velleman/K8200/Configuration.h Bestand weergeven

1629
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1629
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1630
 // 300ms is a good value but you can try less delay.
1630
 // 300ms is a good value but you can try less delay.
1631
 // If the servo can't reach the requested position, increase it.
1631
 // If the servo can't reach the requested position, increase it.
1632
-#define SERVO_DELAY 300
1632
+#define SERVO_DELAY { 300 }
1633
 
1633
 
1634
 // Servo deactivation
1634
 // Servo deactivation
1635
 //
1635
 //

+ 1
- 1
Marlin/example_configurations/Velleman/K8400/Configuration.h Bestand weergeven

1595
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1595
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1596
 // 300ms is a good value but you can try less delay.
1596
 // 300ms is a good value but you can try less delay.
1597
 // If the servo can't reach the requested position, increase it.
1597
 // If the servo can't reach the requested position, increase it.
1598
-#define SERVO_DELAY 300
1598
+#define SERVO_DELAY { 300 }
1599
 
1599
 
1600
 // Servo deactivation
1600
 // Servo deactivation
1601
 //
1601
 //

+ 1
- 1
Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h Bestand weergeven

1595
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1595
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1596
 // 300ms is a good value but you can try less delay.
1596
 // 300ms is a good value but you can try less delay.
1597
 // If the servo can't reach the requested position, increase it.
1597
 // If the servo can't reach the requested position, increase it.
1598
-#define SERVO_DELAY 300
1598
+#define SERVO_DELAY { 300 }
1599
 
1599
 
1600
 // Servo deactivation
1600
 // Servo deactivation
1601
 //
1601
 //

+ 1
- 1
Marlin/example_configurations/adafruit/ST7565/Configuration.h Bestand weergeven

1595
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1595
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1596
 // 300ms is a good value but you can try less delay.
1596
 // 300ms is a good value but you can try less delay.
1597
 // If the servo can't reach the requested position, increase it.
1597
 // If the servo can't reach the requested position, increase it.
1598
-#define SERVO_DELAY 300
1598
+#define SERVO_DELAY { 300 }
1599
 
1599
 
1600
 // Servo deactivation
1600
 // Servo deactivation
1601
 //
1601
 //

+ 1
- 1
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h Bestand weergeven

1723
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1723
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1724
 // 300ms is a good value but you can try less delay.
1724
 // 300ms is a good value but you can try less delay.
1725
 // If the servo can't reach the requested position, increase it.
1725
 // If the servo can't reach the requested position, increase it.
1726
-#define SERVO_DELAY 300
1726
+#define SERVO_DELAY { 300 }
1727
 
1727
 
1728
 // Servo deactivation
1728
 // Servo deactivation
1729
 //
1729
 //

+ 1
- 1
Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h Bestand weergeven

1716
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1716
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1717
 // 300ms is a good value but you can try less delay.
1717
 // 300ms is a good value but you can try less delay.
1718
 // If the servo can't reach the requested position, increase it.
1718
 // If the servo can't reach the requested position, increase it.
1719
-#define SERVO_DELAY 300
1719
+#define SERVO_DELAY { 300 }
1720
 
1720
 
1721
 // Servo deactivation
1721
 // Servo deactivation
1722
 //
1722
 //

+ 1
- 1
Marlin/example_configurations/delta/generic/Configuration.h Bestand weergeven

1711
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1711
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1712
 // 300ms is a good value but you can try less delay.
1712
 // 300ms is a good value but you can try less delay.
1713
 // If the servo can't reach the requested position, increase it.
1713
 // If the servo can't reach the requested position, increase it.
1714
-#define SERVO_DELAY 300
1714
+#define SERVO_DELAY { 300 }
1715
 
1715
 
1716
 // Servo deactivation
1716
 // Servo deactivation
1717
 //
1717
 //

+ 1
- 1
Marlin/example_configurations/delta/kossel_mini/Configuration.h Bestand weergeven

1714
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1714
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1715
 // 300ms is a good value but you can try less delay.
1715
 // 300ms is a good value but you can try less delay.
1716
 // If the servo can't reach the requested position, increase it.
1716
 // If the servo can't reach the requested position, increase it.
1717
-#define SERVO_DELAY 300
1717
+#define SERVO_DELAY { 300 }
1718
 
1718
 
1719
 // Servo deactivation
1719
 // Servo deactivation
1720
 //
1720
 //

+ 1
- 1
Marlin/example_configurations/delta/kossel_pro/Configuration.h Bestand weergeven

1714
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1714
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1715
 // 300ms is a good value but you can try less delay.
1715
 // 300ms is a good value but you can try less delay.
1716
 // If the servo can't reach the requested position, increase it.
1716
 // If the servo can't reach the requested position, increase it.
1717
-#define SERVO_DELAY 300
1717
+#define SERVO_DELAY { 300 }
1718
 
1718
 
1719
 // Servo deactivation
1719
 // Servo deactivation
1720
 //
1720
 //

+ 1
- 1
Marlin/example_configurations/delta/kossel_xl/Configuration.h Bestand weergeven

1723
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1723
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1724
 // 300ms is a good value but you can try less delay.
1724
 // 300ms is a good value but you can try less delay.
1725
 // If the servo can't reach the requested position, increase it.
1725
 // If the servo can't reach the requested position, increase it.
1726
-#define SERVO_DELAY 300
1726
+#define SERVO_DELAY { 300 }
1727
 
1727
 
1728
 // Servo deactivation
1728
 // Servo deactivation
1729
 //
1729
 //

+ 1
- 1
Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h Bestand weergeven

1609
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1609
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1610
 // 300ms is a good value but you can try less delay.
1610
 // 300ms is a good value but you can try less delay.
1611
 // If the servo can't reach the requested position, increase it.
1611
 // If the servo can't reach the requested position, increase it.
1612
-#define SERVO_DELAY 300
1612
+#define SERVO_DELAY { 300 }
1613
 
1613
 
1614
 // Servo deactivation
1614
 // Servo deactivation
1615
 //
1615
 //

+ 1
- 1
Marlin/example_configurations/makibox/Configuration.h Bestand weergeven

1598
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1598
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1599
 // 300ms is a good value but you can try less delay.
1599
 // 300ms is a good value but you can try less delay.
1600
 // If the servo can't reach the requested position, increase it.
1600
 // If the servo can't reach the requested position, increase it.
1601
-#define SERVO_DELAY 300
1601
+#define SERVO_DELAY { 300 }
1602
 
1602
 
1603
 // Servo deactivation
1603
 // Servo deactivation
1604
 //
1604
 //

+ 1
- 1
Marlin/example_configurations/tvrrug/Round2/Configuration.h Bestand weergeven

1590
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1590
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1591
 // 300ms is a good value but you can try less delay.
1591
 // 300ms is a good value but you can try less delay.
1592
 // If the servo can't reach the requested position, increase it.
1592
 // If the servo can't reach the requested position, increase it.
1593
-#define SERVO_DELAY 300
1593
+#define SERVO_DELAY { 300 }
1594
 
1594
 
1595
 // Servo deactivation
1595
 // Servo deactivation
1596
 //
1596
 //

+ 1
- 1
Marlin/example_configurations/wt150/Configuration.h Bestand weergeven

1600
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1600
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
1601
 // 300ms is a good value but you can try less delay.
1601
 // 300ms is a good value but you can try less delay.
1602
 // If the servo can't reach the requested position, increase it.
1602
 // If the servo can't reach the requested position, increase it.
1603
-#define SERVO_DELAY 300
1603
+#define SERVO_DELAY { 300 }
1604
 
1604
 
1605
 // Servo deactivation
1605
 // Servo deactivation
1606
 //
1606
 //

+ 3
- 1
Marlin/servo.cpp Bestand weergeven

308
 bool Servo::attached() { return servo_info[this->servoIndex].Pin.isActive; }
308
 bool Servo::attached() { return servo_info[this->servoIndex].Pin.isActive; }
309
 
309
 
310
 void Servo::move(int value) {
310
 void Servo::move(int value) {
311
+  constexpr uint16_t servo_delay[] = SERVO_DELAY;
312
+  static_assert(COUNT(servo_delay) == NUM_SERVOS, "SERVO_DELAY must be an array NUM_SERVOS long.");
311
   if (this->attach(0) >= 0) {
313
   if (this->attach(0) >= 0) {
312
     this->write(value);
314
     this->write(value);
313
-    delay(SERVO_DELAY);
315
+    delay(servo_delay[this->servoIndex]);
314
     #if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
316
     #if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
315
       this->detach();
317
       this->detach();
316
     #endif
318
     #endif

Laden…
Annuleren
Opslaan