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
b422e564
Commit
b422e564
authored
May 13, 2016
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Raster is now tested and working great
parent
6ecfabca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
laser.cpp
MK/module/laser/laser.cpp
+2
-1
planner.cpp
MK/module/motion/planner.cpp
+15
-1
sanitycheck.h
MK/module/sanitycheck.h
+3
-0
No files found.
MK/module/laser/laser.cpp
View file @
b422e564
...
...
@@ -218,7 +218,8 @@ void laser_fire(float intensity = 100.0){
// In the case that the laserdriver need at least a certain level "LASER_REMAP_INTENSITY"
// to give anything, the intensity can be remapped to start at "LASER_REMAP_INTENSITY"
// At least some CO2-drivers need it, not sure about laserdiode drivers.
#if(ENABLED(LASER_REMAP_INTENSITY))
#if(ENABLED(LASER_REMAP_INTENSITY) && ENABLED(LASER_PULSE_METHOD))
#if LASER_REMAP_INTENSITY != 0
float
OldRange
,
NewRange
;
OldRange
=
(
255.0
-
0.0
);
...
...
MK/module/motion/planner.cpp
View file @
b422e564
...
...
@@ -899,7 +899,21 @@ float junction_deviation = 0.1;
block
->
steps_l
=
labs
(
block
->
millimeters
*
laser
.
ppm
);
if
(
laser
.
mode
==
RASTER
)
{
for
(
int
i
=
0
;
i
<
LASER_MAX_RASTER_LINE
;
i
++
)
{
block
->
laser_raster_data
[
i
]
=
laser
.
raster_data
[
i
];
#if (!ENABLED(LASER_PULSE_METHOD))
float
OldRange
,
NewRange
;
float
NewValue
;
OldRange
=
(
255.0
-
0.0
);
NewRange
=
(
laser
.
rasterlaserpower
-
LASER_REMAP_INTENSITY
);
NewValue
=
(
float
)(((((
float
)
laser
.
raster_data
[
i
]
-
0
)
*
NewRange
)
/
OldRange
)
+
LASER_REMAP_INTENSITY
);
//If less than 7%, turn off the laser tube.
if
(
NewValue
==
LASER_REMAP_INTENSITY
)
NewValue
=
0
;
block
->
laser_raster_data
[
i
]
=
NewValue
;
#else
block
->
laser_raster_data
[
i
]
=
laser
.
raster_data
[
i
];
#endif
}
}
}
else
{
...
...
MK/module/sanitycheck.h
View file @
b422e564
...
...
@@ -1829,6 +1829,9 @@
#endif
#if ENABLED(LASER)
#if (!ENABLED(LASER_REMAP_INTENSITY) && ENABLED(LASER_RASTER))
#error DEPENDENCY ERROR: You have to set LASER_REMAP_INTENSITY with LASER_RASTER enabled
#endif
#if (!ENABLED(LASER_CONTROL) || ((LASER_CONTROL > 0) && (LASER_CONTROL < 2)))
#error DEPENDENCY ERROR: You have to set LASER_CONTROL to 1 or 2
#else
...
...
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