Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MarlinKimbra
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
MarlinKimbra
Commits
70ff66cb
Commit
70ff66cb
authored
Sep 05, 2015
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add INVERTED_RELE_PINS
parent
76407d80
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
26 deletions
+35
-26
Configuration_Feature.h
MarlinKimbra/Configuration_Feature.h
+2
-0
Marlin_main.cpp
MarlinKimbra/Marlin_main.cpp
+23
-23
conditionals.h
MarlinKimbra/conditionals.h
+10
-3
No files found.
MarlinKimbra/Configuration_Feature.h
View file @
70ff66cb
...
...
@@ -387,8 +387,10 @@
* *
* Uncomment MKR4 to enable this feature *
* *
* Uncomment INVERTED_RELE_PINS if your relay switches with GND *
***********************************************************************/
//#define MKR4
//#define INVERTED_RELE_PINS
/***********************************************************************/
...
...
MarlinKimbra/Marlin_main.cpp
View file @
70ff66cb
...
...
@@ -6780,104 +6780,104 @@ inline void gcode_T(uint8_t tmp_extruder) {
#endif // HOTENDS > 1
#if ENABLED(MKR4) && (EXTRUDERS > 1)
#if (EXTRUDERS == 4) &&
(E0E2_CHOICE_PIN >1) && (E1E3_CHOICE_PIN > 1
) && (DRIVER_EXTRUDERS == 2)
#if (EXTRUDERS == 4) &&
HAS(E0E2) && HAS(E1E3
) && (DRIVER_EXTRUDERS == 2)
st_synchronize
();
// Finish all movement
disable_e
();
switch
(
target_extruder
)
{
case
0
:
WRITE
(
E0E2_CHOICE_PIN
,
LOW
);
WRITE
(
E1E3_CHOICE_PIN
,
LOW
);
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
(
E0E2_CHOICE_PIN
,
LOW
);
WRITE
(
E1E3_CHOICE_PIN
,
LOW
);
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
(
E0E2_CHOICE_PIN
,
HIGH
);
WRITE
(
E1E3_CHOICE_PIN
,
LOW
);
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
(
E0E2_CHOICE_PIN
,
LOW
);
WRITE
(
E1E3_CHOICE_PIN
,
HIGH
);
WRITE
_RELE
(
E0E2_CHOICE_PIN
,
LOW
);
WRITE
_RELE
(
E1E3_CHOICE_PIN
,
HIGH
);
active_driver
=
1
;
delay
(
500
);
// 500 microseconds delay for relay
enable_e3
();
break
;
}
#elif (EXTRUDERS == 3) &&
(E0E2_CHOICE_PIN >1
) && (DRIVER_EXTRUDERS == 2)
#elif (EXTRUDERS == 3) &&
HAS(E0E2
) && (DRIVER_EXTRUDERS == 2)
st_synchronize
();
// Finish all movement
disable_e
();
switch
(
target_extruder
)
{
case
0
:
WRITE
(
E0E2_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
(
E0E2_CHOICE_PIN
,
LOW
);
WRITE
_RELE
(
E0E2_CHOICE_PIN
,
LOW
);
active_driver
=
1
;
delay
(
500
);
// 500 microseconds delay for relay
enable_e1
();
break
;
case
2
:
WRITE
(
E0E2_CHOICE_PIN
,
HIGH
);
WRITE
_RELE
(
E0E2_CHOICE_PIN
,
HIGH
);
active_driver
=
0
;
delay
(
500
);
// 500 microseconds delay for relay
enable_e2
();
break
;
}
#elif (EXTRUDERS == 3) &&
(E0E1_CHOICE_PIN >1) && (E0E2_CHOICE_PIN >1
) && (DRIVER_EXTRUDERS == 1)
#elif (EXTRUDERS == 3) &&
HAS(E0E1) && HAS(E0E2
) && (DRIVER_EXTRUDERS == 1)
st_synchronize
();
// Finish all movement
disable_e
();
switch
(
target_extruder
)
{
case
0
:
WRITE
(
E0E1_CHOICE_PIN
,
LOW
);
WRITE
(
E0E2_CHOICE_PIN
,
LOW
);
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
(
E0E1_CHOICE_PIN
,
HIGH
);
WRITE
(
E0E2_CHOICE_PIN
,
LOW
);
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
(
E0E1_CHOICE_PIN
,
HIGH
);
WRITE
(
E0E2_CHOICE_PIN
,
HIGH
);
WRITE
_RELE
(
E0E1_CHOICE_PIN
,
HIGH
);
WRITE
_RELE
(
E0E2_CHOICE_PIN
,
HIGH
);
active_driver
=
0
;
delay
(
500
);
// 500 microseconds delay for relay
enable_e0
();
break
;
}
#elif (EXTRUDERS == 2) &&
(E0E1_CHOICE_PIN >
1) && (DRIVER_EXTRUDERS == 1)
#elif (EXTRUDERS == 2) &&
HAS(E0E
1) && (DRIVER_EXTRUDERS == 1)
st_synchronize
();
// Finish all movement
disable_e
();
switch
(
target_extruder
)
{
case
0
:
WRITE
(
E0E1_CHOICE_PIN
,
LOW
);
WRITE
_RELE
(
E0E1_CHOICE_PIN
,
LOW
);
active_driver
=
0
;
delay
(
500
);
// 500 microseconds delay for relay
enable_e0
();
break
;
case
1
:
WRITE
(
E0E1_CHOICE_PIN
,
HIGH
);
WRITE
_RELE
(
E0E1_CHOICE_PIN
,
HIGH
);
active_driver
=
0
;
delay
(
500
);
// 500 microseconds delay for relay
enable_e0
();
...
...
MarlinKimbra/conditionals.h
View file @
70ff66cb
...
...
@@ -638,12 +638,12 @@
#define HAS_LCD_POWER_SENSOR (HAS_POWER_CONSUMPTION_SENSOR && ENABLED(POWER_CONSUMPTION_LCD_DISPLAY))
/**
* Helper Macros for heaters and extruder fan
* Helper Macros for heaters and extruder fan
and rele
*/
#if ENABLED(INVERTED_HEATER_PINS)
#define WRITE_HEATER(pin,
value) WRITE(pin,
!value)
#define WRITE_HEATER(pin,
value) WRITE(pin,
!value)
#else
#define WRITE_HEATER(pin,
value) WRITE(pin,
value)
#define WRITE_HEATER(pin,
value) WRITE(pin,
value)
#endif
#define WRITE_HEATER_0P(v) WRITE_HEATER(HEATER_0_PIN, v)
#if HOTENDS > 1 || ENABLED(HEATERS_PARALLEL)
...
...
@@ -674,6 +674,13 @@
#define WRITE_FAN(v) WRITE(FAN_PIN, v)
#endif
#endif
#if ENABLED(MKR4)
#if ENABLED(INVERTED_RELE_PINS)
#define WRITE_RELE(pin, value) WRITE(pin, !value)
#else
#define WRITE_RELE(pin, value) WRITE(pin, value)
#endif
#endif
/**
* Buzzer
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment