|
@@ -93,18 +93,15 @@ void serial_echopair_P(const char *s_P, double v);
|
93
|
93
|
void serial_echopair_P(const char *s_P, unsigned long v);
|
94
|
94
|
|
95
|
95
|
|
96
|
|
-//Things to write to serial from Program memory. Saves 400 to 2k of RAM.
|
97
|
|
-FORCE_INLINE void serialprintPGM(const char *str)
|
98
|
|
-{
|
99
|
|
- char ch=pgm_read_byte(str);
|
100
|
|
- while(ch)
|
101
|
|
- {
|
|
96
|
+// Things to write to serial from Program memory. Saves 400 to 2k of RAM.
|
|
97
|
+FORCE_INLINE void serialprintPGM(const char *str) {
|
|
98
|
+ char ch = pgm_read_byte(str);
|
|
99
|
+ while(ch) {
|
102
|
100
|
MYSERIAL.write(ch);
|
103
|
|
- ch=pgm_read_byte(++str);
|
|
101
|
+ ch = pgm_read_byte(++str);
|
104
|
102
|
}
|
105
|
103
|
}
|
106
|
104
|
|
107
|
|
-
|
108
|
105
|
void get_command();
|
109
|
106
|
void process_commands();
|
110
|
107
|
|
|
@@ -148,7 +145,7 @@ void manage_inactivity(bool ignore_stepper_queue=false);
|
148
|
145
|
#endif
|
149
|
146
|
|
150
|
147
|
#if HAS_E0_ENABLE
|
151
|
|
- #define enable_e0() E0_ENABLE_WRITE(E_ENABLE_ON)
|
|
148
|
+ #define enable_e0() E0_ENABLE_WRITE( E_ENABLE_ON)
|
152
|
149
|
#define disable_e0() E0_ENABLE_WRITE(!E_ENABLE_ON)
|
153
|
150
|
#else
|
154
|
151
|
#define enable_e0() /* nothing */
|
|
@@ -156,7 +153,7 @@ void manage_inactivity(bool ignore_stepper_queue=false);
|
156
|
153
|
#endif
|
157
|
154
|
|
158
|
155
|
#if (EXTRUDERS > 1) && HAS_E1_ENABLE
|
159
|
|
- #define enable_e1() E1_ENABLE_WRITE(E_ENABLE_ON)
|
|
156
|
+ #define enable_e1() E1_ENABLE_WRITE( E_ENABLE_ON)
|
160
|
157
|
#define disable_e1() E1_ENABLE_WRITE(!E_ENABLE_ON)
|
161
|
158
|
#else
|
162
|
159
|
#define enable_e1() /* nothing */
|
|
@@ -164,7 +161,7 @@ void manage_inactivity(bool ignore_stepper_queue=false);
|
164
|
161
|
#endif
|
165
|
162
|
|
166
|
163
|
#if (EXTRUDERS > 2) && HAS_E2_ENABLE
|
167
|
|
- #define enable_e2() E2_ENABLE_WRITE(E_ENABLE_ON)
|
|
164
|
+ #define enable_e2() E2_ENABLE_WRITE( E_ENABLE_ON)
|
168
|
165
|
#define disable_e2() E2_ENABLE_WRITE(!E_ENABLE_ON)
|
169
|
166
|
#else
|
170
|
167
|
#define enable_e2() /* nothing */
|
|
@@ -172,15 +169,25 @@ void manage_inactivity(bool ignore_stepper_queue=false);
|
172
|
169
|
#endif
|
173
|
170
|
|
174
|
171
|
#if (EXTRUDERS > 3) && HAS_E3_ENABLE
|
175
|
|
- #define enable_e3() E3_ENABLE_WRITE(E_ENABLE_ON)
|
|
172
|
+ #define enable_e3() E3_ENABLE_WRITE( E_ENABLE_ON)
|
176
|
173
|
#define disable_e3() E3_ENABLE_WRITE(!E_ENABLE_ON)
|
177
|
174
|
#else
|
178
|
175
|
#define enable_e3() /* nothing */
|
179
|
176
|
#define disable_e3() /* nothing */
|
180
|
177
|
#endif
|
181
|
178
|
|
|
179
|
+/**
|
|
180
|
+ * The axis order in all axis related arrays is X, Y, Z, E
|
|
181
|
+ */
|
|
182
|
+#define NUM_AXIS 4
|
|
183
|
+
|
|
184
|
+/**
|
|
185
|
+ * Axis indices as enumerated constants
|
|
186
|
+ *
|
|
187
|
+ * A_AXIS and B_AXIS are used by COREXY printers
|
|
188
|
+ * X_HEAD and Y_HEAD is used for systems that don't have a 1:1 relationship between X_AXIS and X Head movement, like CoreXY bots.
|
|
189
|
+ */
|
182
|
190
|
enum AxisEnum {X_AXIS=0, Y_AXIS=1, A_AXIS=0, B_AXIS=1, Z_AXIS=2, E_AXIS=3, X_HEAD=4, Y_HEAD=5};
|
183
|
|
-//X_HEAD and Y_HEAD is used for systems that don't have a 1:1 relationship between X_AXIS and X Head movement, like CoreXY bots.
|
184
|
191
|
|
185
|
192
|
void FlushSerialRequestResend();
|
186
|
193
|
void ClearToSend();
|
|
@@ -224,7 +231,7 @@ void refresh_cmd_timeout(void);
|
224
|
231
|
#ifndef CRITICAL_SECTION_START
|
225
|
232
|
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
|
226
|
233
|
#define CRITICAL_SECTION_END SREG = _sreg;
|
227
|
|
-#endif //CRITICAL_SECTION_START
|
|
234
|
+#endif
|
228
|
235
|
|
229
|
236
|
extern float homing_feedrate[];
|
230
|
237
|
extern bool axis_relative_modes[];
|
|
@@ -233,8 +240,9 @@ extern bool volumetric_enabled;
|
233
|
240
|
extern int extruder_multiply[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually
|
234
|
241
|
extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.
|
235
|
242
|
extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
|
236
|
|
-extern float current_position[NUM_AXIS] ;
|
|
243
|
+extern float current_position[NUM_AXIS];
|
237
|
244
|
extern float home_offset[3];
|
|
245
|
+
|
238
|
246
|
#ifdef DELTA
|
239
|
247
|
extern float endstop_adj[3];
|
240
|
248
|
extern float delta_radius;
|
|
@@ -242,18 +250,23 @@ extern float home_offset[3];
|
242
|
250
|
extern float delta_segments_per_second;
|
243
|
251
|
void recalc_delta_settings(float radius, float diagonal_rod);
|
244
|
252
|
#elif defined(Z_DUAL_ENDSTOPS)
|
245
|
|
-extern float z_endstop_adj;
|
|
253
|
+ extern float z_endstop_adj;
|
246
|
254
|
#endif
|
|
255
|
+
|
247
|
256
|
#ifdef SCARA
|
248
|
257
|
extern float axis_scaling[3]; // Build size scaling
|
249
|
258
|
#endif
|
|
259
|
+
|
250
|
260
|
extern float min_pos[3];
|
251
|
261
|
extern float max_pos[3];
|
252
|
262
|
extern bool axis_known_position[3];
|
|
263
|
+
|
253
|
264
|
#ifdef ENABLE_AUTO_BED_LEVELING
|
254
|
265
|
extern float zprobe_zoffset;
|
255
|
266
|
#endif
|
|
267
|
+
|
256
|
268
|
extern int fanSpeed;
|
|
269
|
+
|
257
|
270
|
#ifdef BARICUDA
|
258
|
271
|
extern int ValvePressure;
|
259
|
272
|
extern int EtoPPressure;
|