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
dbd81ca3
Commit
dbd81ca3
authored
Dec 16, 2014
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Marlin_main.cpp
parent
5f054ec3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
Marlin_main.cpp
MarlinKimbra/Marlin_main.cpp
+17
-10
No files found.
MarlinKimbra/Marlin_main.cpp
View file @
dbd81ca3
...
...
@@ -319,7 +319,7 @@ uint8_t active_driver = 0;
uint8_t
debugLevel
=
0
;
int
fanSpeed
=
0
;
#ifdef SERVO_ENDSTOPS
#ifdef SERVO_ENDSTOPS
&& (NUM_SERVOS > 0)
int
servo_endstops
[]
=
SERVO_ENDSTOPS
;
int
servo_endstop_angles
[]
=
SERVO_ENDSTOP_ANGLES
;
#endif
...
...
@@ -457,6 +457,9 @@ static float color_step_moltiplicator = (DRIVER_MICROSTEP / MOTOR_ANGLE) * CARTE
#endif // NPR2
bool
Stopped
=
false
;
#if defined(PAUSE_PIN) && PAUSE_PIN > -1
bool
paused
=
false
;
#endif
#if NUM_SERVOS > 0
Servo
servos
[
NUM_SERVOS
];
...
...
@@ -581,7 +584,7 @@ void suicide()
#endif
}
#if
defined(NUM_SERVOS)
#if
NUM_SERVOS > 0
void
servo_init
()
{
#if (NUM_SERVOS >= 1) && defined(SERVO0_PIN) && (SERVO0_PIN > -1)
...
...
@@ -601,7 +604,7 @@ void servo_init()
#endif
// Set position of Servo Endstops that are defined
#if
def SERVO_ENDSTOPS
#if
defined(SERVO_ENDSTOPS) && (NUM_SERVOS > 0)
for
(
int8_t
i
=
0
;
i
<
3
;
i
++
)
{
if
(
servo_endstops
[
i
]
>
-
1
)
{
servos
[
servo_endstops
[
i
]].
write
(
servo_endstop_angles
[
i
*
2
+
1
]);
...
...
@@ -678,7 +681,7 @@ void setup()
SET_OUTPUT
(
LASER_TTL_PIN
);
digitalWrite
(
LASER_TTL_PIN
,
LOW
);
#endif
#if
defined(NUM_SERVOS)
#if
NUM_SERVOS > 0
servo_init
();
#endif
...
...
@@ -1201,7 +1204,7 @@ static void clean_up_after_endstop_move() {
static
void
engage_z_probe
()
{
// Engage Z Servo endstop if enabled
#if
def SERVO_ENDSTOPS
#if
defined(SERVO_ENDSTOPS) && (NUM_SERVOS > 0)
if
(
servo_endstops
[
Z_AXIS
]
>
-
1
)
{
#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
servos
[
servo_endstops
[
Z_AXIS
]].
attach
(
0
);
...
...
@@ -1217,7 +1220,7 @@ static void engage_z_probe() {
static
void
retract_z_probe
()
{
// Retract Z Servo endstop if enabled
#if
def SERVO_ENDSTOPS
#if
defined(SERVO_ENDSTOPS) && (NUM_SERVOS > 0)
if
(
servo_endstops
[
Z_AXIS
]
>
-
1
)
{
#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
servos
[
servo_endstops
[
Z_AXIS
]].
attach
(
0
);
...
...
@@ -1279,7 +1282,7 @@ static void homeaxis(int axis) {
#ifndef Z_PROBE_SLED
// Engage Servo endstop if enabled
#if
def SERVO_ENDSTOPS
#if
defined(SERVO_ENDSTOPS) && (NUM_SERVOS > 0)
#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
if
(
axis
==
Z_AXIS
)
{
engage_z_probe
();
...
...
@@ -1313,7 +1316,7 @@ static void homeaxis(int axis) {
axis_known_position
[
axis
]
=
true
;
// Retract Servo endstop if enabled
#if
def SERVO_ENDSTOPS
#if
defined(SERVO_ENDSTOPS) && (NUM_SERVOS > 0)
if
(
servo_endstops
[
axis
]
>
-
1
)
{
servos
[
servo_endstops
[
axis
]].
write
(
servo_endstop_angles
[
axis
*
2
+
1
]);
}
...
...
@@ -4672,7 +4675,7 @@ Sigma_Exit:
}
break
;
#if defined(ENABLE_AUTO_BED_LEVELING) && defined(SERVO_ENDSTOPS) && not defined(Z_PROBE_SLED)
#if defined(ENABLE_AUTO_BED_LEVELING) && defined(SERVO_ENDSTOPS) &&
(NUM_SERVOS > 0) &&
not defined(Z_PROBE_SLED)
case
401
:
{
engage_z_probe
();
// Engage Z Servo endstop if available
...
...
@@ -4918,6 +4921,9 @@ Sigma_Exit:
target
[
E_AXIS
]
+=
(
-
1
)
*
FILAMENTCHANGE_FINALRETRACT
;
#endif
}
#if defined(PAUSE_PIN) && PAUSE_PIN > -1
paused
=
false
;
#endif
current_position
[
E_AXIS
]
=
target
[
E_AXIS
];
//the long retract of L is compensated by manual filament feeding
plan_set_e_position
(
current_position
[
E_AXIS
]);
plan_buffer_line
(
target
[
X_AXIS
],
target
[
Y_AXIS
],
target
[
Z_AXIS
],
target
[
E_AXIS
],
feedrate
/
60
,
active_extruder
,
active_driver
);
//should do nothing
...
...
@@ -5791,7 +5797,7 @@ void manage_inactivity()
#endif
#if defined(PAUSE_PIN) && PAUSE_PIN > -1
if
(
0
==
READ
(
PAUSE_PIN
))
pause
();
if
(
0
==
READ
(
PAUSE_PIN
)
&&
!
paused
)
pause
();
#endif
#if defined(CONTROLLERFAN_PIN) && CONTROLLERFAN_PIN > -1
...
...
@@ -5902,6 +5908,7 @@ void temptone()
#if defined(PAUSE_PIN) && PAUSE_PIN > -1
void
pause
()
{
paused
=
true
;
enquecommand
(
"M600 X0 Z+5"
);
enquecommand
(
"G4 P0"
);
enquecommand
(
"G4 P0"
);
...
...
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