"disable_z()" for Delta PSU II
This commit is contained in:
parent
632781c4a2
commit
17a534e42b
@ -1316,7 +1316,7 @@ void setup()
|
|||||||
}
|
}
|
||||||
#endif //TMC2130
|
#endif //TMC2130
|
||||||
|
|
||||||
#if defined(Z_AXIS_ALWAYS_ON)
|
#if defined(Z_AXIS_ALWAYS_ON) && !defined(PSU_Delta)
|
||||||
enable_z();
|
enable_z();
|
||||||
#endif
|
#endif
|
||||||
farm_mode = eeprom_read_byte((uint8_t*)EEPROM_FARM_MODE);
|
farm_mode = eeprom_read_byte((uint8_t*)EEPROM_FARM_MODE);
|
||||||
@ -9608,6 +9608,8 @@ void disable_force_z()
|
|||||||
{
|
{
|
||||||
uint16_t z_microsteps=0;
|
uint16_t z_microsteps=0;
|
||||||
|
|
||||||
|
if(PIN_INQ(Z_ENABLE_PIN)!=Z_ENABLE_ON)
|
||||||
|
return; // motor already disabled (may be ;-p )
|
||||||
#ifdef TMC2130
|
#ifdef TMC2130
|
||||||
z_microsteps=tmc2130_rd_MSCNT(Z_TMC2130_CS);
|
z_microsteps=tmc2130_rd_MSCNT(Z_TMC2130_CS);
|
||||||
#endif //TMC2130
|
#endif //TMC2130
|
||||||
|
@ -368,6 +368,7 @@
|
|||||||
#define PIN_SET(pin) PORT(pin) |= __MSK(pin)
|
#define PIN_SET(pin) PORT(pin) |= __MSK(pin)
|
||||||
#define PIN_VAL(pin, val) if (val) PIN_SET(pin); else PIN_CLR(pin);
|
#define PIN_VAL(pin, val) if (val) PIN_SET(pin); else PIN_CLR(pin);
|
||||||
#define PIN_GET(pin) (PIN(pin) & __MSK(pin))
|
#define PIN_GET(pin) (PIN(pin) & __MSK(pin))
|
||||||
|
#define PIN_INQ(pin) (PORT(pin) & __MSK(pin))
|
||||||
|
|
||||||
|
|
||||||
#endif //_IO_ATMEGA2560
|
#endif //_IO_ATMEGA2560
|
||||||
|
Loading…
Reference in New Issue
Block a user