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
a3cde075
Commit
a3cde075
authored
May 13, 2016
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build issue with new LASER_PULSE_METHOD
parent
599c8a93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
laser.cpp
MK/module/laser/laser.cpp
+7
-3
No files found.
MK/module/laser/laser.cpp
View file @
a3cde075
...
...
@@ -27,6 +27,9 @@ laser_t laser;
#if ENABLED(LASER_PULSE_METHOD)
#define pulsebit(x) (1 << x)
#ifndef PE3 // Undef'd in fastio.h.
#define PE3 3
#endif
#endif
void
timer3_init
(
int
pin
)
{
...
...
@@ -217,9 +220,10 @@ void laser_fire(float intensity = 100.0){
// At least some CO2-drivers need it, not sure about laserdiode drivers.
#if(ENABLED(LASER_REMAP_INTENSITY))
#if LASER_REMAP_INTENSITY != 0
#define OldRange (255.0 - 0.0);
#define NewRange (255.0 - LASER_REMAP_INTENSITY);
intensity
=
intensity
*
NewRange
/
OldRange
+
LASER_REMAP_INTENSITY
;
float
OldRange
,
NewRange
;
OldRange
=
(
255.0
-
0.0
);
NewRange
=
(
intensity
-
LASER_REMAP_INTENSITY
);
intensity
=
(
float
)(((((
float
)
intensity
-
0
)
*
NewRange
)
/
OldRange
)
+
LASER_REMAP_INTENSITY
);
#endif
#endif
...
...
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