|
@@ -555,6 +555,26 @@ static bool send_ok[BUFSIZE];
|
555
|
555
|
#define KEEPALIVE_STATE(n) ;
|
556
|
556
|
#endif // HOST_KEEPALIVE_FEATURE
|
557
|
557
|
|
|
558
|
+#define DEFINE_PGM_READ_ANY(type, reader) \
|
|
559
|
+ static inline type pgm_read_any(const type *p) \
|
|
560
|
+ { return pgm_read_##reader##_near(p); }
|
|
561
|
+
|
|
562
|
+DEFINE_PGM_READ_ANY(float, float);
|
|
563
|
+DEFINE_PGM_READ_ANY(signed char, byte);
|
|
564
|
+
|
|
565
|
+#define XYZ_CONSTS_FROM_CONFIG(type, array, CONFIG) \
|
|
566
|
+ static const PROGMEM type array##_P[XYZ] = \
|
|
567
|
+ { X_##CONFIG, Y_##CONFIG, Z_##CONFIG }; \
|
|
568
|
+ static inline type array(int axis) \
|
|
569
|
+ { return pgm_read_any(&array##_P[axis]); }
|
|
570
|
+
|
|
571
|
+XYZ_CONSTS_FROM_CONFIG(float, base_min_pos, MIN_POS);
|
|
572
|
+XYZ_CONSTS_FROM_CONFIG(float, base_max_pos, MAX_POS);
|
|
573
|
+XYZ_CONSTS_FROM_CONFIG(float, base_home_pos, HOME_POS);
|
|
574
|
+XYZ_CONSTS_FROM_CONFIG(float, max_length, MAX_LENGTH);
|
|
575
|
+XYZ_CONSTS_FROM_CONFIG(float, home_bump_mm, HOME_BUMP_MM);
|
|
576
|
+XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
|
|
577
|
+
|
558
|
578
|
/**
|
559
|
579
|
* ***************************************************************************
|
560
|
580
|
* ******************************** FUNCTIONS ********************************
|
|
@@ -1406,26 +1426,6 @@ bool get_target_extruder_from_command(int code) {
|
1406
|
1426
|
return false;
|
1407
|
1427
|
}
|
1408
|
1428
|
|
1409
|
|
-#define DEFINE_PGM_READ_ANY(type, reader) \
|
1410
|
|
- static inline type pgm_read_any(const type *p) \
|
1411
|
|
- { return pgm_read_##reader##_near(p); }
|
1412
|
|
-
|
1413
|
|
-DEFINE_PGM_READ_ANY(float, float);
|
1414
|
|
-DEFINE_PGM_READ_ANY(signed char, byte);
|
1415
|
|
-
|
1416
|
|
-#define XYZ_CONSTS_FROM_CONFIG(type, array, CONFIG) \
|
1417
|
|
- static const PROGMEM type array##_P[XYZ] = \
|
1418
|
|
- { X_##CONFIG, Y_##CONFIG, Z_##CONFIG }; \
|
1419
|
|
- static inline type array(int axis) \
|
1420
|
|
- { return pgm_read_any(&array##_P[axis]); }
|
1421
|
|
-
|
1422
|
|
-XYZ_CONSTS_FROM_CONFIG(float, base_min_pos, MIN_POS);
|
1423
|
|
-XYZ_CONSTS_FROM_CONFIG(float, base_max_pos, MAX_POS);
|
1424
|
|
-XYZ_CONSTS_FROM_CONFIG(float, base_home_pos, HOME_POS);
|
1425
|
|
-XYZ_CONSTS_FROM_CONFIG(float, max_length, MAX_LENGTH);
|
1426
|
|
-XYZ_CONSTS_FROM_CONFIG(float, home_bump_mm, HOME_BUMP_MM);
|
1427
|
|
-XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
|
1428
|
|
-
|
1429
|
1429
|
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
|
1430
|
1430
|
bool extruder_duplication_enabled = false; // Used in Dual X mode 2
|
1431
|
1431
|
#endif
|