- Rename WRITE_E_STEP for consistency
- Add BIT and TEST macros - Add _APPLY_ macros to stepper.cpp to help with consolidation - Consolidate code in stepper.cpp using macros - Apply standards in stepper.cpp - Use >= 0 instead of > -1 as a better semantic - Replace DUAL_Y_CARRIAGE with Y_DUAL_STEPPER_DRIVERS
This commit is contained in:
parent
2f3c77b751
commit
c37f7d15c9
20 changed files with 640 additions and 852 deletions
|
|
@ -62,7 +62,7 @@
|
|||
#include "Servo.h"
|
||||
#endif
|
||||
|
||||
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
|
||||
#if HAS_DIGIPOTSS
|
||||
#include <SPI.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -4190,7 +4190,7 @@ inline void gcode_M503() {
|
|||
* M907: Set digital trimpot motor current using axis codes X, Y, Z, E, B, S
|
||||
*/
|
||||
inline void gcode_M907() {
|
||||
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
|
||||
#if HAS_DIGIPOTSS
|
||||
for (int i=0;i<NUM_AXIS;i++)
|
||||
if (code_seen(axis_codes[i])) digipot_current(i, code_value());
|
||||
if (code_seen('B')) digipot_current(4, code_value());
|
||||
|
|
@ -4213,7 +4213,7 @@ inline void gcode_M907() {
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
|
||||
#if HAS_DIGIPOTSS
|
||||
|
||||
/**
|
||||
* M908: Control digital trimpot directly (M908 P<pin> S<current>)
|
||||
|
|
@ -4225,7 +4225,7 @@ inline void gcode_M907() {
|
|||
);
|
||||
}
|
||||
|
||||
#endif // DIGIPOTSS_PIN
|
||||
#endif // HAS_DIGIPOTSS
|
||||
|
||||
// M350 Set microstepping mode. Warning: Steps per unit remains unchanged. S code sets stepping mode for all drivers.
|
||||
inline void gcode_M350() {
|
||||
|
|
@ -4812,11 +4812,11 @@ void process_commands() {
|
|||
gcode_M907();
|
||||
break;
|
||||
|
||||
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
|
||||
#if HAS_DIGIPOTSS
|
||||
case 908: // M908 Control digital trimpot directly.
|
||||
gcode_M908();
|
||||
break;
|
||||
#endif // DIGIPOTSS_PIN
|
||||
#endif // HAS_DIGIPOTSS
|
||||
|
||||
case 350: // M350 Set microstepping mode. Warning: Steps per unit remains unchanged. S code sets stepping mode for all drivers.
|
||||
gcode_M350();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue