HAS_TRINAMIC => HAS_TRINAMIC_CONFIG

This commit is contained in:
Scott Lahteine
2020-03-02 12:03:43 -06:00
parent 736521a3f1
commit b1a50d54e2
31 changed files with 65 additions and 65 deletions

View File

@ -113,7 +113,7 @@
#include "../feature/bltouch.h"
#endif
#if HAS_TRINAMIC
#if HAS_TRINAMIC_CONFIG
#include "stepper/indirection.h"
#include "../feature/tmc_util.h"
#endif
@ -313,7 +313,7 @@ typedef struct SettingsDataStruct {
float planner_filament_size[EXTRUDERS]; // M200 T D planner.filament_size[]
//
// HAS_TRINAMIC
// HAS_TRINAMIC_CONFIG
//
tmc_stepper_current_t tmc_stepper_current; // M906 X Y Z X2 Y2 Z2 Z3 Z4 E0 E1 E2 E3 E4 E5
tmc_hybrid_threshold_t tmc_hybrid_threshold; // M913 X Y Z X2 Y2 Z2 Z3 Z4 E0 E1 E2 E3 E4 E5
@ -985,7 +985,7 @@ void MarlinSettings::postprocess() {
tmc_stepper_current_t tmc_stepper_current = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
#if HAS_TRINAMIC
#if HAS_TRINAMIC_CONFIG
#if AXIS_IS_TMC(X)
tmc_stepper_current.X = stepperX.getMilliamps();
#endif
@ -1862,7 +1862,7 @@ void MarlinSettings::postprocess() {
tmc_stepper_current_t currents;
EEPROM_READ(currents);
#if HAS_TRINAMIC
#if HAS_TRINAMIC_CONFIG
#define SET_CURR(Q) stepper##Q.rms_current(currents.Q ? currents.Q : Q##_CURRENT)
if (!validating) {
@ -2034,7 +2034,7 @@ void MarlinSettings::postprocess() {
tmc_stealth_enabled_t tmc_stealth_enabled;
EEPROM_READ(tmc_stealth_enabled);
#if HAS_TRINAMIC
#if HAS_TRINAMIC_CONFIG
#define SET_STEPPING_MODE(ST) stepper##ST.stored.stealthChop_enabled = tmc_stealth_enabled.ST; stepper##ST.refresh_stepping_mode();
if (!validating) {
@ -2788,7 +2788,7 @@ void MarlinSettings::reset() {
#define CONFIG_ECHO_MSG(STR) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM(STR); }while(0)
#define CONFIG_ECHO_HEADING(STR) config_heading(forReplay, PSTR(STR))
#if HAS_TRINAMIC
#if HAS_TRINAMIC_CONFIG
inline void say_M906(const bool forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOPGM(" M906"); }
#if HAS_STEALTHCHOP
void say_M569(const bool forReplay, const char * const etc=nullptr, const bool newLine = false) {
@ -3298,7 +3298,7 @@ void MarlinSettings::reset() {
#endif
#endif
#if HAS_TRINAMIC
#if HAS_TRINAMIC_CONFIG
/**
* TMC stepper driver current
@ -3599,7 +3599,7 @@ void MarlinSettings::reset() {
#endif // HAS_STEALTHCHOP
#endif // HAS_TRINAMIC
#endif // HAS_TRINAMIC_CONFIG
/**
* Linear Advance

View File

@ -33,7 +33,7 @@
#include "indirection.h"
void restore_stepper_drivers() {
#if HAS_TRINAMIC
#if HAS_TRINAMIC_CONFIG
restore_trinamic_drivers();
#endif
}
@ -47,7 +47,7 @@ void reset_stepper_drivers() {
L64xxManager.init_to_defaults();
#endif
#if HAS_TRINAMIC
#if HAS_TRINAMIC_CONFIG
reset_trinamic_drivers();
#endif
}

View File

@ -40,7 +40,7 @@
#include "TMC26X.h"
#endif
#if HAS_TRINAMIC
#if HAS_TRINAMIC_CONFIG
#include "trinamic.h"
#endif

View File

@ -27,7 +27,7 @@
#include "../../inc/MarlinConfig.h"
#if HAS_TRINAMIC
#if HAS_TRINAMIC_CONFIG
#include "trinamic.h"
#include "../stepper.h"
@ -818,4 +818,4 @@ void reset_trinamic_drivers() {
stepper.set_directions();
}
#endif // HAS_TRINAMIC
#endif // HAS_TRINAMIC_CONFIG