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
a6d73381
Commit
a6d73381
authored
Mar 23, 2016
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Color Mixing
parent
0dc36322
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
planner.cpp
MK/module/motion/planner.cpp
+1
-1
stepper.cpp
MK/module/motion/stepper.cpp
+3
-3
No files found.
MK/module/motion/planner.cpp
View file @
a6d73381
...
...
@@ -614,7 +614,7 @@ float junction_deviation = 0.1;
// For a mixing extruder, get steps for each
#if ENABLED(COLOR_MIXING_EXTRUDER)
for
(
uint8_t
i
=
0
;
i
<
DRIVER_EXTRUDERS
;
i
++
)
block
->
mix_event_count
[
i
]
=
(
mixing_factor
[
i
]
<
0.0001
)
?
9999999999999999
:
block
->
step_event_count
/
mixing_factor
[
i
];
block
->
mix_event_count
[
i
]
=
block
->
steps
[
E_AXIS
]
*
mixing_factor
[
i
];
#endif
// Add update block variables for LASER BEAM control
...
...
MK/module/motion/stepper.cpp
View file @
a6d73381
...
...
@@ -655,7 +655,7 @@ ISR(TIMER1_COMPA_vect) {
#if ENABLED(COLOR_MIXING_EXTRUDER)
for
(
uint8_t
i
=
0
;
i
<
DRIVER_EXTRUDERS
;
i
++
)
counter_m
[
i
]
=
-
(
current_block
->
mix_event_count
[
i
]
>>
1
)
;
counter_m
[
i
]
=
new_count
;
#endif
step_events_completed
=
0
;
...
...
@@ -724,7 +724,7 @@ ISR(TIMER1_COMPA_vect) {
#if ENABLED(COLOR_MIXING_EXTRUDER)
counter_e
+=
current_block
->
steps
[
E_AXIS
];
for
(
uint8_t
j
=
0
;
j
<
DRIVER_EXTRUDERS
;
j
++
)
{
counter_m
[
j
]
+=
current_block
->
steps
[
E_AXIS
];
counter_m
[
j
]
+=
current_block
->
mix_event_count
[
j
];
if
(
counter_m
[
j
]
>
0
)
En_STEP_WRITE
(
j
,
!
INVERT_E_STEP_PIN
);
}
#else
...
...
@@ -755,7 +755,7 @@ ISR(TIMER1_COMPA_vect) {
}
for
(
uint8_t
j
=
0
;
j
<
DRIVER_EXTRUDERS
;
j
++
)
{
if
(
counter_m
[
j
]
>
0
)
{
counter_m
[
j
]
-=
current_block
->
mix_event_count
[
j
]
;
counter_m
[
j
]
-=
current_block
->
step_event_count
;
En_STEP_WRITE
(
j
,
INVERT_E_STEP_PIN
);
}
}
...
...
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