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
39da0e9f
Commit
39da0e9f
authored
Nov 05, 2014
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tone temperature and fix delta bed probe
parent
20661668
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
120 additions
and
63 deletions
+120
-63
Configuration_Delta.h
MarlinKimbra/Configuration_Delta.h
+4
-4
Marlin.h
MarlinKimbra/Marlin.h
+1
-0
Marlin_main.cpp
MarlinKimbra/Marlin_main.cpp
+115
-59
No files found.
MarlinKimbra/Configuration_Delta.h
View file @
39da0e9f
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
#define Z_PROBE_DEPLOY_END_LOCATION {0, 0, 30, 0} // X, Y, Z, E end location for z-probe deployment sequence
#define Z_PROBE_DEPLOY_END_LOCATION {0, 0, 30, 0} // X, Y, Z, E end location for z-probe deployment sequence
#define Z_PROBE_RETRACT_START_LOCATION {0, 0, 30, 0} // X, Y, Z, E start location for z-probe retract sequence
#define Z_PROBE_RETRACT_START_LOCATION {0, 0, 30, 0} // X, Y, Z, E start location for z-probe retract sequence
#define Z_PROBE_RETRACT_END_LOCATION {0, 0, 30, 0} // X, Y, Z, E end location for z-probe retract sequence
#define Z_PROBE_RETRACT_END_LOCATION {0, 0, 30, 0} // X, Y, Z, E end location for z-probe retract sequence
#define AUTOLEVEL_GRID
3
0 // Distance between autolevel Z probing points, should be less than print surface radius/3.
#define AUTOLEVEL_GRID
2
0 // Distance between autolevel Z probing points, should be less than print surface radius/3.
//===========================================================================
//===========================================================================
//=============================Mechanical Settings===========================
//=============================Mechanical Settings===========================
...
@@ -123,7 +123,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
...
@@ -123,7 +123,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
//Manual homing switch locations:
//Manual homing switch locations:
#define MANUAL_X_HOME_POS 0
#define MANUAL_X_HOME_POS 0
#define MANUAL_Y_HOME_POS 0
#define MANUAL_Y_HOME_POS 0
#define MANUAL_Z_HOME_POS 2
02
// Distance between nozzle and print surface after homing.
#define MANUAL_Z_HOME_POS 2
10
// Distance between nozzle and print surface after homing.
//// MOVEMENT SETTINGS
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
...
@@ -134,10 +134,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
...
@@ -134,10 +134,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,80,451,451,451,451} // X, Y, Z, E0, E1, E2, E3
#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,80,451,451,451,451} // X, Y, Z, E0, E1, E2, E3
#define DEFAULT_MAX_FEEDRATE {300,300,300,45,45,45,45} // X, Y, Z, E0, E1, E2, E3 (mm/sec)
#define DEFAULT_MAX_FEEDRATE {300,300,300,45,45,45,45} // X, Y, Z, E0, E1, E2, E3 (mm/sec)
#define DEFAULT_RETRACTION_MAX_FEEDRATE {80,80,80,80} // E0, E1, E2, E3 (mm/sec)
#define DEFAULT_RETRACTION_MAX_FEEDRATE {80,80,80,80} // E0, E1, E2, E3 (mm/sec)
#define DEFAULT_MAX_ACCELERATION {2000,2000,2000,
2
000} // X, Y, Z, E maximum start speed for accelerated moves.
#define DEFAULT_MAX_ACCELERATION {2000,2000,2000,
1
000} // X, Y, Z, E maximum start speed for accelerated moves.
#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION
40
00 // X, Y, Z and E max acceleration in mm/s^2 for retracts
#define DEFAULT_RETRACT_ACCELERATION
25
00 // X, Y, Z and E max acceleration in mm/s^2 for retracts
// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
#define DEFAULT_XYJERK 20.0 // (mm/sec)
#define DEFAULT_XYJERK 20.0 // (mm/sec)
...
...
MarlinKimbra/Marlin.h
View file @
39da0e9f
...
@@ -211,6 +211,7 @@ void prepare_move();
...
@@ -211,6 +211,7 @@ void prepare_move();
void
kill
();
void
kill
();
void
pause
();
void
pause
();
void
Stop
();
void
Stop
();
void
temptone
();
bool
IsStopped
();
bool
IsStopped
();
...
...
MarlinKimbra/Marlin_main.cpp
View file @
39da0e9f
...
@@ -435,6 +435,8 @@ unsigned long starttime=0;
...
@@ -435,6 +435,8 @@ unsigned long starttime=0;
unsigned
long
stoptime
=
0
;
unsigned
long
stoptime
=
0
;
static
uint8_t
tmp_extruder
;
static
uint8_t
tmp_extruder
;
static
boolean
beeptemphe
=
false
;
static
boolean
beeptemphb
=
false
;
#ifdef NPR2
#ifdef NPR2
static
float
color_position
[]
=
COLOR_STEP
;
//variabile per la scelta del colore
static
float
color_position
[]
=
COLOR_STEP
;
//variabile per la scelta del colore
...
@@ -1479,7 +1481,7 @@ float z_probe() {
...
@@ -1479,7 +1481,7 @@ float z_probe() {
}
}
feedrate
=
homing_feedrate
[
Z_AXIS
];
feedrate
=
homing_feedrate
[
Z_AXIS
];
destination
[
Z_AXIS
]
=
mm
+
3
;
destination
[
Z_AXIS
]
=
mm
+
2
;
prepare_move_raw
();
prepare_move_raw
();
return
mm
;
return
mm
;
}
}
...
@@ -1493,8 +1495,11 @@ void calibrate_print_surface(float z_offset) {
...
@@ -1493,8 +1495,11 @@ void calibrate_print_surface(float z_offset) {
for
(
int
x
=
-
3
*
dir
;
x
!=
4
*
dir
;
x
+=
dir
)
{
for
(
int
x
=
-
3
*
dir
;
x
!=
4
*
dir
;
x
+=
dir
)
{
if
(
x
*
x
+
y
*
y
<
11
)
{
if
(
x
*
x
+
y
*
y
<
11
)
{
destination
[
X_AXIS
]
=
AUTOLEVEL_GRID
*
x
-
z_probe_offset
[
X_AXIS
];
destination
[
X_AXIS
]
=
AUTOLEVEL_GRID
*
x
-
z_probe_offset
[
X_AXIS
];
if
(
destination
[
X_AXIS
]
<
X_MIN_POS
)
destination
[
X_AXIS
]
=
X_MIN_POS
;
if
(
destination
[
X_AXIS
]
>
X_MAX_POS
)
destination
[
X_AXIS
]
=
X_MAX_POS
;
destination
[
Y_AXIS
]
=
AUTOLEVEL_GRID
*
y
-
z_probe_offset
[
Y_AXIS
];
destination
[
Y_AXIS
]
=
AUTOLEVEL_GRID
*
y
-
z_probe_offset
[
Y_AXIS
];
if
(
destination
[
Y_AXIS
]
<
Y_MIN_POS
)
destination
[
Y_AXIS
]
=
Y_MIN_POS
;
if
(
destination
[
Y_AXIS
]
>
Y_MAX_POS
)
destination
[
Y_AXIS
]
=
Y_MAX_POS
;
probe_count
=
0
;
probe_count
=
0
;
probe_z
=
-
100
;
probe_z
=
-
100
;
probe_h
=
-
100
;
probe_h
=
-
100
;
...
@@ -1508,50 +1513,54 @@ void calibrate_print_surface(float z_offset) {
...
@@ -1508,50 +1513,54 @@ void calibrate_print_surface(float z_offset) {
}
while
((
probe_z
!=
probe_bed_z
)
and
(
probe_count
<
21
));
}
while
((
probe_z
!=
probe_bed_z
)
and
(
probe_count
<
21
));
bed_level
[
x
+
3
][
3
-
y
]
=
probe_bed_z
;
bed_level
[
x
+
3
][
3
-
y
]
=
probe_bed_z
;
}
else
{
}
else
{
bed_level
[
x
+
3
][
3
-
y
]
=
0.0
;
bed_level
[
x
+
3
][
3
-
y
]
=
0.0
;
}
}
// For unprobed positions just copy nearest neighbor.
if
(
abs
(
y
)
>=
3
)
{
bed_level
[
1
][
3
-
y
]
=
bed_level
[
2
][
3
-
y
];
bed_level
[
5
][
3
-
y
]
=
bed_level
[
4
][
3
-
y
];
}
if
(
abs
(
y
)
>=
2
)
{
bed_level
[
0
][
3
-
y
]
=
bed_level
[
1
][
3
-
y
];
bed_level
[
6
][
3
-
y
]
=
bed_level
[
5
][
3
-
y
];
}
// Print calibration results for manual frame adjustment.
for
(
int
x
=
-
3
;
x
<=
3
;
x
++
)
{
SERIAL_PROTOCOL_F
(
bed_level
[
x
+
3
][
3
-
y
],
3
);
SERIAL_PROTOCOLPGM
(
" "
);
}
}
SERIAL_ECHOLN
(
""
);
}
}
// For unprobed positions just copy nearest neighbor.
if
(
abs
(
y
)
>=
3
)
{
bed_level
[
1
][
3
-
y
]
=
bed_level
[
2
][
3
-
y
];
bed_level
[
5
][
3
-
y
]
=
bed_level
[
4
][
3
-
y
];
}
if
(
abs
(
y
)
>=
2
)
{
bed_level
[
0
][
3
-
y
]
=
bed_level
[
1
][
3
-
y
];
bed_level
[
6
][
3
-
y
]
=
bed_level
[
5
][
3
-
y
];
}
// Print calibration results for manual frame adjustment.
for
(
int
x
=
-
3
;
x
<=
3
;
x
++
)
{
SERIAL_PROTOCOL_F
(
bed_level
[
x
+
3
][
3
-
y
],
3
);
SERIAL_PROTOCOLPGM
(
" "
);
}
SERIAL_ECHOLN
(
""
);
}
}
}
float
probe_bed
(
float
x
,
float
y
)
{
float
probe_bed
(
float
x
,
float
y
)
{
//Probe bed at specified location and return z height of bed
//Probe bed at specified location and return z height of bed
float
probe_bed_z
,
probe_z
,
probe_h
,
probe_l
;
float
probe_bed_z
,
probe_z
,
probe_h
,
probe_l
;
int
probe_count
;
int
probe_count
;
// feedrate = homing_feedrate[Z_AXIS];
// feedrate = homing_feedrate[Z_AXIS];
destination
[
X_AXIS
]
=
x
-
z_probe_offset
[
X_AXIS
];
destination
[
X_AXIS
]
=
x
-
z_probe_offset
[
X_AXIS
];
destination
[
Y_AXIS
]
=
y
-
z_probe_offset
[
Y_AXIS
];
if
(
destination
[
X_AXIS
]
<
X_MIN_POS
)
destination
[
X_AXIS
]
=
X_MIN_POS
;
destination
[
Z_AXIS
]
=
bed_level_c
-
z_probe_offset
[
Z_AXIS
]
+
3
;
if
(
destination
[
X_AXIS
]
>
X_MAX_POS
)
destination
[
X_AXIS
]
=
X_MAX_POS
;
prepare_move
();
destination
[
Y_AXIS
]
=
y
-
z_probe_offset
[
Y_AXIS
];
st_synchronize
();
if
(
destination
[
Y_AXIS
]
<
Y_MIN_POS
)
destination
[
Y_AXIS
]
=
Y_MIN_POS
;
if
(
destination
[
Y_AXIS
]
>
Y_MAX_POS
)
destination
[
Y_AXIS
]
=
Y_MAX_POS
;
destination
[
Z_AXIS
]
=
bed_level_c
-
z_probe_offset
[
Z_AXIS
]
+
3
;
prepare_move
();
st_synchronize
();
probe_count
=
0
;
probe_count
=
0
;
probe_z
=
-
100
;
probe_z
=
-
100
;
probe_h
=
-
100
;
probe_h
=
-
100
;
probe_l
=
100
;
probe_l
=
100
;
do
{
do
{
probe_bed_z
=
probe_z
;
probe_bed_z
=
probe_z
;
probe_z
=
z_probe
()
+
z_probe_offset
[
Z_AXIS
];
probe_z
=
z_probe
()
+
z_probe_offset
[
Z_AXIS
];
if
(
probe_z
>
probe_h
)
probe_h
=
probe_z
;
if
(
probe_z
>
probe_h
)
probe_h
=
probe_z
;
if
(
probe_z
<
probe_l
)
probe_l
=
probe_z
;
if
(
probe_z
<
probe_l
)
probe_l
=
probe_z
;
probe_count
++
;
probe_count
++
;
//SERIAL_PROTOCOL_F(probe_z,3); // see the individual probes per site
//SERIAL_PROTOCOL_F(probe_z,3); // see the individual probes per site
//SERIAL_ECHO(" ");
//SERIAL_ECHO(" ");
}
while
((
probe_z
!=
probe_bed_z
)
and
(
probe_count
<
21
));
}
while
((
probe_z
!=
probe_bed_z
)
and
(
probe_count
<
21
));
/*
/*
...
@@ -3410,6 +3419,7 @@ Sigma_Exit:
...
@@ -3410,6 +3419,7 @@ Sigma_Exit:
setTargetHotend1
(
code_value
()
==
0.0
?
0.0
:
code_value
()
+
duplicate_extruder_temp_offset
);
setTargetHotend1
(
code_value
()
==
0.0
?
0.0
:
code_value
()
+
duplicate_extruder_temp_offset
);
#endif
#endif
setWatch
();
setWatch
();
beeptemphe
=
true
;
break
;
break
;
case
111
:
// M111 - Debug mode
case
111
:
// M111 - Debug mode
if
(
code_seen
(
'S'
))
debugLevel
=
code_value
();
if
(
code_seen
(
'S'
))
debugLevel
=
code_value
();
...
@@ -3427,6 +3437,7 @@ Sigma_Exit:
...
@@ -3427,6 +3437,7 @@ Sigma_Exit:
case
140
:
// M140 set bed temp
case
140
:
// M140 set bed temp
if
(
debugDryrun
())
break
;
if
(
debugDryrun
())
break
;
if
(
code_seen
(
'S'
))
setTargetBed
(
code_value
());
if
(
code_seen
(
'S'
))
setTargetBed
(
code_value
());
beeptemphb
=
true
;
break
;
break
;
case
105
:
// M105
case
105
:
// M105
if
(
setTargetedHotend
(
105
))
break
;
if
(
setTargetedHotend
(
105
))
break
;
...
@@ -5608,6 +5619,10 @@ void manage_inactivity()
...
@@ -5608,6 +5619,10 @@ void manage_inactivity()
}
}
}
}
#if (LARGE_FLASH == true && ( BEEPER > 0 || defined(ULTRALCD) || defined(LCD_USE_I2C_BUZZER)))
temptone
();
#endif
#ifdef CHDK //Check if pin should be set to LOW after M240 set it to HIGH
#ifdef CHDK //Check if pin should be set to LOW after M240 set it to HIGH
if
(
chdkActive
&&
(
millis
()
-
chdkHigh
>
CHDK_DELAY
))
if
(
chdkActive
&&
(
millis
()
-
chdkHigh
>
CHDK_DELAY
))
{
{
...
@@ -5621,14 +5636,10 @@ void manage_inactivity()
...
@@ -5621,14 +5636,10 @@ void manage_inactivity()
kill
();
kill
();
#endif
#endif
/**********************************************************************\
****************** Firmware Marlin by MagoKimbra **********************\
***********************************************************************/
#if defined(PAUSE_PIN) && PAUSE_PIN > -1
#if defined(PAUSE_PIN) && PAUSE_PIN > -1
if
(
0
==
READ
(
PAUSE_PIN
)
)
if
(
0
==
READ
(
PAUSE_PIN
)
)
pause
();
pause
();
#endif
#endif
/**********************************************************************/
#if defined(CONTROLLERFAN_PIN) && CONTROLLERFAN_PIN > -1
#if defined(CONTROLLERFAN_PIN) && CONTROLLERFAN_PIN > -1
controllerFan
();
//Check if fan should be turned on to cool stepper drivers down
controllerFan
();
//Check if fan should be turned on to cool stepper drivers down
...
@@ -5668,13 +5679,13 @@ void manage_inactivity()
...
@@ -5668,13 +5679,13 @@ void manage_inactivity()
check_axes_activity
();
check_axes_activity
();
}
}
void
kill
()
{
void
kill
()
#if defined(KILL_PIN) && KILL_PIN > -1
{
cli
();
// Stop interrupts
#if defined(KILL_PIN) && KILL_PIN > -1
disable_heater
();
cli
();
// Stop interrupts
disable_heater
();
disable_x
();
disable_x
();
disable_y
();
disable_y
();
disable_z
();
disable_z
();
disable_e0
();
disable_e0
();
disable_e1
();
disable_e1
();
...
@@ -5692,15 +5703,60 @@ void kill() {
...
@@ -5692,15 +5703,60 @@ void kill() {
#endif
#endif
}
}
#if (LARGE_FLASH == true && ( BEEPER > 0 || defined(ULTRALCD) || defined(LCD_USE_I2C_BUZZER)))
void
temptone
()
{
if
(
!
isHeatingHotend
(
active_extruder
)
&&
degTargetHotend
(
active_extruder
)
!=
0
&&
beeptemphe
)
{
int
beepS
=
200
;
int
beepP
=
500
;
int
beepN
=
3
;
for
(
int
i
=
0
;
i
<
beepN
;
++
i
)
{
#if BEEPER > 0
tone
(
BEEPER
,
beepS
);
delay
(
beepP
);
noTone
(
BEEPER
);
#elif defined(ULTRALCD)
lcd_buzz
(
beepS
,
beepP
);
#elif defined(LCD_USE_I2C_BUZZER)
lcd_buzz
(
beepP
,
beepS
);
#endif
delay
(
beepP
);
}
beeptemphe
=
false
;
}
else
if
(
!
isHeatingBed
()
&&
degTargetBed
()
!=
0
&&
beeptemphb
)
{
int
beepS
=
100
;
int
beepP
=
500
;
int
beepN
=
2
;
for
(
int
i
=
0
;
i
<
beepN
;
++
i
)
{
#if BEEPER > 0
tone
(
BEEPER
,
beepS
);
delay
(
beepP
);
noTone
(
BEEPER
);
#elif defined(ULTRALCD)
lcd_buzz
(
beepS
,
beepP
);
#elif defined(LCD_USE_I2C_BUZZER)
lcd_buzz
(
beepP
,
beepS
);
#endif
delay
(
beepP
);
}
beeptemphb
=
false
;
}
}
#endif
#if defined(PAUSE_PIN) && PAUSE_PIN > -1
#if defined(PAUSE_PIN) && PAUSE_PIN > -1
void
pause
()
void
pause
()
{
{
enquecommand
(
"M600 X0 Z+5"
);
enquecommand
(
"M600 X0 Z+5"
);
enquecommand
(
"G4 P0"
);
enquecommand
(
"G4 P0"
);
enquecommand
(
"G4 P0"
);
enquecommand
(
"G4 P0"
);
enquecommand
(
"G4 P0"
);
enquecommand
(
"G4 P0"
);
}
}
#endif
#endif
void
Stop
()
void
Stop
()
...
...
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