Commit e7267fe5 authored by MagoKimbra's avatar MagoKimbra

Fix Dondolo

parent 5cc5f404
...@@ -6950,22 +6950,18 @@ inline void gcode_T(uint8_t tmp_extruder) { ...@@ -6950,22 +6950,18 @@ inline void gcode_T(uint8_t tmp_extruder) {
active_driver = 0; active_driver = 0;
ECHO_LMV(DB, MSG_ACTIVE_COLOR, (int)active_extruder); ECHO_LMV(DB, MSG_ACTIVE_COLOR, (int)active_extruder);
#elif ENABLED(DONDOLO) #elif ENABLED(DONDOLO)
active_extruder = target_extruder;
active_driver = 0;
if (active_extruder == 0) {
st_synchronize(); st_synchronize();
servo[DONDOLO_SERVO_INDEX].attach(0); servo[DONDOLO_SERVO_INDEX].attach(0);
if (target_extruder == 0) {
servo[DONDOLO_SERVO_INDEX].write(DONDOLO_SERVOPOS_E0); servo[DONDOLO_SERVO_INDEX].write(DONDOLO_SERVOPOS_E0);
delay (DONDOLO_SERVO_DELAY);
servo[DONDOLO_SERVO_INDEX].detach();
} }
else if (active_extruder == 1) { else if (target_extruder == 1) {
st_synchronize();
servo[DONDOLO_SERVO_INDEX].attach(0);
servo[DONDOLO_SERVO_INDEX].write(DONDOLO_SERVOPOS_E1); servo[DONDOLO_SERVO_INDEX].write(DONDOLO_SERVOPOS_E1);
}
delay(DONDOLO_SERVO_DELAY); delay(DONDOLO_SERVO_DELAY);
servo[DONDOLO_SERVO_INDEX].detach(); servo[DONDOLO_SERVO_INDEX].detach();
} active_extruder = target_extruder;
active_driver = 0;
set_stepper_direction(true); set_stepper_direction(true);
ECHO_LMV(DB, MSG_ACTIVE_DRIVER, active_driver); ECHO_LMV(DB, MSG_ACTIVE_DRIVER, active_driver);
ECHO_LMV(DB, MSG_ACTIVE_EXTRUDER, active_extruder); ECHO_LMV(DB, MSG_ACTIVE_EXTRUDER, active_extruder);
......
...@@ -576,25 +576,23 @@ void set_stepper_direction(bool onlye) { ...@@ -576,25 +576,23 @@ void set_stepper_direction(bool onlye) {
#if DISABLED(ADVANCE) && ENABLED(DONDOLO) #if DISABLED(ADVANCE) && ENABLED(DONDOLO)
if (TEST(out_bits, E_AXIS)) { if (TEST(out_bits, E_AXIS)) {
if (active_extruder == 0) { switch(active_extruder) {
REV_E_DIR(); case 0:
count_direction[E_AXIS] = -1; REV_E_DIR(); break;
case 1:
NORM_E_DIR(); break;
} }
else {
NORM_E_DIR();
count_direction[E_AXIS] = -1; count_direction[E_AXIS] = -1;
} }
}
else { else {
if (active_extruder == 0) { switch(active_extruder) {
NORM_E_DIR(); case 0:
count_direction[E_AXIS] = 1; NORM_E_DIR(); break;
case 1:
REV_E_DIR(); break;
} }
else {
REV_E_DIR();
count_direction[E_AXIS] = 1; count_direction[E_AXIS] = 1;
} }
}
#elif DISABLED(ADVANCE) #elif DISABLED(ADVANCE)
if (TEST(out_bits, E_AXIS)) { if (TEST(out_bits, E_AXIS)) {
REV_E_DIR(); REV_E_DIR();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment