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
a2c58bb2
Commit
a2c58bb2
authored
May 07, 2016
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Language
parent
df08ccf5
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
77 additions
and
42 deletions
+77
-42
language_an.h
MK/module/language/language_an.h
+1
-0
language_bg.h
MK/module/language/language_bg.h
+1
-0
language_ca.h
MK/module/language/language_ca.h
+1
-0
language_cn.h
MK/module/language/language_cn.h
+1
-0
language_da.h
MK/module/language/language_da.h
+1
-0
language_de.h
MK/module/language/language_de.h
+1
-0
language_en.h
MK/module/language/language_en.h
+1
-0
language_es.h
MK/module/language/language_es.h
+1
-0
language_eu.h
MK/module/language/language_eu.h
+1
-0
language_fi.h
MK/module/language/language_fi.h
+1
-0
language_fr.h
MK/module/language/language_fr.h
+1
-0
language_it.h
MK/module/language/language_it.h
+1
-0
language_kana.h
MK/module/language/language_kana.h
+1
-0
language_kana_utf8.h
MK/module/language/language_kana_utf8.h
+1
-0
language_nl.h
MK/module/language/language_nl.h
+1
-0
language_pl.h
MK/module/language/language_pl.h
+1
-0
language_pt-br.h
MK/module/language/language_pt-br.h
+1
-0
language_pt.h
MK/module/language/language_pt.h
+1
-0
language_ru.h
MK/module/language/language_ru.h
+1
-0
temperature.cpp
MK/module/temperature/temperature.cpp
+47
-41
temperature.h
MK/module/temperature/temperature.h
+11
-1
No files found.
MK/module/language/language_an.h
View file @
a2c58bb2
...
...
@@ -74,6 +74,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_bg.h
View file @
a2c58bb2
...
...
@@ -74,6 +74,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_ca.h
View file @
a2c58bb2
...
...
@@ -73,6 +73,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_cn.h
View file @
a2c58bb2
...
...
@@ -73,6 +73,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_da.h
View file @
a2c58bb2
...
...
@@ -73,6 +73,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_de.h
View file @
a2c58bb2
...
...
@@ -73,6 +73,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_en.h
View file @
a2c58bb2
...
...
@@ -73,6 +73,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_es.h
View file @
a2c58bb2
...
...
@@ -73,6 +73,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_eu.h
View file @
a2c58bb2
...
...
@@ -73,6 +73,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_fi.h
View file @
a2c58bb2
...
...
@@ -73,6 +73,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_fr.h
View file @
a2c58bb2
...
...
@@ -73,6 +73,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_it.h
View file @
a2c58bb2
...
...
@@ -73,6 +73,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_kana.h
View file @
a2c58bb2
...
...
@@ -75,6 +75,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_kana_utf8.h
View file @
a2c58bb2
...
...
@@ -78,6 +78,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_nl.h
View file @
a2c58bb2
...
...
@@ -73,6 +73,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_pl.h
View file @
a2c58bb2
...
...
@@ -73,6 +73,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_pt-br.h
View file @
a2c58bb2
...
...
@@ -73,6 +73,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_pt.h
View file @
a2c58bb2
...
...
@@ -73,6 +73,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/language/language_ru.h
View file @
a2c58bb2
...
...
@@ -73,6 +73,7 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_H1 " H1"
#define MSG_H2 " H2"
#define MSG_H3 " H3"
...
...
MK/module/temperature/temperature.cpp
View file @
a2c58bb2
...
...
@@ -100,14 +100,15 @@ unsigned char soft_pwm_bed;
enum
TRState
{
TRReset
,
TRInactive
,
TRFirstHeating
,
TRStable
,
TRRunaway
};
void
thermal_runaway_protection
(
TRState
*
state
,
millis_t
*
timer
,
float
temperature
,
float
target_temperature
,
int
heater_id
,
int
period_seconds
,
int
hysteresis_degc
);
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
static
TRState
thermal_runaway_state_machine
[
4
]
=
{
TRReset
,
TRReset
,
TRReset
,
TRReset
};
static
millis_t
thermal_runaway_timer
[
4
];
// = {0,0,0,0
};
static
TRState
thermal_runaway_state_machine
[
HOTENDS
]
=
{
TRReset
};
static
millis_t
thermal_runaway_timer
[
HOTENDS
]
=
{
0
};
#endif
#if ENABLED(THERMAL_PROTECTION_BED) && TEMP_SENSOR_BED != 0
static
TRState
thermal_runaway_bed_state_machine
=
TRReset
;
static
millis_t
thermal_runaway_bed_timer
;
#endif
#endif
#if HAS(POWER_CONSUMPTION_SENSOR)
int
current_raw_powconsumption
=
0
;
//Holds measured power consumption
static
unsigned
long
raw_powconsumption_value
=
0
;
...
...
@@ -1321,6 +1322,9 @@ void disable_all_heaters() {
for
(
int
i
=
0
;
i
<
HOTENDS
;
i
++
)
setTargetHotend
(
0
,
i
);
setTargetBed
(
0
);
// If all heaters go down then for sure our print job has stopped
print_job_timer
.
stop
();
#define DISABLE_HEATER(NR) { \
target_temperature[NR] = 0; \
soft_pwm[NR] = 0; \
...
...
@@ -1355,59 +1359,61 @@ void disable_all_heaters() {
}
#if ENABLED(HEATER_0_USES_MAX6675)
#define MAX6675_HEAT_INTERVAL 250u
static
millis_t
next_max6675_ms
=
0
;
int
max6675_temp
=
2000
;
static
int
read_max6675
()
{
#if ENABLED(MAX6675_IS_MAX31855)
uint32_t
max6675_temp
=
2000
;
#define MAX6675_ERROR_MASK 7
#define MAX6675_DISCARD_BITS 18
#else
uint16_t
max6675_temp
=
2000
;
#define MAX6675_ERROR_MASK 4
#define MAX6675_DISCARD_BITS 3
#endif
int
Temperature
::
read_max6675
()
{
static
millis_t
next_max6675_ms
=
0
;
millis_t
ms
=
millis
();
if
(
ms
<
next_max6675_ms
)
return
max6675_temp
;
if
(
PENDING
(
ms
,
next_max6675_ms
))
return
(
int
)
max6675_temp
;
next_max6675_ms
=
ms
+
MAX6675_HEAT_INTERVAL
;
max6675_temp
=
0
;
CBI
(
#ifdef PRR
CBI
(
PRR
,
PRSPI
);
PRR
#elif defined(PRR0)
CBI
(
PRR0
,
PRSPI
);
PRR0
#endif
,
PRSPI
);
SPCR
=
_BV
(
MSTR
)
|
_BV
(
SPE
)
|
_BV
(
SPR0
);
// enable TT_MAX6675
WRITE
(
MAX6675_SS
,
0
);
WRITE
(
MAX6675_SS
,
0
);
// enable TT_MAX6675
// ensure 100ns delay - a bit extra is fine
asm
(
"nop"
);
//
50ns on 20Mhz, 62.5ns on 16Mhz
asm
(
"nop"
);
//
50ns on 20Mhz, 62.5ns on 16Mhz
asm
(
"nop"
);
//
50ns on 20Mhz, 62.5ns on 16Mhz
asm
(
"nop"
);
//
50ns on 20Mhz, 62.5ns on 16Mhz
// read MSB
SPDR
=
0
;
for
(;
!
TEST
(
SPSR
,
SPIF
););
max6675_temp
=
SPDR
;
max6675_temp
<<=
8
;
// read LSB
// Read a big-endian temperature value
max6675_temp
=
0
;
for
(
uint8_t
i
=
sizeof
(
max6675_temp
);
i
--
;)
{
SPDR
=
0
;
for
(;
!
TEST
(
SPSR
,
SPIF
););
for
(;
!
TEST
(
SPSR
,
SPIF
););
max6675_temp
|=
SPDR
;
if
(
i
>
0
)
max6675_temp
<<=
8
;
// shift left if not the last byte
}
// disable TT_MAX6675
WRITE
(
MAX6675_SS
,
1
);
WRITE
(
MAX6675_SS
,
1
);
// disable TT_MAX6675
if
(
max6675_temp
&
4
)
{
// thermocouple open
max6675_temp
=
4000
;
}
else
{
max6675_temp
=
max6675_temp
>>
3
;
}
if
(
max6675_temp
&
MAX6675_ERROR_MASK
)
max6675_temp
=
4000
;
// thermocouple open
else
max6675_temp
>>=
MAX6675_DISCARD_BITS
;
return
max6675_temp
;
return
(
int
)
max6675_temp
;
}
#endif // HEATER_0_USES_MAX6675
...
...
MK/module/temperature/temperature.h
View file @
a2c58bb2
...
...
@@ -127,13 +127,23 @@ FORCE_INLINE float degTargetBed() { return target_temperature_bed; }
void
start_watching_heater
(
int
h
=
0
);
#endif
#if ENABLED(THERMAL_PROTECTION_BED)
void
start_watching_bed
();
#endif
FORCE_INLINE
void
setTargetHotend
(
const
float
&
celsius
,
uint8_t
hotend
)
{
target_temperature
[
HOTEND_ARG
]
=
celsius
;
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
start_watching_heater
(
HOTEND_ARG
);
#endif
}
FORCE_INLINE
void
setTargetBed
(
const
float
&
celsius
)
{
target_temperature_bed
=
celsius
;
}
FORCE_INLINE
void
setTargetBed
(
const
float
&
celsius
)
{
target_temperature_bed
=
celsius
;
#if ENABLED(THERMAL_PROTECTION_BED)
start_watching_bed
();
#endif
}
FORCE_INLINE
bool
isHeatingHotend
(
uint8_t
hotend
)
{
return
target_temperature
[
HOTEND_ARG
]
>
current_temperature
[
HOTEND_ARG
];
}
FORCE_INLINE
bool
isHeatingBed
()
{
return
target_temperature_bed
>
current_temperature_bed
;
}
...
...
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