"disable_z()" for Delta PSU II

This commit is contained in:
MRprusa3d 2019-03-25 23:28:25 +01:00
parent 632781c4a2
commit 17a534e42b
2 changed files with 4 additions and 1 deletions

View File

@ -1316,7 +1316,7 @@ void setup()
}
#endif //TMC2130
#if defined(Z_AXIS_ALWAYS_ON)
#if defined(Z_AXIS_ALWAYS_ON) && !defined(PSU_Delta)
enable_z();
#endif
farm_mode = eeprom_read_byte((uint8_t*)EEPROM_FARM_MODE);
@ -9608,6 +9608,8 @@ void disable_force_z()
{
uint16_t z_microsteps=0;
if(PIN_INQ(Z_ENABLE_PIN)!=Z_ENABLE_ON)
return; // motor already disabled (may be ;-p )
#ifdef TMC2130
z_microsteps=tmc2130_rd_MSCNT(Z_TMC2130_CS);
#endif //TMC2130

View File

@ -368,6 +368,7 @@
#define PIN_SET(pin) PORT(pin) |= __MSK(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_INQ(pin) (PORT(pin) & __MSK(pin))
#endif //_IO_ATMEGA2560