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
4dd5fb50
Commit
4dd5fb50
authored
Apr 18, 2015
by
Simone Primarosa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ability to write configuration on SD
parent
78be2cbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
3 deletions
+30
-3
Marlin_main.cpp
MarlinKimbra/Marlin_main.cpp
+30
-3
No files found.
MarlinKimbra/Marlin_main.cpp
View file @
4dd5fb50
...
...
@@ -406,7 +406,10 @@ bool target_direction;
#ifdef SDSUPPORT
static
bool
fromsd
[
BUFSIZE
];
#endif //!SDSUPPORT
#ifdef SD_SETTINGS
unsigned
long
config_last_update
=
0
;
#endif
#endif
#ifdef FILAMENTCHANGEENABLE
bool
filament_changing
=
false
;
...
...
@@ -751,7 +754,19 @@ void setup() {
setup_photpin
();
setup_laserbeampin
();
// Initialize Laserbeam pin
servo_init
();
#ifdef SDSUPPORT
card
.
initsd
();
#endif
// loads custom configuration from SDCARD if available else uses defaults
#ifdef SDSTUPPORT
if
(
!
IS_SD_INSERTED
)
ConfigSD_ResetDefault
();
else
#endif
{
ConfigSD_RetrieveSettings
();
}
lcd_init
();
_delay_ms
(
1000
);
// wait 1sec to display the splash screen
...
...
@@ -6872,7 +6887,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
if
(
!
filament_changing
)
#endif
{
if
(
deg
Hotend
(
active_extruder
)
<
IDLE_OOZING_MAXTEMP
&&
deg
TargetHotend
(
active_extruder
)
<
IDLE_OOZING_MINTEMP
)
{
if
(
degTargetHotend
(
active_extruder
)
<
IDLE_OOZING_MINTEMP
)
{
IDLE_OOZING_retract
(
false
);
}
else
if
((
millis
()
-
axis_last_activity
)
>
IDLE_OOZING_SECONDS
*
1000
)
{
...
...
@@ -6881,6 +6896,18 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
}
}
#endif
#if defined(SDSUPPORT) && defined(SD_SETTINGS)
if
(
!
config_readed
)
{
ConfigSD_RetrieveSettings
(
true
);
}
else
if
((
millis
()
-
config_last_update
)
>
SD_CFG_SECONDS
*
1000
)
{
ConfigSD_StoreSettings
();
}
#endif
#ifdef TEMP_STAT_LEDS
handle_status_leds
();
#endif
#ifdef TEMP_STAT_LEDS
handle_status_leds
();
...
...
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