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
64f46639
Commit
64f46639
authored
8 years ago
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync LASER patch with latest changes and last fixes
parent
3ad54bd4
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
49 additions
and
29 deletions
+49
-29
Configuration_Basic.h
Documentation/Laser/K40_ramps_configs/Configuration_Basic.h
+10
-0
Configuration_Basic.h
MK/Configuration_Basic.h
+10
-0
MK_Main.h
MK/module/MK_Main.h
+1
-1
conditionals.h
MK/module/conditionals.h
+1
-1
language.h
MK/module/language/language.h
+0
-1
ultralcd.cpp
MK/module/lcd/ultralcd.cpp
+5
-5
stepper.cpp
MK/module/motion/stepper.cpp
+8
-8
sanitycheck.h
MK/module/sanitycheck.h
+3
-0
temperature.cpp
MK/module/temperature/temperature.cpp
+11
-13
No files found.
Documentation/Laser/K40_ramps_configs/Configuration_Basic.h
View file @
64f46639
...
...
@@ -113,6 +113,16 @@
//#define PS_DEFAULT_OFF
/*************************************************************************************/
/***********************************************************************
******************************* Cooler ********************************
***********************************************************************
* *
* Uncomment the following line to enable COOLER support *
* *
***********************************************************************/
#define COOLER
/***********************************************************************
************************** Extruders number ***************************
...
...
This diff is collapsed.
Click to expand it.
MK/Configuration_Basic.h
View file @
64f46639
...
...
@@ -113,6 +113,16 @@
//#define PS_DEFAULT_OFF
/*************************************************************************************/
/***********************************************************************
******************************* Cooler ********************************
***********************************************************************
* *
* Uncomment the following line to enable COOLER support *
* *
***********************************************************************/
//#define COOLER
/***********************************************************************
************************** Extruders number ***************************
...
...
This diff is collapsed.
Click to expand it.
MK/module/MK_Main.h
View file @
64f46639
...
...
@@ -116,7 +116,7 @@ inline void refresh_cmd_timeout() { previous_cmd_ms = millis(); }
extern
void
delay_ms
(
millis_t
ms
);
#if ENABLED(FAST_PWM_FAN) || ENABLED(COOLER_PWM)
#if ENABLED(FAST_PWM_FAN) || ENABLED(
FAST_
COOLER_PWM)
void
setPwmFrequency
(
uint8_t
pin
,
int
val
);
#endif
...
...
This diff is collapsed.
Click to expand it.
MK/module/conditionals.h
View file @
64f46639
...
...
@@ -805,7 +805,7 @@
#define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN,v)
#endif
#endif
#if HAS(
HEATER_COOLER
)
#if HAS(
COOLER_DEV
)
#if ENABLED(INVERTED_COOLER_PINS)
#define WRITE_COOLER(v) WRITE(COOLER_PIN,!v)
#else
...
...
This diff is collapsed.
Click to expand it.
MK/module/language/language.h
View file @
64f46639
...
...
@@ -94,7 +94,6 @@
#define SERIAL_INVALID_HOTEND "Invalid hotend"
#define SERIAL_INVALID_SOLENOID "Invalid solenoid"
#define SERIAL_ERR_NO_THERMISTORS "No thermistors - no temperature"
#define SERIAL_COUNT_X " Count X: "
#define SERIAL_ERR_KILLED "Printer halted. kill() called!"
#define SERIAL_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
#define SERIAL_BUSY_PROCESSING "processing"
...
...
This diff is collapsed.
Click to expand it.
MK/module/lcd/ultralcd.cpp
View file @
64f46639
...
...
@@ -757,7 +757,7 @@ MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_multiplier, 10, 999);
// Laser:
//
#if ENABLED(LASER)
MENU_ITEM_EDIT
(
int3
,
MSG_NOZZLE
,
&
target_temperature
[
0
],
0
,
HEATER_0
_MAXTEMP
-
15
);
MENU_ITEM_EDIT
(
int3
,
MSG_NOZZLE
,
&
target_temperature
_cooler
,
0
,
COOLER
_MAXTEMP
-
15
);
#endif
//
...
...
@@ -1774,7 +1774,7 @@ static void lcd_control_volumetric_menu() {
static
void
lcd_laser_menu
()
{
START_MENU
();
MENU_ITEM
(
back
,
MSG_MAIN
,
lcd_main_menu
);
MENU_ITEM
(
back
,
MSG_MAIN
);
MENU_ITEM
(
submenu
,
"Set Focus"
,
lcd_laser_focus_menu
);
MENU_ITEM
(
submenu
,
"Test Fire"
,
lcd_laser_test_fire_menu
);
#ifdef LASER_PERIPHERALS
...
...
@@ -1789,7 +1789,7 @@ static void lcd_laser_menu()
static
void
lcd_laser_test_fire_menu
()
{
START_MENU
();
MENU_ITEM
(
back
,
"Laser Functions"
,
lcd_laser_menu
);
MENU_ITEM
(
back
,
"Laser Functions"
);
MENU_ITEM
(
function
,
" 20% 50ms"
,
action_laser_test_20_50ms
);
MENU_ITEM
(
function
,
" 20% 100ms"
,
action_laser_test_20_100ms
);
MENU_ITEM
(
function
,
"100% 50ms"
,
action_laser_test_100_50ms
);
...
...
@@ -1835,7 +1835,7 @@ static void laser_test_fire(uint8_t power, int dwell) {
float
focalLength
=
0
;
static
void
lcd_laser_focus_menu
()
{
START_MENU
();
MENU_ITEM
(
back
,
"Laser Functions"
,
lcd_laser_menu
);
MENU_ITEM
(
back
,
"Laser Functions"
);
MENU_ITEM
(
function
,
"1mm"
,
action_laser_focus_1mm
);
MENU_ITEM
(
function
,
"2mm"
,
action_laser_focus_2mm
);
MENU_ITEM
(
function
,
"3mm - 1/8in"
,
action_laser_focus_3mm
);
...
...
@@ -1878,7 +1878,7 @@ static void action_laser_focus_7mm() {
laser_set_focus
(
7
);
}
static
void
laser_set_focus
(
float
f_length
)
{
if
(
!
TEST
(
axis_was_homed
,
Z_AXIS
)
)
{
if
(
!
axis_homed
[
Z_AXIS
]
)
{
enqueue_and_echo_commands_P
(
PSTR
(
"G28 Z F150"
));
}
focalLength
=
f_length
;
...
...
This diff is collapsed.
Click to expand it.
MK/module/motion/stepper.cpp
View file @
64f46639
...
...
@@ -69,7 +69,7 @@ static unsigned char last_direction_bits = 0; // The next stepping-bits to be o
static
unsigned
int
cleaning_buffer_counter
=
0
;
#ifdef LASER
static
long
counter_
l
;
static
long
counter_
L
;
#endif // LASER
#ifdef LASER_RASTER
...
...
@@ -447,7 +447,7 @@ ISR(TIMER1_COMPA_vect) {
// Initialize Bresenham counters to 1/2 the ceiling
counter_X
=
counter_Y
=
counter_Z
=
counter_E
=
-
(
current_block
->
step_event_count
>>
1
);
#if ENABLED(LASER)
counter_
l
=
counter_x
;
counter_
L
=
counter_X
;
laser
.
dur
=
current_block
->
laser_duration
;
#endif
...
...
@@ -597,14 +597,14 @@ ISR(TIMER1_COMPA_vect) {
#endif
#if ENABLED(LASER)
counter_
l
+=
current_block
->
steps_l
;
if
(
counter_
l
>
0
)
{
counter_
L
+=
current_block
->
steps_l
;
if
(
counter_
L
>
0
)
{
if
(
current_block
->
laser_mode
==
PULSED
&&
current_block
->
laser_status
==
LASER_ON
)
{
// Pulsed Firing Mode
laser_fire
(
current_block
->
laser_intensity
);
if
(
laser
.
diagnostics
)
{
ECHO_MV
(
"X: "
,
counter_
x
);
ECHO_MV
(
"Y: "
,
counter_
y
);
ECHO_MV
(
"L: "
,
counter_
l
);
ECHO_MV
(
"X: "
,
counter_
X
);
ECHO_MV
(
"Y: "
,
counter_
Y
);
ECHO_MV
(
"L: "
,
counter_
L
);
}
}
#if ENABLED(LASER_RASTER)
...
...
@@ -618,7 +618,7 @@ ISR(TIMER1_COMPA_vect) {
counter_raster
++
;
}
#endif // LASER_RASTER
counter_
l
-=
current_block
->
step_event_count
;
counter_
L
-=
current_block
->
step_event_count
;
}
if
(
current_block
->
laser_duration
!=
0
&&
(
laser
.
last_firing
+
current_block
->
laser_duration
<
micros
()))
{
if
(
laser
.
diagnostics
)
ECHO_LM
(
INFO
,
"Laser firing duration elapsed, in interrupt fast loop"
);
...
...
This diff is collapsed.
Click to expand it.
MK/module/sanitycheck.h
View file @
64f46639
...
...
@@ -155,6 +155,9 @@
#if DISABLED(COOLER_MINTEMP)
#error DEPENDENCY ERROR: Missing setting COOLER_MINTEMP
#endif
#if DISABLED(COOLER)
#error DEPENDENCY ERROR: Cannot enable TEMP_SENSOR_COOLER and not COOLER
#endif
#endif
#if DISABLED(PLA_PREHEAT_HOTEND_TEMP)
#error DEPENDENCY ERROR: Missing setting PLA_PREHEAT_HOTEND_TEMP
...
...
This diff is collapsed.
Click to expand it.
MK/module/temperature/temperature.cpp
View file @
64f46639
...
...
@@ -987,7 +987,7 @@ void manage_temp_controller() {
}
else
{
// NEXTIME XXX here we have to manage hw pwm?
soft_pwm_cooler
=
0
;
WRITE_
HEATER_
COOLER
(
LOW
);
WRITE_COOLER
(
LOW
);
}
#else // COOLER_LIMIT_SWITCHING
// Check if temperature is within the correct range
...
...
@@ -996,7 +996,7 @@ void manage_temp_controller() {
}
else
{
soft_pwm_cooler
=
0
;
WRITE_
HEATER_
COOLER
(
LOW
);
WRITE_COOLER
(
LOW
);
}
#endif
#endif // TEMP_SENSOR_COOLER != 0
...
...
@@ -1276,11 +1276,9 @@ void tp_init() {
SET_OUTPUT
(
HEATER_BED_PIN
);
#endif
#if HAS(COOLER_DEV)
SET_OUTPUT
(
COOLER_PIN
)
#if ENABLED(COOLER_PWM)
SET_OUTPUT
(
COOLER_PIN
)
;
#if ENABLED(
FAST_
COOLER_PWM)
setPwmFrequency
(
COOLER_PIN
,
2
);
// No prescaling. Pwm frequency = F_CPU/256/64
#else
soft_pwm_cooler
=
coolerSpeedSoftPwm
/
2
;
#endif
#endif
#if HAS(FAN)
...
...
@@ -1793,7 +1791,7 @@ ISR(TIMER0_COMPB_vect) {
ISR_STATICS
(
BED
);
#endif
#if HAS(COOLER_DEV)
ISR_STATICS
(
COOLER_DEV
ICE
);
ISR_STATICS
(
COOLER_DEV
);
#endif
#if HAS(FILAMENT_SENSOR)
...
...
@@ -1829,8 +1827,8 @@ ISR(TIMER0_COMPB_vect) {
WRITE_HEATER_BED
(
soft_pwm_BED
>
0
?
1
:
0
);
#endif
#if HAS(COOLER_DEV)
soft_pwm_
COOLER_DEVICE
=
soft_pwm_cooler
;
WRITE_COOLER
(
soft_pwm_
COOLER_DEVICE
>
0
?
1
:
0
);
soft_pwm_
cooler
=
soft_pwm_cooler
;
WRITE_COOLER
(
soft_pwm_
cooler
>
0
?
1
:
0
);
#endif
#if ENABLED(FAN_SOFT_PWM)
soft_pwm_fan
=
fanSpeedSoftPwm
/
2
;
...
...
@@ -1872,7 +1870,7 @@ ISR(TIMER0_COMPB_vect) {
if
(
soft_pwm_BED
<
pwm_count
)
WRITE_HEATER_BED
(
0
);
#endif
#if HAS(COOLER_DEV)
if
(
soft_pwm_
COOLER_DEVICE
<
pwm_count
)
WRITE_COOLER
(
0
);
if
(
soft_pwm_
cooler
<
pwm_count
)
WRITE_COOLER
(
0
);
#endif
#if ENABLED(FAN_SOFT_PWM)
...
...
@@ -1956,7 +1954,7 @@ ISR(TIMER0_COMPB_vect) {
_SLOW_PWM_ROUTINE
(
BED
,
soft_pwm_bed
);
// BED
#endif
#if HAS(COOLER_DEV)
_SLOW_PWM_SOURINT
(
COOLER_DEV
ICE
,
soft_pwm_cooler
);
// COOLER
_SLOW_PWM_SOURINT
(
COOLER_DEV
,
soft_pwm_cooler
);
// COOLER
#endif
}
// slow_pwm_count == 0
...
...
@@ -1975,7 +1973,7 @@ ISR(TIMER0_COMPB_vect) {
PWM_OFF_ROUTINE
(
BED
);
// BED
#endif
#if HAS(COOLER_DEV)
PWM_OFF_ROUTINE
(
COOLER_DEV
ICE
);
// COOLER
PWM_OFF_ROUTINE
(
COOLER_DEV
);
// COOLER
#endif
#if ENABLED(FAN_SOFT_PWM)
...
...
@@ -2047,7 +2045,7 @@ ISR(TIMER0_COMPB_vect) {
if
(
state_timer_heater_BED
>
0
)
state_timer_heater_BED
--
;
#endif
#if HAS(COOLER_DEV)
if
(
state_timer_heater_COOLER_DEV
ICE
>
0
)
state_timer_heater_COOLER_DEVICE
--
;
if
(
state_timer_heater_COOLER_DEV
>
0
)
state_timer_heater_COOLER_DEV
--
;
#endif
}
// (pwm_count % 64) == 0
...
...
This diff is collapsed.
Click to expand it.
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