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
af2199cf
Commit
af2199cf
authored
Apr 03, 2016
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix LCD support, PWM initialization and start WATER COOLING support
parent
2bee6e22
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
27 deletions
+35
-27
Configuration_Feature.h
...mentation/Laser/K40_ramps_configs/Configuration_Feature.h
+1
-1
Configuration_Pins.h
MK/Configuration_Pins.h
+1
-1
MK_Main.cpp
MK/module/MK_Main.cpp
+1
-1
MK_Main.h
MK/module/MK_Main.h
+3
-2
dogm_lcd_implementation.h
MK/module/lcd/dogm_lcd_implementation.h
+2
-2
ultralcd.cpp
MK/module/lcd/ultralcd.cpp
+24
-18
temperature.cpp
MK/module/temperature/temperature.cpp
+3
-2
No files found.
Documentation/Laser/K40_ramps_configs/Configuration_Feature.h
View file @
af2199cf
...
...
@@ -1149,7 +1149,7 @@
// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
//
// REMEMBER TO INSTALL U8glib to your ARDUINO library folder: https://github.com/olikraus/U8glib_Arduino
//
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
// The RepRapWorld REPRAPWORLD_KEYPAD v1.1
// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
...
...
MK/Configuration_Pins.h
View file @
af2199cf
...
...
@@ -122,7 +122,7 @@
#define LASER_PERIPHERALS_STATUS_PIN 4
#endif // LASER_PERIPHERALS
#if ENABLED(LASER_WATER_COOLING)
#define LASER_WATER_COOLING_PIN
1
#define LASER_WATER_COOLING_PIN
2 // Digital pins 2, 3, 5, 6, 7, 8 are attached to timers we can use
#endif // LASER WATER_COOLING
#endif
...
...
MK/module/MK_Main.cpp
View file @
af2199cf
...
...
@@ -8920,7 +8920,7 @@ void kill(const char* lcd_msg) {
}
#endif
#if ENABLED(FAST_PWM_FAN)
#if ENABLED(FAST_PWM_FAN)
|| ENABLED(LASER_WATER_COOLING)
void
setPwmFrequency
(
uint8_t
pin
,
int
val
)
{
val
&=
0x07
;
...
...
MK/module/MK_Main.h
View file @
af2199cf
...
...
@@ -88,8 +88,9 @@ void refresh_cmd_timeout();
extern
void
delay_ms
(
millis_t
ms
);
#if ENABLED(FAST_PWM_FAN)
void
setPwmFrequency
(
uint8_t
pin
,
uint8_t
val
);
#if ENABLED(FAST_PWM_FAN) || ENABLED(LASER_WATER_COOLING)
void
setPwmFrequency
(
uint8_t
pin
,
int
val
);
#endif
extern
float
homing_feedrate
[];
...
...
MK/module/lcd/dogm_lcd_implementation.h
View file @
af2199cf
...
...
@@ -328,7 +328,7 @@ static void lcd_implementation_status_screen() {
u8g
.
drawBitmapP
(
29
,
4
,
LASERENABLE_BYTEWIDTH
,
LASERENABLE_HEIGHT
,
laserenable_bmp
);
}
#endif
u8g
.
setFont
(
FONT_STATUSMENU
);
lcd_
setFont
(
FONT_STATUSMENU
);
u8g
.
setColorIndex
(
1
);
u8g
.
setPrintPos
(
3
,
6
);
if
(
current_block
->
laser_status
==
LASER_ON
)
{
...
...
@@ -400,7 +400,7 @@ static void lcd_implementation_status_screen() {
u8g
.
setPrintPos
(
90
,
47
);
if
(
end_time
>
1380
||
end_time
==
0
)
u8g
.
print
(
'
E
--:--
'
);
lcd_printPGM
(
PSTR
(
"E--:--"
)
);
else
if
(
end_time
>
0
)
{
u8g
.
print
(
'E'
);
u8g
.
print
(
itostr2
(
end_time
/
60
));
...
...
MK/module/lcd/ultralcd.cpp
View file @
af2199cf
...
...
@@ -52,7 +52,7 @@ char lcd_status_message[3 * LCD_WIDTH + 1] = WELCOME_MSG; // worst case is kana
static
void
lcd_laser_focus_menu
();
static
void
lcd_laser_menu
();
static
void
lcd_laser_test_fire_menu
();
static
void
laser_test_fire
(
uint8_t
power
,
uint8_
t
dwell
);
static
void
laser_test_fire
(
uint8_t
power
,
in
t
dwell
);
static
void
laser_set_focus
(
float
f_length
);
static
void
action_laser_focus_custom
();
static
void
action_laser_focus_1mm
();
...
...
@@ -87,12 +87,16 @@ static void lcd_status_screen();
static
void
lcd_move_menu
();
static
void
lcd_control_menu
();
static
void
lcd_stats_menu
();
static
void
lcd_control_temperature_menu
();
static
void
lcd_control_temperature_preheat_pla_settings_menu
();
static
void
lcd_control_temperature_preheat_abs_settings_menu
();
static
void
lcd_control_temperature_preheat_gum_settings_menu
();
#if DISABLED(LASER)
static
void
lcd_control_temperature_menu
();
static
void
lcd_control_temperature_preheat_pla_settings_menu
();
static
void
lcd_control_temperature_preheat_abs_settings_menu
();
static
void
lcd_control_temperature_preheat_gum_settings_menu
();
#endif
static
void
lcd_control_motion_menu
();
static
void
lcd_control_volumetric_menu
();
#if DISABLED(LASER)
static
void
lcd_control_volumetric_menu
();
#endif
#if HAS(LCD_CONTRAST)
static
void
lcd_set_contrast
();
#endif
...
...
@@ -1135,12 +1139,12 @@ static void lcd_move_menu() {
static
void
lcd_control_menu
()
{
START_MENU
(
lcd_main_menu
);
MENU_ITEM
(
back
,
MSG_MAIN
,
lcd_main_menu
);
MENU_ITEM
(
submenu
,
MSG_TEMPERATURE
,
lcd_control_temperature_menu
);
#if ENABLED(LASER)
#if DISABLED(LASER)
MENU_ITEM
(
submenu
,
MSG_TEMPERATURE
,
lcd_control_temperature_menu
);
#else
MENU_ITEM
(
submenu
,
MSG_MOTION
,
lcd_control_motion_menu
);
MENU_ITEM
(
submenu
,
MSG_FILAMENT
,
lcd_control_volumetric_menu
);
#endif
MENU_ITEM
(
submenu
,
MSG_MOTION
,
lcd_control_motion_menu
);
#if DISABLED(LASER)
MENU_ITEM
(
submenu
,
MSG_FILAMENT
,
lcd_control_volumetric_menu
);
#endif
#if HAS(LCD_CONTRAST)
...
...
@@ -1326,6 +1330,7 @@ static void lcd_control_temperature_menu() {
MENU_ITEM_EDIT
(
bool
,
MSG_IDLEOOZING
,
&
IDLE_OOZING_enabled
);
#endif
#if DISABLED(LASER)
//
// Preheat PLA conf
//
...
...
@@ -1340,6 +1345,7 @@ static void lcd_control_temperature_menu() {
// Preheat GUM conf
//
MENU_ITEM
(
submenu
,
MSG_PREHEAT_GUM_SETTINGS
,
lcd_control_temperature_preheat_gum_settings_menu
);
#endif
END_MENU
();
}
#endif
...
...
@@ -1593,11 +1599,11 @@ static void lcd_laser_test_fire_menu() {
static
void
action_laser_acc_on
()
{
enque
command
_P
(
PSTR
(
"M80"
));
enque
uecommands
_P
(
PSTR
(
"M80"
));
}
static
void
action_laser_acc_off
()
{
enque
command
_P
(
PSTR
(
"M81"
));
enque
uecommands
_P
(
PSTR
(
"M81"
));
}
static
void
action_laser_test_20_50ms
()
{
laser_test_fire
(
20
,
50
);
...
...
@@ -1619,8 +1625,8 @@ static void action_laser_test_warm() {
laser_test_fire
(
15
,
2000
);
}
static
void
laser_test_fire
(
uint8_t
power
,
uint8_
t
dwell
)
{
enque
command
_P
(
PSTR
(
"M80"
));
// Enable laser accessories since we don't know if its been done (and there's no penalty for doing it again).
static
void
laser_test_fire
(
uint8_t
power
,
in
t
dwell
)
{
enque
uecommands
_P
(
PSTR
(
"M80"
));
// Enable laser accessories since we don't know if its been done (and there's no penalty for doing it again).
laser_fire
(
power
);
delay
(
dwell
);
laser_extinguish
();
...
...
@@ -1671,15 +1677,15 @@ static void action_laser_focus_7mm() {
laser_set_focus
(
7
);
}
static
void
laser_set_focus
(
float
f_length
)
{
if
(
!
has_axis_homed
[
Z_AXIS
]
)
{
enque
command
_P
(
PSTR
(
"G28 Z F150"
));
if
(
!
TEST
(
axis_was_homed
,
Z_AXIS
)
)
{
enque
uecommands
_P
(
PSTR
(
"G28 Z F150"
));
}
focalLength
=
f_length
;
float
focus
=
LASER_FOCAL_HEIGHT
-
f_length
;
char
cmd
[
20
];
sprintf_P
(
cmd
,
PSTR
(
"G0 Z%s F150"
),
ftostr52
(
focus
));
enque
command
(
cmd
);
enque
uecommands_P
(
cmd
);
}
#endif // LASER
...
...
MK/module/temperature/temperature.cpp
View file @
af2199cf
...
...
@@ -992,8 +992,9 @@ void tp_init() {
#if ENABLED(LASER_WATER_COOLING)
SET_OUTPUT
(
LASER_WATER_COOLING_PIN
);
setPwmFrequency
(
LASER_WATER_COOLING_PIN
,
1
);
analogWrite
(
LASER_WATER_COOLING_PIN
,
128
);
setPwmFrequency
(
LASER_WATER_COOLING_PIN
,
2
);
// No prescaling. Pwm frequency = F_CPU/256/64
digitalWrite
(
LASER_WATER_COOLING_PIN
,
50
);
analogWrite
(
LASER_WATER_COOLING_PIN
,
50
);
#endif
#if ENABLED(HEATER_0_USES_MAX6675)
...
...
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