Move hardcoded values to variants

This commit is contained in:
Alex Voinea 2019-11-29 15:06:54 +02:00
parent 35ce2896bb
commit 779423f0e7
No known key found for this signature in database
GPG key ID: F5034E7CFCF2F973
3 changed files with 8 additions and 4 deletions

View file

@ -24,7 +24,7 @@ uint8_t tmc2130_current_h[4] = TMC2130_CURRENTS_H;
uint8_t tmc2130_current_r[4] = TMC2130_CURRENTS_R;
//running currents for homing
uint8_t tmc2130_current_r_home[4] = {8, 10, 20, 18};
uint8_t tmc2130_current_r_home[4] = TMC2130_CURRENTS_R_HOME;
//pwm_ampl
@ -40,7 +40,7 @@ uint8_t tmc2130_mres[4] = {0, 0, 0, 0}; //will be filed at begin of init
uint8_t tmc2130_sg_thr[4] = {TMC2130_SG_THRS_X, TMC2130_SG_THRS_Y, TMC2130_SG_THRS_Z, TMC2130_SG_THRS_E};
uint8_t tmc2130_sg_thr_home[4] = {3, 3, TMC2130_SG_THRS_Z, TMC2130_SG_THRS_E};
uint8_t tmc2130_sg_thr_home[4] = TMC2130_SG_THRS_HOME;
uint8_t tmc2130_sg_homing_axes_mask = 0x00;

View file

@ -260,11 +260,13 @@
#define TMC2130_SG_THRS_Y 3 // stallguard sensitivity for Y axis
#define TMC2130_SG_THRS_Z 4 // stallguard sensitivity for Z axis
#define TMC2130_SG_THRS_E 3 // stallguard sensitivity for E axis
#define TMC2130_SG_THRS_HOME {3, 3, TMC2130_SG_THRS_Z, TMC2130_SG_THRS_E}
//new settings is possible for vsense = 1, running current value > 31 set vsense to zero and shift both currents by 1 bit right (Z axis only)
#define TMC2130_CURRENTS_H {16, 20, 35, 30} // default holding currents for all axes
#define TMC2130_CURRENTS_R {16, 20, 35, 30} // default running currents for all axes
#define TMC2130_UNLOAD_CURRENT_R 12 // lowe current for M600 to protect filament sensor
#define TMC2130_CURRENTS_R_HOME {8, 10, 20, 18} // homing running currents for all axes
// #define TMC2130_UNLOAD_CURRENT_R 12 // lower current for M600 to protect filament sensor - Unused
#define TMC2130_STEALTH_Z

View file

@ -262,11 +262,13 @@
#define TMC2130_SG_THRS_Y 3 // stallguard sensitivity for Y axis
#define TMC2130_SG_THRS_Z 4 // stallguard sensitivity for Z axis
#define TMC2130_SG_THRS_E 3 // stallguard sensitivity for E axis
#define TMC2130_SG_THRS_HOME {3, 3, TMC2130_SG_THRS_Z, TMC2130_SG_THRS_E}
//new settings is possible for vsense = 1, running current value > 31 set vsense to zero and shift both currents by 1 bit right (Z axis only)
#define TMC2130_CURRENTS_H {16, 20, 35, 30} // default holding currents for all axes
#define TMC2130_CURRENTS_R {16, 20, 35, 30} // default running currents for all axes
#define TMC2130_UNLOAD_CURRENT_R 12 // lowe current for M600 to protect filament sensor
#define TMC2130_CURRENTS_R_HOME {8, 10, 20, 18} // homing running currents for all axes
// #define TMC2130_UNLOAD_CURRENT_R 12 // lower current for M600 to protect filament sensor - Unused
#define TMC2130_STEALTH_Z