|
@@ -39,7 +39,7 @@ template <class T> int EEPROM_readAnything(int &ee, T& value)
|
39
|
39
|
// ALSO: always make sure the variables in the Store and retrieve sections are in the same order.
|
40
|
40
|
#define EEPROM_VERSION "V04"
|
41
|
41
|
|
42
|
|
-FORCE_INLINE void StoreSettings()
|
|
42
|
+inline void EEPROM_StoreSettings()
|
43
|
43
|
{
|
44
|
44
|
#ifdef EEPROM_SETTINGS
|
45
|
45
|
char ver[4]= "000";
|
|
@@ -72,7 +72,64 @@ FORCE_INLINE void StoreSettings()
|
72
|
72
|
#endif //EEPROM_SETTINGS
|
73
|
73
|
}
|
74
|
74
|
|
75
|
|
-FORCE_INLINE void RetrieveSettings(bool def=false)
|
|
75
|
+
|
|
76
|
+inline void EEPROM_printSettings()
|
|
77
|
+{ // if def=true, the default values will be used
|
|
78
|
+ #ifdef EEPROM_SETTINGS
|
|
79
|
+ SERIAL_ECHO_START;
|
|
80
|
+ SERIAL_ECHOLNPGM("Steps per unit:");
|
|
81
|
+ SERIAL_ECHO_START;
|
|
82
|
+ SERIAL_ECHOPAIR(" M92 X",axis_steps_per_unit[0]);
|
|
83
|
+ SERIAL_ECHOPAIR(" Y",axis_steps_per_unit[1]);
|
|
84
|
+ SERIAL_ECHOPAIR(" Z",axis_steps_per_unit[2]);
|
|
85
|
+ SERIAL_ECHOPAIR(" E",axis_steps_per_unit[3]);
|
|
86
|
+ SERIAL_ECHOLN("");
|
|
87
|
+
|
|
88
|
+ SERIAL_ECHO_START;
|
|
89
|
+ SERIAL_ECHOLNPGM("Maximum feedrates (mm/s):");
|
|
90
|
+ SERIAL_ECHO_START;
|
|
91
|
+ SERIAL_ECHOPAIR(" M203 X",max_feedrate[0]);
|
|
92
|
+ SERIAL_ECHOPAIR(" Y",max_feedrate[1] );
|
|
93
|
+ SERIAL_ECHOPAIR(" Z", max_feedrate[2] );
|
|
94
|
+ SERIAL_ECHOPAIR(" E", max_feedrate[3]);
|
|
95
|
+ SERIAL_ECHOLN("");
|
|
96
|
+ SERIAL_ECHO_START;
|
|
97
|
+ SERIAL_ECHOLNPGM("Maximum Acceleration (mm/s2):");
|
|
98
|
+ SERIAL_ECHO_START;
|
|
99
|
+ SERIAL_ECHOPAIR(" M201 X" ,max_acceleration_units_per_sq_second[0] );
|
|
100
|
+ SERIAL_ECHOPAIR(" Y" , max_acceleration_units_per_sq_second[1] );
|
|
101
|
+ SERIAL_ECHOPAIR(" Z" ,max_acceleration_units_per_sq_second[2] );
|
|
102
|
+ SERIAL_ECHOPAIR(" E" ,max_acceleration_units_per_sq_second[3]);
|
|
103
|
+ SERIAL_ECHOLN("");
|
|
104
|
+ SERIAL_ECHO_START;
|
|
105
|
+ SERIAL_ECHOLNPGM("Acceleration: S=acceleration, T=retract acceleration");
|
|
106
|
+ SERIAL_ECHO_START;
|
|
107
|
+ SERIAL_ECHOPAIR(" M204 S",acceleration );
|
|
108
|
+ SERIAL_ECHOPAIR(" T" ,retract_acceleration);
|
|
109
|
+ SERIAL_ECHOLN("");
|
|
110
|
+ SERIAL_ECHO_START;
|
|
111
|
+ SERIAL_ECHOLNPGM("Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum xY jerk (mm/s), Z=maximum Z jerk (mm/s)");
|
|
112
|
+ SERIAL_ECHO_START;
|
|
113
|
+ SERIAL_ECHOPAIR(" M205 S",minimumfeedrate );
|
|
114
|
+ SERIAL_ECHOPAIR(" T" ,mintravelfeedrate );
|
|
115
|
+ SERIAL_ECHOPAIR(" B" ,minsegmenttime );
|
|
116
|
+ SERIAL_ECHOPAIR(" X" ,max_xy_jerk );
|
|
117
|
+ SERIAL_ECHOPAIR(" Z" ,max_z_jerk);
|
|
118
|
+ SERIAL_ECHOLN("");
|
|
119
|
+ #ifdef PIDTEMP
|
|
120
|
+ SERIAL_ECHO_START;
|
|
121
|
+ SERIAL_ECHOLNPGM("PID settings:");
|
|
122
|
+ SERIAL_ECHO_START;
|
|
123
|
+ SERIAL_ECHOPAIR(" M301 P",Kp);
|
|
124
|
+ SERIAL_ECHOPAIR(" I" ,Ki/PID_dT);
|
|
125
|
+ SERIAL_ECHOPAIR(" D" ,Kd*PID_dT);
|
|
126
|
+ SERIAL_ECHOLN("");
|
|
127
|
+ #endif
|
|
128
|
+ #endif
|
|
129
|
+}
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+inline void EEPROM_RetrieveSettings(bool def=false)
|
76
|
133
|
{ // if def=true, the default values will be used
|
77
|
134
|
#ifdef EEPROM_SETTINGS
|
78
|
135
|
int i=EEPROM_OFFSET;
|
|
@@ -125,55 +182,7 @@ FORCE_INLINE void RetrieveSettings(bool def=false)
|
125
|
182
|
SERIAL_ECHOLN("Using Default settings:");
|
126
|
183
|
}
|
127
|
184
|
#ifdef EEPROM_CHITCHAT
|
128
|
|
- SERIAL_ECHO_START;
|
129
|
|
- SERIAL_ECHOLNPGM("Steps per unit:");
|
130
|
|
- SERIAL_ECHO_START;
|
131
|
|
- SERIAL_ECHOPAIR(" M92 X",axis_steps_per_unit[0]);
|
132
|
|
- SERIAL_ECHOPAIR(" Y",axis_steps_per_unit[1]);
|
133
|
|
- SERIAL_ECHOPAIR(" Z",axis_steps_per_unit[2]);
|
134
|
|
- SERIAL_ECHOPAIR(" E",axis_steps_per_unit[3]);
|
135
|
|
- SERIAL_ECHOLN("");
|
136
|
|
-
|
137
|
|
- SERIAL_ECHO_START;
|
138
|
|
- SERIAL_ECHOLNPGM("Maximum feedrates (mm/s):");
|
139
|
|
- SERIAL_ECHO_START;
|
140
|
|
- SERIAL_ECHOPAIR(" M203 X",max_feedrate[0]);
|
141
|
|
- SERIAL_ECHOPAIR(" Y",max_feedrate[1] );
|
142
|
|
- SERIAL_ECHOPAIR(" Z", max_feedrate[2] );
|
143
|
|
- SERIAL_ECHOPAIR(" E", max_feedrate[3]);
|
144
|
|
- SERIAL_ECHOLN("");
|
145
|
|
- SERIAL_ECHO_START;
|
146
|
|
- SERIAL_ECHOLNPGM("Maximum Acceleration (mm/s2):");
|
147
|
|
- SERIAL_ECHO_START;
|
148
|
|
- SERIAL_ECHOPAIR(" M201 X" ,max_acceleration_units_per_sq_second[0] );
|
149
|
|
- SERIAL_ECHOPAIR(" Y" , max_acceleration_units_per_sq_second[1] );
|
150
|
|
- SERIAL_ECHOPAIR(" Z" ,max_acceleration_units_per_sq_second[2] );
|
151
|
|
- SERIAL_ECHOPAIR(" E" ,max_acceleration_units_per_sq_second[3]);
|
152
|
|
- SERIAL_ECHOLN("");
|
153
|
|
- SERIAL_ECHO_START;
|
154
|
|
- SERIAL_ECHOLNPGM("Acceleration: S=acceleration, T=retract acceleration");
|
155
|
|
- SERIAL_ECHO_START;
|
156
|
|
- SERIAL_ECHOPAIR(" M204 S",acceleration );
|
157
|
|
- SERIAL_ECHOPAIR(" T" ,retract_acceleration);
|
158
|
|
- SERIAL_ECHOLN("");
|
159
|
|
- SERIAL_ECHO_START;
|
160
|
|
- SERIAL_ECHOLNPGM("Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum xY jerk (mm/s), Z=maximum Z jerk (mm/s)");
|
161
|
|
- SERIAL_ECHO_START;
|
162
|
|
- SERIAL_ECHOPAIR(" M205 S",minimumfeedrate );
|
163
|
|
- SERIAL_ECHOPAIR(" T" ,mintravelfeedrate );
|
164
|
|
- SERIAL_ECHOPAIR(" B" ,minsegmenttime );
|
165
|
|
- SERIAL_ECHOPAIR(" X" ,max_xy_jerk );
|
166
|
|
- SERIAL_ECHOPAIR(" Z" ,max_z_jerk);
|
167
|
|
- SERIAL_ECHOLN("");
|
168
|
|
- #ifdef PIDTEMP
|
169
|
|
- SERIAL_ECHO_START;
|
170
|
|
- SERIAL_ECHOLNPGM("PID settings:");
|
171
|
|
- SERIAL_ECHO_START;
|
172
|
|
- SERIAL_ECHOPAIR(" M301 P",Kp);
|
173
|
|
- SERIAL_ECHOPAIR(" I" ,Ki/PID_dT);
|
174
|
|
- SERIAL_ECHOPAIR(" D" ,Kd*PID_dT);
|
175
|
|
- SERIAL_ECHOLN("");
|
176
|
|
- #endif
|
|
185
|
+ EEPROM_printSettings();
|
177
|
186
|
#endif
|
178
|
187
|
}
|
179
|
188
|
|