HCoop
/
clinton
/
Smoothieware.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d42b349
)
save some memory by using shrink_to_fit on the homing arrays
author
Jim Morris
<morris@wolfman.com>
Wed, 11 Apr 2018 18:28:28 +0000
(19:28 +0100)
committer
Jim Morris
<morris@wolfman.com>
Wed, 11 Apr 2018 18:28:28 +0000
(19:28 +0100)
src/modules/tools/endstops/Endstops.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/modules/tools/endstops/Endstops.cpp
b/src/modules/tools/endstops/Endstops.cpp
index
3a8fca1
..
07b4ff2
100644
(file)
--- a/
src/modules/tools/endstops/Endstops.cpp
+++ b/
src/modules/tools/endstops/Endstops.cpp
@@
-202,6
+202,9
@@
bool Endstops::load_old_config()
// if no pins defined then disable the module
if(endstops.empty()) return false;
+ homing_axis.shrink_to_fit();
+ endstops.shrink_to_fit();
+
get_global_configs();
if(limit_enabled) {
@@
-362,6
+365,10
@@
bool Endstops::load_config()
}
}
+ // saves some memory
+ homing_axis.shrink_to_fit();
+ endstops.shrink_to_fit();
+
// sets some endstop global configs applicable to all endstops
get_global_configs();