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
4ca1e30a
Commit
4ca1e30a
authored
Apr 01, 2015
by
Simone Primarosa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Power Consumption stored in eeprom EEPROM
parent
6abada29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
ConfigurationStore.cpp
MarlinKimbra/ConfigurationStore.cpp
+13
-1
No files found.
MarlinKimbra/ConfigurationStore.cpp
View file @
4ca1e30a
...
@@ -41,7 +41,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) {
...
@@ -41,7 +41,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) {
// wrong data being written to the variables.
// wrong data being written to the variables.
// ALSO: always make sure the variables in the Store and retrieve sections are in the same order.
// ALSO: always make sure the variables in the Store and retrieve sections are in the same order.
#define EEPROM_VERSION "V1
7
"
#define EEPROM_VERSION "V1
8
"
#ifdef EEPROM_SETTINGS
#ifdef EEPROM_SETTINGS
void
Config_StoreSettings
()
{
void
Config_StoreSettings
()
{
...
@@ -132,6 +132,10 @@ void Config_StoreSettings() {
...
@@ -132,6 +132,10 @@ void Config_StoreSettings() {
#ifdef IDLE_OOZING_PREVENT
#ifdef IDLE_OOZING_PREVENT
EEPROM_WRITE_VAR
(
i
,
idleoozing_enabled
);
EEPROM_WRITE_VAR
(
i
,
idleoozing_enabled
);
#endif
#endif
#if defined(POWER_CONSUMPTION) && defined(STORE_CONSUMPTION)
EEPROM_WRITE_VAR
(
i
,
power_consumption_hour
);
#endif
int
storageSize
=
i
;
int
storageSize
=
i
;
...
@@ -255,6 +259,10 @@ void Config_RetrieveSettings()
...
@@ -255,6 +259,10 @@ void Config_RetrieveSettings()
#ifdef IDLE_OOZING_PREVENT
#ifdef IDLE_OOZING_PREVENT
EEPROM_READ_VAR
(
i
,
idleoozing_enabled
);
EEPROM_READ_VAR
(
i
,
idleoozing_enabled
);
#endif
#endif
#if defined(POWER_CONSUMPTION) && defined(STORE_CONSUMPTION)
EEPROM_READ_VAR
(
i
,
power_consumption_hour
);
#endif
// Call updatePID (similar to when we have processed M301)
// Call updatePID (similar to when we have processed M301)
updatePID
();
updatePID
();
...
@@ -400,6 +408,10 @@ void Config_ResetDefault()
...
@@ -400,6 +408,10 @@ void Config_ResetDefault()
#ifdef IDLE_OOZING_PREVENT
#ifdef IDLE_OOZING_PREVENT
idleoozing_enabled
=
true
;
idleoozing_enabled
=
true
;
#endif
#endif
#if defined(POWER_CONSUMPTION) && defined(STORE_CONSUMPTION)
power_consumption_hour
=
0
;
#endif
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
SERIAL_ECHOLNPGM
(
"Hardcoded Default Settings Loaded"
);
SERIAL_ECHOLNPGM
(
"Hardcoded Default Settings Loaded"
);
...
...
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