Keep "astyled" elements in stepper_indirection.*

This commit is contained in:
Scott Lahteine
2015-10-02 23:14:19 -07:00
parent 38f626d7a2
commit 9cb7f3fafd
2 changed files with 415 additions and 417 deletions

View File

@@ -29,39 +29,38 @@
// Stepper objects of TMC steppers used
#if ENABLED(X_IS_TMC)
TMC26XStepper stepperX(200,X_ENABLE_PIN,X_STEP_PIN,X_DIR_PIN,X_MAX_CURRENT,X_SENSE_RESISTOR);
TMC26XStepper stepperX(200, X_ENABLE_PIN, X_STEP_PIN, X_DIR_PIN, X_MAX_CURRENT, X_SENSE_RESISTOR);
#endif
#if ENABLED(X2_IS_TMC)
TMC26XStepper stepperX2(200,X2_ENABLE_PIN,X2_STEP_PIN,X2_DIR_PIN,X2_MAX_CURRENT,X2_SENSE_RESISTOR);
TMC26XStepper stepperX2(200, X2_ENABLE_PIN, X2_STEP_PIN, X2_DIR_PIN, X2_MAX_CURRENT, X2_SENSE_RESISTOR);
#endif
#if ENABLED(Y_IS_TMC)
TMC26XStepper stepperY(200,Y_ENABLE_PIN,Y_STEP_PIN,Y_DIR_PIN,Y_MAX_CURRENT,Y_SENSE_RESISTOR);
TMC26XStepper stepperY(200, Y_ENABLE_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_MAX_CURRENT, Y_SENSE_RESISTOR);
#endif
#if ENABLED(Y2_IS_TMC)
TMC26XStepper stepperY2(200,Y2_ENABLE_PIN,Y2_STEP_PIN,Y2_DIR_PIN,Y2_MAX_CURRENT,Y2_SENSE_RESISTOR);
TMC26XStepper stepperY2(200, Y2_ENABLE_PIN, Y2_STEP_PIN, Y2_DIR_PIN, Y2_MAX_CURRENT, Y2_SENSE_RESISTOR);
#endif
#if ENABLED(Z_IS_TMC)
TMC26XStepper stepperZ(200,Z_ENABLE_PIN,Z_STEP_PIN,Z_DIR_PIN,Z_MAX_CURRENT,Z_SENSE_RESISTOR);
TMC26XStepper stepperZ(200, Z_ENABLE_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_MAX_CURRENT, Z_SENSE_RESISTOR);
#endif
#if ENABLED(Z2_IS_TMC)
TMC26XStepper stepperZ2(200,Z2_ENABLE_PIN,Z2_STEP_PIN,Z2_DIR_PIN,Z2_MAX_CURRENT,Z2_SENSE_RESISTOR);
TMC26XStepper stepperZ2(200, Z2_ENABLE_PIN, Z2_STEP_PIN, Z2_DIR_PIN, Z2_MAX_CURRENT, Z2_SENSE_RESISTOR);
#endif
#if ENABLED(E0_IS_TMC)
TMC26XStepper stepperE0(200,E0_ENABLE_PIN,E0_STEP_PIN,E0_DIR_PIN,E0_MAX_CURRENT,E0_SENSE_RESISTOR);
TMC26XStepper stepperE0(200, E0_ENABLE_PIN, E0_STEP_PIN, E0_DIR_PIN, E0_MAX_CURRENT, E0_SENSE_RESISTOR);
#endif
#if ENABLED(E1_IS_TMC)
TMC26XStepper stepperE1(200,E1_ENABLE_PIN,E1_STEP_PIN,E1_DIR_PIN,E1_MAX_CURRENT,E1_SENSE_RESISTOR);
TMC26XStepper stepperE1(200, E1_ENABLE_PIN, E1_STEP_PIN, E1_DIR_PIN, E1_MAX_CURRENT, E1_SENSE_RESISTOR);
#endif
#if ENABLED(E2_IS_TMC)
TMC26XStepper stepperE2(200,E2_ENABLE_PIN,E2_STEP_PIN,E2_DIR_PIN,E2_MAX_CURRENT,E2_SENSE_RESISTOR);
TMC26XStepper stepperE2(200, E2_ENABLE_PIN, E2_STEP_PIN, E2_DIR_PIN, E2_MAX_CURRENT, E2_SENSE_RESISTOR);
#endif
#if ENABLED(E3_IS_TMC)
TMC26XStepper stepperE3(200,E3_ENABLE_PIN,E3_STEP_PIN,E3_DIR_PIN,E3_MAX_CURRENT,E3_SENSE_RESISTOR);
TMC26XStepper stepperE3(200, E3_ENABLE_PIN, E3_STEP_PIN, E3_DIR_PIN, E3_MAX_CURRENT, E3_SENSE_RESISTOR);
#endif
#if ENABLED(HAVE_TMCDRIVER)
void tmc_init()
{
void tmc_init() {
#if ENABLED(X_IS_TMC)
stepperX.setMicrosteps(X_MICROSTEPS);
stepperX.start();
@@ -108,47 +107,46 @@ void tmc_init()
// L6470 Driver objects and inits
#if ENABLED(HAVE_L6470DRIVER)
#include <SPI.h>
#include <L6470.h>
#include <SPI.h>
#include <L6470.h>
#endif
// L6470 Stepper objects
#if ENABLED(X_IS_L6470)
#if ENABLED(X_IS_L6470)
L6470 stepperX(X_ENABLE_PIN);
#endif
#if ENABLED(X2_IS_L6470)
#endif
#if ENABLED(X2_IS_L6470)
L6470 stepperX2(X2_ENABLE_PIN);
#endif
#if ENABLED(Y_IS_L6470)
#endif
#if ENABLED(Y_IS_L6470)
L6470 stepperY(Y_ENABLE_PIN);
#endif
#if ENABLED(Y2_IS_L6470)
#endif
#if ENABLED(Y2_IS_L6470)
L6470 stepperY2(Y2_ENABLE_PIN);
#endif
#if ENABLED(Z_IS_L6470)
#endif
#if ENABLED(Z_IS_L6470)
L6470 stepperZ(Z_ENABLE_PIN);
#endif
#if ENABLED(Z2_IS_L6470)
#endif
#if ENABLED(Z2_IS_L6470)
L6470 stepperZ2(Z2_ENABLE_PIN);
#endif
#if ENABLED(E0_IS_L6470)
#endif
#if ENABLED(E0_IS_L6470)
L6470 stepperE0(E0_ENABLE_PIN);
#endif
#if ENABLED(E1_IS_L6470)
#endif
#if ENABLED(E1_IS_L6470)
L6470 stepperE1(E1_ENABLE_PIN);
#endif
#if ENABLED(E2_IS_L6470)
#endif
#if ENABLED(E2_IS_L6470)
L6470 stepperE2(E2_ENABLE_PIN);
#endif
#if ENABLED(E3_IS_L6470)
#endif
#if ENABLED(E3_IS_L6470)
L6470 stepperE3(E3_ENABLE_PIN);
#endif
#endif
// init routine
#if ENABLED(HAVE_L6470DRIVER)
void L6470_init()
{
void L6470_init() {
#if ENABLED(X_IS_L6470)
stepperX.init(X_K_VAL);
stepperX.softFree();

View File

@@ -159,11 +159,11 @@
// TMC26X drivers have step and dir on normal pins, but everything else via SPI
//////////////////////////////////
#if ENABLED(HAVE_TMCDRIVER)
#include <SPI.h>
#include <TMC26XStepper.h>
#include <SPI.h>
#include <TMC26XStepper.h>
void tmc_init();
#if ENABLED(X_IS_TMC)
#if ENABLED(X_IS_TMC)
extern TMC26XStepper stepperX;
#undef X_ENABLE_INIT
#define X_ENABLE_INIT ((void)0)
@@ -174,8 +174,8 @@
#undef X_ENABLE_READ
#define X_ENABLE_READ stepperX.isEnabled()
#endif
#if ENABLED(X2_IS_TMC)
#endif
#if ENABLED(X2_IS_TMC)
extern TMC26XStepper stepperX2;
#undef X2_ENABLE_INIT
#define X2_ENABLE_INIT ((void)0)
@@ -185,8 +185,8 @@
#undef X2_ENABLE_READ
#define X2_ENABLE_READ stepperX2.isEnabled()
#endif
#if ENABLED(Y_IS_TMC)
#endif
#if ENABLED(Y_IS_TMC)
extern TMC26XStepper stepperY;
#undef Y_ENABLE_INIT
#define Y_ENABLE_INIT ((void)0)
@@ -196,8 +196,8 @@
#undef Y_ENABLE_READ
#define Y_ENABLE_READ stepperY.isEnabled()
#endif
#if ENABLED(Y2_IS_TMC)
#endif
#if ENABLED(Y2_IS_TMC)
extern TMC26XStepper stepperY2;
#undef Y2_ENABLE_INIT
#define Y2_ENABLE_INIT ((void)0)
@@ -207,8 +207,8 @@
#undef Y2_ENABLE_READ
#define Y2_ENABLE_READ stepperY2.isEnabled()
#endif
#if ENABLED(Z_IS_TMC)
#endif
#if ENABLED(Z_IS_TMC)
extern TMC26XStepper stepperZ;
#undef Z_ENABLE_INIT
#define Z_ENABLE_INIT ((void)0)
@@ -218,8 +218,8 @@
#undef Z_ENABLE_READ
#define Z_ENABLE_READ stepperZ.isEnabled()
#endif
#if ENABLED(Z2_IS_TMC)
#endif
#if ENABLED(Z2_IS_TMC)
extern TMC26XStepper stepperZ2;
#undef Z2_ENABLE_INIT
#define Z2_ENABLE_INIT ((void)0)
@@ -229,8 +229,8 @@
#undef Z2_ENABLE_READ
#define Z2_ENABLE_READ stepperZ2.isEnabled()
#endif
#if ENABLED(E0_IS_TMC)
#endif
#if ENABLED(E0_IS_TMC)
extern TMC26XStepper stepperE0;
#undef E0_ENABLE_INIT
#define E0_ENABLE_INIT ((void)0)
@@ -240,8 +240,8 @@
#undef E0_ENABLE_READ
#define E0_ENABLE_READ stepperE0.isEnabled()
#endif
#if ENABLED(E1_IS_TMC)
#endif
#if ENABLED(E1_IS_TMC)
extern TMC26XStepper stepperE1;
#undef E1_ENABLE_INIT
#define E1_ENABLE_INIT ((void)0)
@@ -251,8 +251,8 @@
#undef E1_ENABLE_READ
#define E1_ENABLE_READ stepperE1.isEnabled()
#endif
#if ENABLED(E2_IS_TMC)
#endif
#if ENABLED(E2_IS_TMC)
extern TMC26XStepper stepperE2;
#undef E2_ENABLE_INIT
#define E2_ENABLE_INIT ((void)0)
@@ -262,8 +262,8 @@
#undef E2_ENABLE_READ
#define E2_ENABLE_READ stepperE2.isEnabled()
#endif
#if ENABLED(E3_IS_TMC)
#endif
#if ENABLED(E3_IS_TMC)
extern TMC26XStepper stepperE3;
#undef E3_ENABLE_INIT
#define E3_ENABLE_INIT ((void)0)
@@ -273,7 +273,7 @@
#undef E3_ENABLE_READ
#define E3_ENABLE_READ stepperE3.isEnabled()
#endif
#endif
#endif // HAVE_TMCDRIVER
@@ -283,11 +283,11 @@
//////////////////////////////////
#if ENABLED(HAVE_L6470DRIVER)
#include <SPI.h>
#include <L6470.h>
#include <SPI.h>
#include <L6470.h>
void L6470_init();
#if ENABLED(X_IS_L6470)
#if ENABLED(X_IS_L6470)
extern L6470 stepperX;
#undef X_ENABLE_INIT
#define X_ENABLE_INIT ((void)0)
@@ -307,8 +307,8 @@
#undef X_DIR_READ
#define X_DIR_READ (stepperX.getStatus() & STATUS_DIR)
#endif
#if ENABLED(X2_IS_L6470)
#endif
#if ENABLED(X2_IS_L6470)
extern L6470 stepperX2;
#undef X2_ENABLE_INIT
#define X2_ENABLE_INIT ((void)0)
@@ -327,8 +327,8 @@
#undef X2_DIR_READ
#define X2_DIR_READ (stepperX2.getStatus() & STATUS_DIR)
#endif
#if ENABLED(Y_IS_L6470)
#endif
#if ENABLED(Y_IS_L6470)
extern L6470 stepperY;
#undef Y_ENABLE_INIT
#define Y_ENABLE_INIT ((void)0)
@@ -347,8 +347,8 @@
#undef Y_DIR_READ
#define Y_DIR_READ (stepperY.getStatus() & STATUS_DIR)
#endif
#if ENABLED(Y2_IS_L6470)
#endif
#if ENABLED(Y2_IS_L6470)
extern L6470 stepperY2;
#undef Y2_ENABLE_INIT
#define Y2_ENABLE_INIT ((void)0)
@@ -367,8 +367,8 @@
#undef Y2_DIR_READ
#define Y2_DIR_READ (stepperY2.getStatus() & STATUS_DIR)
#endif
#if ENABLED(Z_IS_L6470)
#endif
#if ENABLED(Z_IS_L6470)
extern L6470 stepperZ;
#undef Z_ENABLE_INIT
#define Z_ENABLE_INIT ((void)0)
@@ -387,8 +387,8 @@
#undef Y_DIR_READ
#define Y_DIR_READ (stepperZ.getStatus() & STATUS_DIR)
#endif
#if ENABLED(Z2_IS_L6470)
#endif
#if ENABLED(Z2_IS_L6470)
extern L6470 stepperZ2;
#undef Z2_ENABLE_INIT
#define Z2_ENABLE_INIT ((void)0)
@@ -407,8 +407,8 @@
#undef Y2_DIR_READ
#define Y2_DIR_READ (stepperZ2.getStatus() & STATUS_DIR)
#endif
#if ENABLED(E0_IS_L6470)
#endif
#if ENABLED(E0_IS_L6470)
extern L6470 stepperE0;
#undef E0_ENABLE_INIT
#define E0_ENABLE_INIT ((void)0)
@@ -427,8 +427,8 @@
#undef E0_DIR_READ
#define E0_DIR_READ (stepperE0.getStatus() & STATUS_DIR)
#endif
#if ENABLED(E1_IS_L6470)
#endif
#if ENABLED(E1_IS_L6470)
extern L6470 stepperE1;
#undef E1_ENABLE_INIT
#define E1_ENABLE_INIT ((void)0)
@@ -447,8 +447,8 @@
#undef E1_DIR_READ
#define E1_DIR_READ (stepperE1.getStatus() & STATUS_DIR)
#endif
#if ENABLED(E2_IS_L6470)
#endif
#if ENABLED(E2_IS_L6470)
extern L6470 stepperE2;
#undef E2_ENABLE_INIT
#define E2_ENABLE_INIT ((void)0)
@@ -467,8 +467,8 @@
#undef E2_DIR_READ
#define E2_DIR_READ (stepperE2.getStatus() & STATUS_DIR)
#endif
#if ENABLED(E3_IS_L6470)
#endif
#if ENABLED(E3_IS_L6470)
extern L6470 stepperE3;
#undef E3_ENABLE_INIT
#define E3_ENABLE_INIT ((void)0)
@@ -487,7 +487,7 @@
#undef E3_DIR_READ
#define E3_DIR_READ (stepperE3.getStatus() & STATUS_DIR)
#endif
#endif
#endif //HAVE_L6470DRIVER