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
82f65e4f
Commit
82f65e4f
authored
Jun 05, 2015
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Same fix
parent
5729de2f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
32 deletions
+26
-32
Marlin_main.cpp
MarlinKimbra/Marlin_main.cpp
+15
-4
cardreader.cpp
MarlinKimbra/cardreader.cpp
+1
-1
configuration_store.cpp
MarlinKimbra/configuration_store.cpp
+1
-1
language.h
MarlinKimbra/language.h
+1
-1
temperature.cpp
MarlinKimbra/temperature.cpp
+8
-25
No files found.
MarlinKimbra/Marlin_main.cpp
View file @
82f65e4f
...
...
@@ -5873,7 +5873,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
long
csteps
;
if
(
tmp_extruder
>=
EXTRUDERS
)
{
ECHO_SMV
(
DB
,
"T"
,
tmp_extruder
);
ECHO_EM
(
MSG_INVALID_EXTRUDER
);
ECHO_EM
(
" "
MSG_INVALID_EXTRUDER
);
}
else
{
target_extruder
=
tmp_extruder
;
...
...
@@ -6996,9 +6996,20 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
if
(
max_inactive_time
&&
ms
>
previous_cmd_ms
+
max_inactive_time
)
kill
(
PSTR
(
MSG_KILLED
));
if
(
stepper_inactive_time
&&
ms
>
previous_cmd_ms
+
stepper_inactive_time
&&
!
ignore_stepper_queue
&&
!
blocks_queued
())
disable_all_steppers
();
if
(
stepper_inactive_time
&&
ms
>
previous_cmd_ms
+
stepper_inactive_time
&&
!
ignore_stepper_queue
&&
!
blocks_queued
())
{
#if DISABLE_X == true
disable_x
();
#endif
#if DISABLE_Y == true
disable_y
();
#endif
#if DISABLE_Z == true
disable_z
();
#endif
#if DISABLE_E == true
disable_e
();
#endif
}
#ifdef CHDK // Check if pin should be set to LOW after M240 set it to HIGH
if
(
chdkActive
&&
ms
>
chdkHigh
+
CHDK_DELAY
)
{
...
...
MarlinKimbra/cardreader.cpp
View file @
82f65e4f
...
...
@@ -353,11 +353,11 @@ void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/,
if
(
!
file
.
open
(
curDir
,
fname
,
O_CREAT
|
O_APPEND
|
O_WRITE
|
O_TRUNC
))
{
ECHO_MV
(
MSG_SD_OPEN_FILE_FAIL
,
fname
);
ECHO_PGM
(
".
\n
"
);
if
(
lcd_status
)
lcd_setstatus
(
fname
);
}
else
{
saving
=
true
;
ECHO_EMV
(
MSG_SD_WRITE_TO_FILE
,
name
);
if
(
lcd_status
)
lcd_setstatus
(
fname
);
}
}
}
...
...
MarlinKimbra/configuration_store.cpp
View file @
82f65e4f
...
...
@@ -824,7 +824,7 @@ void Config_ResetDefault() {
}
char
time
[
30
];
int
day
=
printer_usage_seconds
/
60
/
60
/
24
,
hours
=
(
printer_usage_seconds
/
60
/
60
)
%
24
,
minutes
=
(
printer_usage_seconds
/
60
)
%
60
;
sprintf_P
(
time
,
PSTR
(
"%i "
MSG_END_DAY
" %i "
MSG_END_HOUR
" %i "
MSG_END_MINUTE
),
day
,
hours
,
minutes
);
sprintf_P
(
time
,
PSTR
(
"
%i "
MSG_END_DAY
" %i "
MSG_END_HOUR
" %i "
MSG_END_MINUTE
),
day
,
hours
,
minutes
);
ECHO_LV
(
DB
,
time
);
}
...
...
MarlinKimbra/language.h
View file @
82f65e4f
...
...
@@ -104,7 +104,7 @@
#define MSG_FILE_PRINTED "Done printing file"
#define MSG_BEGIN_FILE_LIST "Begin file list"
#define MSG_END_FILE_LIST "End file list"
#define MSG_INVALID_EXTRUDER "
Invalid extruder
"
#define MSG_INVALID_EXTRUDER "
Invalid extruder
"
#define MSG_INVALID_SOLENOID "Invalid solenoid"
#define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature"
#define MSG_HEATING "Heating..."
...
...
MarlinKimbra/temperature.cpp
View file @
82f65e4f
...
...
@@ -76,6 +76,7 @@ unsigned char soft_pwm_bed;
#if defined(THERMAL_PROTECTION_HOTENDS) || defined(THERMAL_PROTECTION_BED)
enum
TRState
{
TRReset
,
TRInactive
,
TRFirstHeating
,
TRStable
,
TRRunaway
};
static
float
tr_target_temperature
[
HOTENDS
+
1
]
=
{
0.0
};
void
thermal_runaway_protection
(
TRState
*
state
,
millis_t
*
timer
,
float
temperature
,
float
target_temperature
,
int
heater_id
,
int
period_seconds
,
int
hysteresis_degc
);
#ifdef THERMAL_PROTECTION_HOTENDS
static
TRState
thermal_runaway_state_machine
[
4
]
=
{
TRReset
,
TRReset
,
TRReset
,
TRReset
};
...
...
@@ -312,12 +313,14 @@ void PID_autotune(float temp, int hotend, int ncycles) {
if
(
hotend
<
0
)
{
p
=
soft_pwm_bed
;
ECHO_SMV
(
OK
,
MSG_B
,
input
);
ECHO_MV
(
" /"
,
temp
,
1
);
ECHO_EMV
(
" "
MSG_AT
,
p
);
}
else
{
p
=
soft_pwm
[
hotend
];
ECHO_SMV
(
OK
,
MSG_T
,
input
,
1
);
ECHO_EMV
(
MSG_AT
,
p
);
ECHO_MV
(
" /"
,
temp
,
1
);
ECHO_EMV
(
" "
MSG_AT
,
p
);
}
temp_ms
=
ms
;
...
...
@@ -733,12 +736,7 @@ static float analog2temp(int raw, uint8_t e) {
return
celsius
;
}
#ifdef __SAM3X8E__
return
((
raw
*
((
3.3
*
100
)
/
1024
)
/
OVERSAMPLENR
)
*
TEMP_SENSOR_AD595_GAIN
)
+
TEMP_SENSOR_AD595_OFFSET
;
#else
return
((
raw
*
((
5.0
*
100.0
)
/
1024.0
)
/
OVERSAMPLENR
)
*
TEMP_SENSOR_AD595_GAIN
)
+
TEMP_SENSOR_AD595_OFFSET
;
#endif
}
// Derived from RepRap FiveD extruder::getTemperature()
...
...
@@ -763,12 +761,8 @@ static float analog2tempBed(int raw) {
return
celsius
;
#elif defined BED_USES_AD595
#ifdef __SAM3X8E__
return
((
raw
*
((
3.3
*
100
)
/
1024
)
/
OVERSAMPLENR
)
*
TEMP_SENSOR_AD595_GAIN
)
+
TEMP_SENSOR_AD595_OFFSET
;
#else
return
((
raw
*
((
5.0
*
100.0
)
/
1024.0
)
/
OVERSAMPLENR
)
*
TEMP_SENSOR_AD595_GAIN
)
+
TEMP_SENSOR_AD595_OFFSET
;
#endif
#else //NO BED_USES_THERMISTOR
#else
return
0
;
#endif
}
...
...
@@ -916,12 +910,6 @@ void tp_init() {
#endif // HEATER_0_USES_MAX6675
#ifdef __SAM3X8E__
// Use timer0 for temperature measurement
// Interleave temperature interrupt with millies interrupt
HAL_temp_timer_start
(
TEMP_TIMER_NUM
);
HAL_timer_enable_interrupt
(
TEMP_TIMER_NUM
);
#else
#ifdef DIDR2
#define ANALOG_SELECT(pin) do{ if (pin < 8) DIDR0 |= BIT(pin); else DIDR2 |= BIT(pin - 8); }while(0)
#else
...
...
@@ -960,7 +948,6 @@ void tp_init() {
// Interleave temperature interrupt with millies interrupt
OCR0B
=
128
;
TIMSK0
|=
BIT
(
OCIE0B
);
#endif
// Wait for temperature measurement to settle
delay
(
250
);
...
...
@@ -1015,7 +1002,6 @@ void tp_init() {
#endif // HOTENDS > 1
#ifdef BED_MINTEMP
/* No bed MINTEMP error implemented?!? */
/*
while
(
analog2tempBed
(
bed_minttemp_raw
)
<
BED_MINTEMP
)
{
#if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP
bed_minttemp_raw
+=
OVERSAMPLENR
;
...
...
@@ -1023,7 +1009,6 @@ void tp_init() {
bed_minttemp_raw
-=
OVERSAMPLENR
;
#endif
}
*/
#endif //BED_MINTEMP
#ifdef BED_MAXTEMP
while
(
analog2tempBed
(
bed_maxttemp_raw
)
>
BED_MAXTEMP
)
{
...
...
@@ -1056,8 +1041,6 @@ void tp_init() {
void
thermal_runaway_protection
(
TRState
*
state
,
millis_t
*
timer
,
float
temperature
,
float
target_temperature
,
int
heater_id
,
int
period_seconds
,
int
hysteresis_degc
)
{
static
float
tr_target_temperature
[
EXTRUDERS
+
1
]
=
{
0.0
};
/*
ECHO_SM(DB, "Thermal Thermal Runaway Running. Heater ID: ");
if (heater_id < 0) ECHO_M("bed"); else ECHO_V(heater_id);
...
...
@@ -1067,7 +1050,7 @@ void tp_init() {
ECHO_EMV(" ; Target Temp:", target_temperature);
*/
int
heater_index
=
heater_id
>=
0
?
heater_id
:
EXTRUDER
S
;
int
heater_index
=
heater_id
>=
0
?
heater_id
:
HOTEND
S
;
// If the target temperature changes, restart
if
(
tr_target_temperature
[
heater_index
]
!=
target_temperature
)
...
...
@@ -1168,8 +1151,8 @@ void disable_all_heaters() {
WRITE
(
MAX6675_SS
,
0
);
// 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
;
...
...
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