Merge branch 'bugfix-2.0.x' into More-SD-Pause-Fixes

This commit is contained in:
InsanityAutomation
2019-01-12 19:34:02 -05:00
committed by GitHub
106 changed files with 4125 additions and 1136 deletions
-16
View File
@@ -1480,22 +1480,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
+1 -1
View File
@@ -100,7 +100,7 @@ uint16_t HAL_adc_result;
// --------------------------------------------------------------------------
STM32ADC adc(ADC1);
uint8 adc_pins[] = {
uint8_t adc_pins[] = {
#if HAS_TEMP_ADC_0
TEMP_0_PIN,
#endif
@@ -52,14 +52,14 @@ uint8_t ServoCount; //=0
#define TAU_USEC (TAU_MSEC * 1000)
#define TAU_CYC (TAU_MSEC * CYC_MSEC)
#define SERVO_PRESCALER (TAU_CYC / MAX_OVERFLOW + 1)
#define SERVO_OVERFLOW ((uint16)round((double)TAU_CYC / SERVO_PRESCALER))
#define SERVO_OVERFLOW ((uint16_t)round((double)TAU_CYC / SERVO_PRESCALER))
// Unit conversions
#define US_TO_COMPARE(us) ((uint16)map((us), 0, TAU_USEC, 0, SERVO_OVERFLOW))
#define COMPARE_TO_US(c) ((uint32)map((c), 0, SERVO_OVERFLOW, 0, TAU_USEC))
#define ANGLE_TO_US(a) ((uint16)(map((a), this->minAngle, this->maxAngle, \
#define US_TO_COMPARE(us) ((uint16_t)map((us), 0, TAU_USEC, 0, SERVO_OVERFLOW))
#define COMPARE_TO_US(c) ((uint32_t)map((c), 0, SERVO_OVERFLOW, 0, TAU_USEC))
#define ANGLE_TO_US(a) ((uint16_t)(map((a), this->minAngle, this->maxAngle, \
SERVO_DEFAULT_MIN_PW, SERVO_DEFAULT_MAX_PW)))
#define US_TO_ANGLE(us) ((int16)(map((us), SERVO_DEFAULT_MIN_PW, SERVO_DEFAULT_MAX_PW, \
#define US_TO_ANGLE(us) ((int16_t)(map((us), SERVO_DEFAULT_MIN_PW, SERVO_DEFAULT_MAX_PW, \
this->minAngle, this->maxAngle)))
libServo::libServo() {
@@ -74,7 +74,7 @@ bool libServo::attach(const int32_t pin, const int32_t minAngle, const int32_t m
this->maxAngle = maxAngle;
timer_dev *tdev = PIN_MAP[this->pin].timer_device;
uint8 tchan = PIN_MAP[this->pin].timer_channel;
uint8_t tchan = PIN_MAP[this->pin].timer_channel;
pinMode(this->pin, PWM);
pwmWrite(this->pin, 0);
@@ -97,7 +97,7 @@ bool libServo::detach() {
int32_t libServo::read() const {
if (this->attached()) {
timer_dev *tdev = PIN_MAP[this->pin].timer_device;
uint8 tchan = PIN_MAP[this->pin].timer_channel;
uint8_t tchan = PIN_MAP[this->pin].timer_channel;
return US_TO_ANGLE(COMPARE_TO_US(timer_get_compare(tdev, tchan)));
}
return 0;
@@ -138,7 +138,7 @@ bool SDIO_WriteBlock(uint32_t blockAddress, const uint8_t *data) {
SDIO_CLEAR_FLAG(SDIO_ICR_CMD_FLAGS | SDIO_ICR_DATA_FLAGS);
uint32 timeout = millis() + SDIO_WRITE_TIMEOUT;
uint32_t timeout = millis() + SDIO_WRITE_TIMEOUT;
while (timeout > millis()) {
if (SDIO_GetCardState() == SDIO_CARD_TRANSFER) {
return true;
@@ -133,7 +133,7 @@ uint8_t spiRec(void) {
*/
void spiRead(uint8_t* buf, uint16_t nbyte) {
SPI.beginTransaction(spiConfig);
SPI.dmaTransfer(0, const_cast<uint8*>(buf), nbyte);
SPI.dmaTransfer(0, const_cast<uint8_t*>(buf), nbyte);
SPI.endTransaction();
}
@@ -161,7 +161,7 @@ void spiSend(uint8_t b) {
void spiSendBlock(uint8_t token, const uint8_t* buf) {
SPI.beginTransaction(spiConfig);
SPI.send(token);
SPI.dmaSend(const_cast<uint8*>(buf), 512);
SPI.dmaSend(const_cast<uint8_t*>(buf), 512);
SPI.endTransaction();
}
@@ -119,7 +119,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
case STEP_TIMER_NUM:
timer_pause(STEP_TIMER_DEV);
timer_set_count(STEP_TIMER_DEV, 0);
timer_set_prescaler(STEP_TIMER_DEV, (uint16)(STEPPER_TIMER_PRESCALE - 1));
timer_set_prescaler(STEP_TIMER_DEV, (uint16_t)(STEPPER_TIMER_PRESCALE - 1));
timer_set_reload(STEP_TIMER_DEV, 0xFFFF);
timer_set_compare(STEP_TIMER_DEV, STEP_TIMER_CHAN, MIN(HAL_TIMER_TYPE_MAX, (STEPPER_TIMER_RATE / frequency)));
timer_attach_interrupt(STEP_TIMER_DEV, STEP_TIMER_CHAN, stepTC_Handler);
@@ -130,7 +130,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
case TEMP_TIMER_NUM:
timer_pause(TEMP_TIMER_DEV);
timer_set_count(TEMP_TIMER_DEV, 0);
timer_set_prescaler(TEMP_TIMER_DEV, (uint16)(TEMP_TIMER_PRESCALE - 1));
timer_set_prescaler(TEMP_TIMER_DEV, (uint16_t)(TEMP_TIMER_PRESCALE - 1));
timer_set_reload(TEMP_TIMER_DEV, 0xFFFF);
timer_set_compare(TEMP_TIMER_DEV, TEMP_TIMER_CHAN, MIN(HAL_TIMER_TYPE_MAX, ((F_CPU / TEMP_TIMER_PRESCALE) / frequency)));
timer_attach_interrupt(TEMP_TIMER_DEV, TEMP_TIMER_CHAN, tempTC_Handler);
@@ -157,7 +157,7 @@ void HAL_timer_disable_interrupt(const uint8_t timer_num) {
}
}
static inline bool timer_irq_enabled(const timer_dev * const dev, const uint8 interrupt) {
static inline bool timer_irq_enabled(const timer_dev * const dev, const uint8_t interrupt) {
return bool(*bb_perip(&(dev->regs).adv->DIER, interrupt));
}
@@ -1480,22 +1480,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1478,22 +1478,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1453,22 +1453,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1478,22 +1478,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1487,22 +1487,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1481,22 +1481,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1484,22 +1484,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1484,22 +1484,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1480,22 +1480,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1480,22 +1480,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1487,22 +1487,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1480,22 +1480,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1480,22 +1480,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1492,22 +1492,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,72 @@
# Modifications to PowerWASP firmware with a few extras
The later versions of the PowerWASP controller board have power loss detection on pin 65 (low on loss). this has been configured in POWER_LOSS_RECOVERY. Because of this there is no need to save each command line just in case of a power loss to the machine. The board will hold enough power to allow the print to be saved to the SD card.
The retract position on finishing the print has been set at Z190 X0 Y0
There are provisions made here to use ESP3D wireless printer control.
https://github.com/luc-github/ESP3D
The original PowerWASP board has available a internal serial port connection with Arduino Serial3.
The connections are as follows:
```
.------------.---------------------.
| | Serial3 |
| | [O] 5V | Front
| FAN | [O] GND | panel
| | [O] TX | side
| | [O] RX |
`------------´---------------------´
```
With the option of wireless file upload to the SD card, the idea of updating the Firmware
from the SD can also be useful. This option has been selected, but requires a modified boot loader
that can be found here:
https://github.com/rainerumrobotics/MicroBridge-Arduino-ATMega2560
USB and SDCARD Firmware flashing for the ARDUINO ATMEGA 2560 and ADK
---------------------------------------------------------------------
The bootloader looks for byte in eeprom at address 0x3FF:
-if it is set to 0xF0 bootloader will look for a bin file on the sdcard named
firmware.bin and use it to flash the firmware then reset the byte to 0xFF so it
does this only once
-otherwise no action is taken and bootloader works as a arduino bootloader except
some of the debugging functions are missing
Setup
ADAFruit micro sdcard 5V ready:
SDCARD on ATMEGA 2560 or ADK
pin 50 - DO
pin 51 - DI
pin 52 - CLK
pin 53 - CS
Generate BIN file for firmware update:
To generate a bin file you need issue the following command on you apps elf executable:
avr-objcopy -I elf32-avr -O binary firmware.cpp.elf firmware.bin
this generates firmware.bin which can be put on the sd for flashing your firmware. You can find the elf
file in you apps build directory.
Using olimex usb to upload bootloader:
avrdude -c stk500v2 -p m2560 -P /dev/tty.usbmodemfd131 -B 500 -e -u -U lock:w:0x3F:m -U efuse:w:0xFD:m -U hfuse:w:0xD8:m -U efuse:w:0xFF:m -F
avrdude -p m2560 -c stk500v2 -P /dev/tty.usbmodemfa131 -F -U flash:w:stk500boot.hex -b 115200 -B1 -U lock:w:0x0F:m
avrdude -p m168 -c usbtiny -e -u -U lock:w:0x3f:m -U efuse:w:0x00:m -U hfuse:w:0xDD:m -U lfuse:w:0xFF:m
avrdude -p m2560 -c stk500v2 -P /dev/tty.usbmodemfd131 -U flash:w:stk500boot_v2_mega2560.hex -U lock:w:0x0F:m -v
avrdude -c stk500v2 -p m2560 -P /dev/tty.usbmodemfd131 -U lock:w:0x3F:m -U efuse:w:0xFD:m -U hfuse:w:0xD8:m -U lfuse:w:0xFF:m -e -v
@@ -1481,22 +1481,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1481,22 +1481,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1481,22 +1481,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1481,22 +1481,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1481,22 +1481,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1454,22 +1454,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1481,22 +1481,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1481,22 +1481,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1481,22 +1481,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1481,22 +1481,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1481,22 +1481,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1479,22 +1479,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
@@ -1480,22 +1480,6 @@
*/
//#define TMC_DEBUG
/**
* M915 Z Axis Calibration
*
* - Adjust Z stepper current,
* - Drive the Z axis to its physical maximum, and
* - Home Z to account for the lost steps.
*
* Use M915 Snn to specify the current.
* Use M925 Znn to add extra Z height to Z_MAX_POS.
*/
//#define TMC_Z_CALIBRATION
#if ENABLED(TMC_Z_CALIBRATION)
#define CALIBRATION_CURRENT 250
#define CALIBRATION_EXTRA_HEIGHT 10
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
* A list of available functions can be found on the library github page
+3 -3
View File
@@ -41,9 +41,9 @@
* object. On resume (M24) the head will be moved back and the
* print will resume.
*
* If Marlin is compiled without SD Card support, M125 can be
* used directly to pause the print and move to park position,
* resuming with a button click or M108.
* When not actively SD printing, M125 simply moves to the park
* position and waits, resuming with a button click or M108.
* Without PARK_HEAD_ON_PAUSE the M125 command does nothing.
*
* L = override retract length
* X = override X
@@ -384,54 +384,4 @@
}
#endif // USE_SENSORLESS
/**
* TMC Z axis calibration routine
*/
#if ENABLED(TMC_Z_CALIBRATION)
void GcodeSuite::M915() {
const uint16_t _rms = parser.seenval('S') ? parser.value_int() : CALIBRATION_CURRENT,
_z = parser.seenval('Z') ? parser.value_linear_units() : CALIBRATION_EXTRA_HEIGHT;
if (!TEST(axis_known_position, Z_AXIS)) {
SERIAL_ECHOLNPGM("\nPlease home Z axis first");
return;
}
#if AXIS_IS_TMC(Z)
const uint16_t Z_current_1 = stepperZ.getMilliamps();
stepperZ.rms_current(_rms);
#endif
#if AXIS_IS_TMC(Z2)
const uint16_t Z2_current_1 = stepperZ2.getMilliamps();
stepperZ2.rms_current(_rms);
#endif
#if AXIS_IS_TMC(Z3)
const uint16_t Z3_current_1 = stepperZ3.getMilliamps();
stepperZ3.rms_current(_rms);
#endif
SERIAL_ECHOPAIR("\nCalibration current: Z", _rms);
soft_endstops_enabled = false;
do_blocking_move_to_z(Z_MAX_POS+_z);
#if AXIS_IS_TMC(Z)
stepperZ.rms_current(Z_current_1);
#endif
#if AXIS_IS_TMC(Z2)
stepperZ2.rms_current(Z2_current_1);
#endif
#if AXIS_IS_TMC(Z3)
stepperZ3.rms_current(Z3_current_1);
#endif
do_blocking_move_to_z(Z_MAX_POS);
soft_endstops_enabled = true;
SERIAL_ECHOLNPGM("\nHoming Z because we lost steps");
enqueue_and_echo_commands_P(PSTR("G28 Z"));
}
#endif
#endif // HAS_TRINAMIC
-3
View File
@@ -662,9 +662,6 @@ void GcodeSuite::process_parsed_command(
#if USE_SENSORLESS
case 914: M914(); break; // M914: Set StallGuard sensitivity.
#endif
#if ENABLED(TMC_Z_CALIBRATION)
case 915: M915(); break; // M915: TMC Z axis calibration.
#endif
#endif
#if HAS_MICROSTEPS
-3
View File
@@ -804,9 +804,6 @@ private:
#if USE_SENSORLESS
static void M914();
#endif
#if ENABLED(TMC_Z_CALIBRATION)
static void M915();
#endif
#endif
#if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM || ENABLED(DIGIPOT_I2C) || ENABLED(DAC_STEPPER_CURRENT)
+2 -2
View File
@@ -341,6 +341,8 @@
#error "MAX6675_SS is now MAX6675_SS_PIN. Please update your configuration and/or pins."
#elif defined(MAX6675_SS2)
#error "MAX6675_SS2 is now MAX6675_SS2_PIN. Please update your configuration and/or pins."
#elif defined(TMC_Z_CALIBRATION)
#error "TMC_Z_CALIBRATION has been deprecated in favor of Z_STEPPER_AUTO_ALIGN. Please update your configuration."
#endif
#define BOARD_MKS_13 -47
@@ -1884,8 +1886,6 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
// Other TMC feature requirements
#if ENABLED(HYBRID_THRESHOLD) && !STEALTHCHOP_ENABLED
#error "Enable STEALTHCHOP_(XY|Z|E) to use HYBRID_THRESHOLD."
#elif ENABLED(TMC_Z_CALIBRATION) && !AXIS_IS_TMC(Z) && !AXIS_IS_TMC(Z2) && !AXIS_IS_TMC(Z3)
#error "TMC_Z_CALIBRATION requires at least one TMC driver on Z axis"
#elif ENABLED(SENSORLESS_HOMING) && !HAS_STALLGUARD
#error "SENSORLESS_HOMING requires TMC2130 stepper drivers."
#elif ENABLED(SENSORLESS_PROBING) && !HAS_STALLGUARD
-1
View File
@@ -43,7 +43,6 @@
#define MSG_AUTO_HOME_X _UxGT("Orichen X")
#define MSG_AUTO_HOME_Y _UxGT("Orichen Y")
#define MSG_AUTO_HOME_Z _UxGT("Orichen Z")
#define MSG_TMC_Z_CALIBRATION _UxGT("Calibrar Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Orichen XYZ")
#define MSG_LEVEL_BED_WAITING _UxGT("Encetar (pretar)")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Vinient punto")
-1
View File
@@ -38,7 +38,6 @@
#define MSG_AUTOSTART _UxGT("Автостарт")
#define MSG_DISABLE_STEPPERS _UxGT("Изкл. двигатели")
#define MSG_AUTO_HOME _UxGT("Паркиране")
#define MSG_TMC_Z_CALIBRATION _UxGT("Калибровка Z")
#define MSG_SET_HOME_OFFSETS _UxGT("Задай Начало")
#define MSG_SET_ORIGIN _UxGT("Изходна точка")
#define MSG_PREHEAT_1 _UxGT("Подгряване " PREHEAT_1_LABEL)
-1
View File
@@ -44,7 +44,6 @@
#define MSG_AUTO_HOME_X _UxGT("X a origen")
#define MSG_AUTO_HOME_Y _UxGT("Y a origen")
#define MSG_AUTO_HOME_Z _UxGT("Z a origen")
#define MSG_TMC_Z_CALIBRATION _UxGT("Calibra Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Origen XYZ")
#define MSG_LEVEL_BED_WAITING _UxGT("Premeu per iniciar")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Següent punt")
-1
View File
@@ -56,7 +56,6 @@
#define MSG_AUTO_HOME_X _UxGT("Domů osa X")
#define MSG_AUTO_HOME_Y _UxGT("Domů osa Y")
#define MSG_AUTO_HOME_Z _UxGT("Domů osa Z")
#define MSG_TMC_Z_CALIBRATION _UxGT("Kalibrovat Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Měření podložky")
#define MSG_LEVEL_BED_WAITING _UxGT("Kliknutím spusťte")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Další bod")
-1
View File
@@ -43,7 +43,6 @@
#define MSG_AUTO_HOME_X _UxGT("Home X")
#define MSG_AUTO_HOME_Y _UxGT("Home Y")
#define MSG_AUTO_HOME_Z _UxGT("Home Z")
#define MSG_TMC_Z_CALIBRATION _UxGT("Kalibrer Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Homing XYZ")
#define MSG_LEVEL_BED_WAITING _UxGT("Klik når du er klar")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Næste punkt")
-1
View File
@@ -51,7 +51,6 @@
#define MSG_AUTO_HOME_Y _UxGT("Home Y")
#define MSG_AUTO_HOME_Z _UxGT("Home Z")
#define MSG_AUTO_Z_ALIGN _UxGT("Z-Achsen ausgleichen")
#define MSG_TMC_Z_CALIBRATION _UxGT("Kalibriere Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Home XYZ")
#define MSG_LEVEL_BED_WAITING _UxGT("Klick zum Starten")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Nächste Koordinate")
-1
View File
@@ -43,7 +43,6 @@
#define MSG_AUTO_HOME_X _UxGT("Αρχικό σημείο X")
#define MSG_AUTO_HOME_Y _UxGT("Αρχικό σημείο Y")
#define MSG_AUTO_HOME_Z _UxGT("Αρχικό σημείο Z")
#define MSG_TMC_Z_CALIBRATION _UxGT("Βαθμονόμηση Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Επαναφορά στο αρχικό σημείο ΧΥΖ")
#define MSG_LEVEL_BED_WAITING _UxGT("Κάντε κλικ για να ξεκινήσετε")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Επόμενο σημείο")
-1
View File
@@ -43,7 +43,6 @@
#define MSG_AUTO_HOME_X _UxGT("Αρχικό σημείο X")
#define MSG_AUTO_HOME_Y _UxGT("Αρχικό σημείο Y")
#define MSG_AUTO_HOME_Z _UxGT("Αρχικό σημείο Z")
#define MSG_TMC_Z_CALIBRATION _UxGT("Βαθμονόμηση Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Επαναφορά Επ. Εκτύπωσης") //SHORTEN
#define MSG_LEVEL_BED_WAITING _UxGT("Επιπεδοποίηση επ. Εκτύπωσης περιμενει") //SHORTEN
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Επόμενο σημείο")
-3
View File
@@ -103,9 +103,6 @@
#ifndef MSG_AUTO_Z_ALIGN
#define MSG_AUTO_Z_ALIGN _UxGT("Auto Z-Align")
#endif
#ifndef MSG_TMC_Z_CALIBRATION
#define MSG_TMC_Z_CALIBRATION _UxGT("Calibrate Z")
#endif
#ifndef MSG_LEVEL_BED_HOMING
#define MSG_LEVEL_BED_HOMING _UxGT("Homing XYZ")
#endif
-1
View File
@@ -46,7 +46,6 @@
#define MSG_AUTO_HOME_X _UxGT("Origen X")
#define MSG_AUTO_HOME_Y _UxGT("Origen Y")
#define MSG_AUTO_HOME_Z _UxGT("Origen Z")
#define MSG_TMC_Z_CALIBRATION _UxGT("Calibrar Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Origen XYZ")
#define MSG_LEVEL_BED_WAITING _UxGT("Iniciar (Presione)")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Siguiente punto")
-1
View File
@@ -46,7 +46,6 @@
#define MSG_AUTO_HOME_X _UxGT("X jatorrira")
#define MSG_AUTO_HOME_Y _UxGT("Y jatorrira")
#define MSG_AUTO_HOME_Z _UxGT("Z jatorrira")
#define MSG_TMC_Z_CALIBRATION _UxGT("Kalibratu Z")
#define MSG_LEVEL_BED_HOMING _UxGT("XYZ hasieraratzen")
#define MSG_LEVEL_BED_WAITING _UxGT("Klik egin hasteko")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Hurrengo Puntua")
-1
View File
@@ -39,7 +39,6 @@
#define MSG_AUTOSTART _UxGT("Automaatti")
#define MSG_DISABLE_STEPPERS _UxGT("Vapauta moottorit")
#define MSG_AUTO_HOME _UxGT("Aja referenssiin")
#define MSG_TMC_Z_CALIBRATION _UxGT("Kalibroi Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Homing XYZ")
#define MSG_LEVEL_BED_WAITING _UxGT("Click to Begin")
#define MSG_LEVEL_BED_DONE _UxGT("Leveling Done!")
-1
View File
@@ -46,7 +46,6 @@
#define MSG_AUTO_HOME_X _UxGT("Origine X Auto.")
#define MSG_AUTO_HOME_Y _UxGT("Origine Y Auto.")
#define MSG_AUTO_HOME_Z _UxGT("Origine Z Auto.")
#define MSG_TMC_Z_CALIBRATION _UxGT("Calibrer Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Origine XYZ")
#define MSG_LEVEL_BED_WAITING _UxGT("Clic pour commencer")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Point suivant")
-1
View File
@@ -43,7 +43,6 @@
#define MSG_AUTO_HOME_X _UxGT("Ir orixe X")
#define MSG_AUTO_HOME_Y _UxGT("Ir orixe Y")
#define MSG_AUTO_HOME_Z _UxGT("Ir orixe Z")
#define MSG_TMC_Z_CALIBRATION _UxGT("Calibrar Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Ir orixes XYZ")
#define MSG_LEVEL_BED_WAITING _UxGT("Prema pulsador")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Seguinte punto")
-1
View File
@@ -43,7 +43,6 @@
#define MSG_AUTO_HOME_X _UxGT("Home-aj X")
#define MSG_AUTO_HOME_Y _UxGT("Home-aj Y")
#define MSG_AUTO_HOME_Z _UxGT("Home-aj Z")
#define MSG_TMC_Z_CALIBRATION _UxGT("Kalibriraj Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Home-aj XYZ")
#define MSG_LEVEL_BED_WAITING _UxGT("Klikni za početak")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Sljedeća točka")
-1
View File
@@ -49,7 +49,6 @@
#define MSG_AUTO_HOME_Y _UxGT("Home asse Y")
#define MSG_AUTO_HOME_Z _UxGT("Home asse Z")
#define MSG_AUTO_Z_ALIGN _UxGT("Allineam.automat. Z")
#define MSG_TMC_Z_CALIBRATION _UxGT("Calibra Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Home assi XYZ")
#define MSG_LEVEL_BED_WAITING _UxGT("Premi per iniziare")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Punto successivo")
@@ -50,7 +50,6 @@
#define MSG_AUTO_HOME_X _UxGT("Xジク ゲンテンフッキ") // "Home X"
#define MSG_AUTO_HOME_Y _UxGT("Yジク ゲンテンフッキ") // "Home Y"
#define MSG_AUTO_HOME_Z _UxGT("Zジク ゲンテンフッキ") // "Home Z"
#define MSG_TMC_Z_CALIBRATION _UxGT("Zジク コウセイ")
#define MSG_LEVEL_BED_HOMING _UxGT("ゲンテンフッキチュウ") // "Homing XYZ"
#define MSG_LEVEL_BED_WAITING _UxGT("レベリングカイシ") // "Click to Begin"
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("ツギノソクテイテンヘ") // "Next Point"
-1
View File
@@ -48,7 +48,6 @@
#define MSG_AUTO_HOME_X _UxGT("X 홈으로")
#define MSG_AUTO_HOME_Y _UxGT("Y 홈으로")
#define MSG_AUTO_HOME_Z _UxGT("Z 홈으로")
#define MSG_TMC_Z_CALIBRATION _UxGT("Z 캘리브레이션")
#define MSG_LEVEL_BED_HOMING _UxGT("XYZ 홈으로")
#define MSG_LEVEL_BED_WAITING _UxGT("누르면 시작합니다")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("다음 Point")
-1
View File
@@ -46,7 +46,6 @@
#define MSG_AUTO_HOME_X _UxGT("Home X")
#define MSG_AUTO_HOME_Y _UxGT("Home Y")
#define MSG_AUTO_HOME_Z _UxGT("Home Z")
#define MSG_TMC_Z_CALIBRATION _UxGT("Kalibreer Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Homing XYZ")
#define MSG_LEVEL_BED_WAITING _UxGT("Klik voor begin")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Volgende Plaats")
-1
View File
@@ -40,7 +40,6 @@
#define MSG_AUTO_HOME_X _UxGT("Zeruj X")
#define MSG_AUTO_HOME_Y _UxGT("Zeruj Y")
#define MSG_AUTO_HOME_Z _UxGT("Zeruj Z")
#define MSG_TMC_Z_CALIBRATION _UxGT("Kalibruj Z")
#define MSG_LEVEL_BED _UxGT("Poziom. stołu")
#define MSG_LEVEL_BED_HOMING _UxGT("Pozycja zerowa")
#define MSG_LEVEL_BED_WAITING _UxGT("Kliknij by rozp.")
-1
View File
@@ -54,7 +54,6 @@
#define MSG_AUTO_HOME_Y _UxGT("Ir na origem Y")
#define MSG_AUTO_HOME_Z _UxGT("Ir na origem Z")
#define MSG_AUTO_Z_ALIGN _UxGT("Auto alinhar Z")
#define MSG_TMC_Z_CALIBRATION _UxGT("Calibrar Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Indo para origem")
#define MSG_LEVEL_BED_WAITING _UxGT("Clique para Iniciar")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Próximo Ponto")
-1
View File
@@ -43,7 +43,6 @@
#define MSG_AUTO_HOME_X _UxGT("Ir para origem X")
#define MSG_AUTO_HOME_Y _UxGT("Ir para origem Y")
#define MSG_AUTO_HOME_Z _UxGT("Ir para origem Z")
#define MSG_TMC_Z_CALIBRATION _UxGT("Calibrar Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Indo para origem")
#define MSG_LEVEL_BED_WAITING _UxGT("Click para iniciar")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Próximo ponto")
-1
View File
@@ -47,7 +47,6 @@
#define MSG_AUTO_HOME_X _UxGT("Парковка X")
#define MSG_AUTO_HOME_Y _UxGT("Парковка Y")
#define MSG_AUTO_HOME_Z _UxGT("Парковка Z")
#define MSG_TMC_Z_CALIBRATION _UxGT("Калибровать Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Нулевое положение")
#define MSG_LEVEL_BED_WAITING _UxGT("Нажмите чтобы начать")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Следующая точка")

Some files were not shown because too many files have changed in this diff Show More