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
dbf13a8b
Commit
dbf13a8b
authored
May 09, 2015
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dix stepper
parent
e9d95297
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
17 deletions
+16
-17
stepper.cpp
MarlinKimbra/stepper.cpp
+16
-17
No files found.
MarlinKimbra/stepper.cpp
View file @
dbf13a8b
...
@@ -726,29 +726,29 @@ ISR(TIMER1_COMPA_vect) {
...
@@ -726,29 +726,29 @@ ISR(TIMER1_COMPA_vect) {
#define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP
#define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP
#define _INVERT_STEP_PIN(AXIS) INVERT_## AXIS ##_STEP_PIN
#define _INVERT_STEP_PIN(AXIS) INVERT_## AXIS ##_STEP_PIN
#define STEP_
START
(axis, AXIS) \
#define STEP_
ADD
(axis, AXIS) \
_COUNTER(axis) += current_block->steps[_AXIS(AXIS)]; \
_COUNTER(axis) += current_block->steps[_AXIS(AXIS)]; \
if (_COUNTER(axis) > 0) { \
if (_COUNTER(axis) > 0) { _APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS),0); }
_APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS),0); \
_COUNTER(axis) -= current_block->step_event_count; \
count_position[_AXIS(AXIS)] += count_direction[_AXIS(AXIS)]; }
STEP_
START
(
x
,
X
);
STEP_
ADD
(
x
,
X
);
STEP_
START
(
y
,
Y
);
STEP_
ADD
(
y
,
Y
);
STEP_
START
(
z
,
Z
);
STEP_
ADD
(
z
,
Z
);
#ifndef ADVANCE
#ifndef ADVANCE
STEP_
START
(
e
,
E
);
STEP_
ADD
(
e
,
E
);
#endif
#endif
delayMicroseconds
(
1
);
#define STEP_IF_COUNTER(axis, AXIS) \
if (_COUNTER(axis) > 0) { \
#define STEP_END(axis, AXIS) _APPLY_STEP(AXIS)(_INVERT_STEP_PIN(AXIS),0)
_COUNTER(axis) -= current_block->step_event_count; \
count_position[_AXIS(AXIS)] += count_direction[_AXIS(AXIS)]; \
_APPLY_STEP(AXIS)(_INVERT_STEP_PIN(AXIS),0); \
}
STEP_
END
(
x
,
X
);
STEP_
IF_COUNTER
(
x
,
X
);
STEP_
END
(
y
,
Y
);
STEP_
IF_COUNTER
(
y
,
Y
);
STEP_
END
(
z
,
Z
);
STEP_
IF_COUNTER
(
z
,
Z
);
#ifndef ADVANCE
#ifndef ADVANCE
STEP_
END
(
e
,
E
);
STEP_
IF_COUNTER
(
e
,
E
);
#endif
#endif
step_events_completed
++
;
step_events_completed
++
;
...
@@ -782,7 +782,6 @@ ISR(TIMER1_COMPA_vect) {
...
@@ -782,7 +782,6 @@ ISR(TIMER1_COMPA_vect) {
#endif
#endif
}
}
else
if
(
step_events_completed
>
(
unsigned
long
)
current_block
->
decelerate_after
)
{
else
if
(
step_events_completed
>
(
unsigned
long
)
current_block
->
decelerate_after
)
{
MultiU24X32toH16
(
step_rate
,
deceleration_time
,
current_block
->
acceleration_rate
);
MultiU24X32toH16
(
step_rate
,
deceleration_time
,
current_block
->
acceleration_rate
);
if
(
step_rate
>
acc_step_rate
)
{
// Check step_rate stays positive
if
(
step_rate
>
acc_step_rate
)
{
// Check step_rate stays positive
...
...
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