Commit 075af738 authored by MagoKimbra's avatar MagoKimbra

Same fix

parent ae00f247
......@@ -6786,29 +6786,29 @@ inline void gcode_T(uint8_t tmp_extruder) {
switch(target_extruder)
{
case 0:
WRITE_RELE(E0E2_CHOICE_PIN, 0);
WRITE_RELE(E1E3_CHOICE_PIN, 0);
WRITE_RELE(E0E2_CHOICE_PIN, LOW);
WRITE_RELE(E1E3_CHOICE_PIN, LOW);
active_driver = 0;
delay(500); // 500 microseconds delay for relay
enable_e0();
break;
case 1:
WRITE_RELE(E0E2_CHOICE_PIN, 0);
WRITE_RELE(E1E3_CHOICE_PIN, 0);
WRITE_RELE(E0E2_CHOICE_PIN, LOW);
WRITE_RELE(E1E3_CHOICE_PIN, LOW);
active_driver = 1;
delay(500); // 500 microseconds delay for relay
enable_e1();
break;
case 2:
WRITE_RELE(E0E2_CHOICE_PIN, 1);
WRITE_RELE(E1E3_CHOICE_PIN, 0);
WRITE_RELE(E0E2_CHOICE_PIN, HIGH);
WRITE_RELE(E1E3_CHOICE_PIN, LOW);
active_driver = 0;
delay(500); // 500 microseconds delay for relay
enable_e2();
break;
case 3:
WRITE_RELE(E0E2_CHOICE_PIN, 0);
WRITE_RELE(E1E3_CHOICE_PIN, 1);
WRITE_RELE(E0E2_CHOICE_PIN, LOW);
WRITE_RELE(E1E3_CHOICE_PIN, HIGH);
active_driver = 1;
delay(500); // 500 microseconds delay for relay
enable_e3();
......@@ -6820,33 +6820,33 @@ inline void gcode_T(uint8_t tmp_extruder) {
switch(target_extruder)
{
case 0:
WRITE_RELE(E0E1_CHOICE_PIN, 0);
WRITE_RELE(E0E2_CHOICE_PIN, 0);
WRITE_RELE(E0E3_CHOICE_PIN, 0);
WRITE_RELE(E0E1_CHOICE_PIN, LOW);
WRITE_RELE(E0E2_CHOICE_PIN, LOW);
WRITE_RELE(E0E3_CHOICE_PIN, LOW);
active_driver = 0;
delay(500); // 500 microseconds delay for relay
enable_e0();
break;
case 1:
WRITE_RELE(E0E1_CHOICE_PIN, 1);
WRITE_RELE(E0E2_CHOICE_PIN, 0);
WRITE_RELE(E0E3_CHOICE_PIN, 0);
WRITE_RELE(E0E1_CHOICE_PIN, HIGH);
WRITE_RELE(E0E2_CHOICE_PIN, LOW);
WRITE_RELE(E0E3_CHOICE_PIN, LOW);
active_driver = 0;
delay(500); // 500 microseconds delay for relay
enable_e0();
break;
case 2:
WRITE_RELE(E0E1_CHOICE_PIN, 1);
WRITE_RELE(E0E2_CHOICE_PIN, 1);
WRITE_RELE(E0E3_CHOICE_PIN, 0);
WRITE_RELE(E0E1_CHOICE_PIN, HIGH);
WRITE_RELE(E0E2_CHOICE_PIN, HIGH);
WRITE_RELE(E0E3_CHOICE_PIN, LOW);
active_driver = 0;
delay(500); // 500 microseconds delay for relay
enable_e0();
break;
case 3:
WRITE_RELE(E0E1_CHOICE_PIN, 1);
WRITE_RELE(E0E2_CHOICE_PIN, 1);
WRITE_RELE(E0E3_CHOICE_PIN, 1);
WRITE_RELE(E0E1_CHOICE_PIN, HIGH);
WRITE_RELE(E0E2_CHOICE_PIN, HIGH);
WRITE_RELE(E0E3_CHOICE_PIN, HIGH);
active_driver = 0;
delay(500); // 500 microseconds delay for relay
enable_e0();
......@@ -6858,22 +6858,22 @@ inline void gcode_T(uint8_t tmp_extruder) {
switch(target_extruder)
{
case 0:
WRITE_RELE(E0E2_CHOICE_PIN, 0);
WRITE_RELE(E0E2_CHOICE_PIN, LOW);
active_driver = 0;
delay(500); // 500 microseconds delay for relay
enable_e0();
break;
case 1:
WRITE_RELE(E0E2_CHOICE_PIN, 0);
WRITE_RELE(E0E2_CHOICE_PIN, LOW);
active_driver = 1;
delay(500); // 500 microseconds delay for relay
enable_e1();
break;
case 2:
WRITE_RELE(E0E2_CHOICE_PIN, 1);
WRITE_RELE(E0E2_CHOICE_PIN, HIGH);
active_driver = 0;
delay(500); // 500 microseconds delay for relay
enable_e2();
enable_e0();
break;
}
#elif (EXTRUDERS == 3) && HAS(E0E1) && HAS(E0E2) && (DRIVER_EXTRUDERS == 1)
......@@ -6882,22 +6882,22 @@ inline void gcode_T(uint8_t tmp_extruder) {
switch(target_extruder)
{
case 0:
WRITE_RELE(E0E1_CHOICE_PIN, 0);
WRITE_RELE(E0E2_CHOICE_PIN, 0);
WRITE_RELE(E0E1_CHOICE_PIN, LOW);
WRITE_RELE(E0E2_CHOICE_PIN, LOW);
active_driver = 0;
delay(500); // 500 microseconds delay for relay
enable_e0();
break;
case 1:
WRITE_RELE(E0E1_CHOICE_PIN, 1);
WRITE_RELE(E0E2_CHOICE_PIN, 0);
WRITE_RELE(E0E1_CHOICE_PIN, HIGH);
WRITE_RELE(E0E2_CHOICE_PIN, LOW);
active_driver = 0;
delay(500); // 500 microseconds delay for relay
enable_e0();
break;
case 2:
WRITE_RELE(E0E1_CHOICE_PIN, 1);
WRITE_RELE(E0E2_CHOICE_PIN, 1);
WRITE_RELE(E0E1_CHOICE_PIN, HIGH);
WRITE_RELE(E0E2_CHOICE_PIN, HIGH);
active_driver = 0;
delay(500); // 500 microseconds delay for relay
enable_e0();
......@@ -6909,13 +6909,13 @@ inline void gcode_T(uint8_t tmp_extruder) {
switch(target_extruder)
{
case 0:
WRITE_RELE(E0E1_CHOICE_PIN, 0);
WRITE_RELE(E0E1_CHOICE_PIN, LOW);
active_driver = 0;
delay(500); // 500 microseconds delay for relay
enable_e0();
break;
case 1:
WRITE_RELE(E0E1_CHOICE_PIN, 1);
WRITE_RELE(E0E1_CHOICE_PIN, HIGH);
active_driver = 0;
delay(500); // 500 microseconds delay for relay
enable_e0();
......
......@@ -672,8 +672,10 @@
#if ENABLED(MKR4)
#if ENABLED(INVERTED_RELE_PINS)
#define WRITE_RELE(pin, value) WRITE(pin, !value)
#define OUT_WRITE_RELE(pin, value) OUT_WRITE(pin, !value)
#else
#define WRITE_RELE(pin, value) WRITE(pin, value)
#define OUT_WRITE_RELE(pin, value) OUT_WRITE(pin, value)
#endif
#endif
......
......@@ -1248,7 +1248,7 @@
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
#endif // RAMPS_13_EEB
#endif // RAMPS_13_HHB
/****************************************************************************************/
......@@ -2533,7 +2533,6 @@
#define Z_MIN_PIN 38 // PC6
#define Z_MAX_PIN 39 // PC7
#define Z_MS1_PIN 44 // PC19
#define Z_PROBE_PIN 39 // PC7
// E0 AXIS
#define ORIG_E0_STEP_PIN 5 // PC25
......
This diff is collapsed.
......@@ -940,20 +940,16 @@ void st_init() {
//Choice E0-E1 or E0-E2 or E1-E3 pin
#if ENABLED(MKR4) && HAS(E0E1)
SET_OUTPUT(E0E1_CHOICE_PIN);
WRITE_RELE(E0E1_CHOICE_PIN, 0);
OUT_WRITE_RELE(E0E1_CHOICE_PIN, LOW);
#endif
#if ENABLED(MKR4) && HAS(E0E2)
SET_OUTPUT(E0E2_CHOICE_PIN);
WRITE_RELE(E0E2_CHOICE_PIN, 0);
OUT_WRITE_RELE(E0E2_CHOICE_PIN, LOW);
#endif
#if ENABLED(MKR4) && HAS(E0E3)
SET_OUTPUT(E0E3_CHOICE_PIN);
WRITE_RELE(E0E3_CHOICE_PIN, 0);
OUT_WRITE_RELE(E0E3_CHOICE_PIN, LOW);
#endif
#if ENABLED(MKR4) && HAS(E1E3)
SET_OUTPUT(E1E3_CHOICE_PIN);
WRITE_RELE(E1E3_CHOICE_PIN, 0);
OUT_WRITE_RELE(E1E3_CHOICE_PIN, LOW);
#endif
//endstops and pullups
......
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