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
c7b6c897
Commit
c7b6c897
authored
May 11, 2016
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fixes
parent
d7499136
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
temperature.cpp
MK/module/temperature/temperature.cpp
+9
-9
No files found.
MK/module/temperature/temperature.cpp
View file @
c7b6c897
...
@@ -313,7 +313,7 @@ void autotempShutdown() {
...
@@ -313,7 +313,7 @@ void autotempShutdown() {
if
(
temp_controller
==
-
1
)
{
if
(
temp_controller
==
-
1
)
{
ECHO_SM
(
DB
,
"BED"
);
ECHO_SM
(
DB
,
"BED"
);
}
}
else
if
(
hotend
<
-
1
)
{
else
if
(
temp_controller
<
-
1
)
{
ECHO_SM
(
DB
,
"COOLER"
);
ECHO_SM
(
DB
,
"COOLER"
);
}
}
else
{
else
{
...
@@ -359,7 +359,7 @@ void autotempShutdown() {
...
@@ -359,7 +359,7 @@ void autotempShutdown() {
if
(
running
&&
((
input
>
temp
&&
temp_controller
>=
-
1
)
||
(
input
<
temp
&&
temp_controller
<
-
1
)))
{
if
(
running
&&
((
input
>
temp
&&
temp_controller
>=
-
1
)
||
(
input
<
temp
&&
temp_controller
<
-
1
)))
{
if
(
ms
>
t2
+
5000UL
)
{
if
(
ms
>
t2
+
5000UL
)
{
runnig
=
false
;
runni
n
g
=
false
;
if
(
temp_controller
<
-
1
)
if
(
temp_controller
<
-
1
)
soft_pwm_cooler
=
(
bias
-
d
)
>>
1
;
soft_pwm_cooler
=
(
bias
-
d
)
>>
1
;
else
if
(
temp_controller
<
0
)
else
if
(
temp_controller
<
0
)
...
@@ -383,8 +383,8 @@ void autotempShutdown() {
...
@@ -383,8 +383,8 @@ void autotempShutdown() {
if
(
cycles
>
0
)
{
if
(
cycles
>
0
)
{
if
(
temp_controller
<
-
1
)
if
(
temp_controller
<
-
1
)
long
max_pow
=
MAX_COOLER_POWER
;
long
max_pow
=
MAX_COOLER_POWER
;
else
:
else
long
max_pow
=
hotend
<
0
?
MAX_BED_POWER
:
PID_MAX
;
long
max_pow
=
temp_controller
<
0
?
MAX_BED_POWER
:
PID_MAX
;
bias
+=
(
d
*
(
t_high
-
t_low
))
/
(
t_low
+
t_high
);
bias
+=
(
d
*
(
t_high
-
t_low
))
/
(
t_low
+
t_high
);
bias
=
constrain
(
bias
,
20
,
max_pow
-
20
);
bias
=
constrain
(
bias
,
20
,
max_pow
-
20
);
d
=
(
bias
>
max_pow
/
2
)
?
max_pow
-
1
-
bias
:
bias
;
d
=
(
bias
>
max_pow
/
2
)
?
max_pow
-
1
-
bias
:
bias
;
...
@@ -413,7 +413,7 @@ void autotempShutdown() {
...
@@ -413,7 +413,7 @@ void autotempShutdown() {
}
}
#if ENABLED(PIDTEMP)
#if ENABLED(PIDTEMP)
if
(
temp_controller
>=
0
)
if
(
temp_controller
>=
0
)
soft_pwm
[
hotend
]
=
(
bias
+
d
)
>>
1
;
soft_pwm
[
temp_controller
]
=
(
bias
+
d
)
>>
1
;
#endif
#endif
#if ENABLED(PIDTEMPBED)
#if ENABLED(PIDTEMPBED)
if
(
temp_controller
==
-
1
)
if
(
temp_controller
==
-
1
)
...
@@ -424,7 +424,7 @@ void autotempShutdown() {
...
@@ -424,7 +424,7 @@ void autotempShutdown() {
soft_pwm_cooler
=
(
bias
+
d
)
>>
1
;
soft_pwm_cooler
=
(
bias
+
d
)
>>
1
;
#endif
#endif
cycles
++
;
cycles
++
;
if
(
temp_co
o
ler
<
-
1
)
if
(
temp_co
ntrol
ler
<
-
1
)
max
=
temp
;
max
=
temp
;
else
else
min
=
temp
;
min
=
temp
;
...
@@ -462,9 +462,9 @@ void autotempShutdown() {
...
@@ -462,9 +462,9 @@ void autotempShutdown() {
ECHO_LM
(
DB
,
SERIAL_PID_AUTOTUNE_FINISHED
);
ECHO_LM
(
DB
,
SERIAL_PID_AUTOTUNE_FINISHED
);
#if ENABLED(PIDTEMP)
#if ENABLED(PIDTEMP)
if
(
temp_controller
>=
0
)
{
if
(
temp_controller
>=
0
)
{
ECHO_SMV
(
DB
,
SERIAL_KP
,
PID_PARAM
(
Kp
,
hotend
));
ECHO_SMV
(
DB
,
SERIAL_KP
,
PID_PARAM
(
Kp
,
temp_controller
));
ECHO_MV
(
SERIAL_KI
,
unscalePID_i
(
PID_PARAM
(
Ki
,
hotend
)));
ECHO_MV
(
SERIAL_KI
,
unscalePID_i
(
PID_PARAM
(
Ki
,
temp_controller
)));
ECHO_EMV
(
SERIAL_KD
,
unscalePID_d
(
PID_PARAM
(
Kd
,
hotend
)));
ECHO_EMV
(
SERIAL_KD
,
unscalePID_d
(
PID_PARAM
(
Kd
,
temp_controller
)));
if
(
set_result
)
{
if
(
set_result
)
{
PID_PARAM
(
Kp
,
hotend
)
=
workKp
;
PID_PARAM
(
Kp
,
hotend
)
=
workKp
;
PID_PARAM
(
Ki
,
hotend
)
=
scalePID_i
(
workKi
);
PID_PARAM
(
Ki
,
hotend
)
=
scalePID_i
(
workKi
);
...
...
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