|
@@ -205,6 +205,7 @@
|
205
|
205
|
* M208 - Set Recover (unretract) Additional (!) Length: S<length> and Feedrate: F<units/min>
|
206
|
206
|
* M209 - Turn Automatic Retract Detection on/off: S<bool> (For slicers that don't support G10/11).
|
207
|
207
|
Every normal extrude-only move will be classified as retract depending on the direction.
|
|
208
|
+ * M211 - Enable, Disable, and/or Report software endstops: [S<bool>]
|
208
|
209
|
* M218 - Set a tool offset: T<index> X<offset> Y<offset>
|
209
|
210
|
* M220 - Set Feedrate Percentage: S<percent> ("FR" on your LCD)
|
210
|
211
|
* M221 - Set Flow Percentage: S<percent>
|
|
@@ -285,8 +286,8 @@ uint8_t marlin_debug_flags = DEBUG_NONE;
|
285
|
286
|
|
286
|
287
|
float current_position[NUM_AXIS] = { 0.0 };
|
287
|
288
|
static float destination[NUM_AXIS] = { 0.0 };
|
288
|
|
-bool axis_known_position[3] = { false };
|
289
|
|
-bool axis_homed[3] = { false };
|
|
289
|
+bool axis_known_position[XYZ] = { false };
|
|
290
|
+bool axis_homed[XYZ] = { false };
|
290
|
291
|
|
291
|
292
|
static long gcode_N, gcode_LastN, Stopped_gcode_LastN = 0;
|
292
|
293
|
|
|
@@ -326,15 +327,18 @@ float filament_size[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(DEFAULT_NOMINAL_FILAMENT_DI
|
326
|
327
|
float volumetric_multiplier[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(1.0);
|
327
|
328
|
|
328
|
329
|
// The distance that XYZ has been offset by G92. Reset by G28.
|
329
|
|
-float position_shift[3] = { 0 };
|
|
330
|
+float position_shift[XYZ] = { 0 };
|
330
|
331
|
|
331
|
332
|
// This offset is added to the configured home position.
|
332
|
333
|
// Set by M206, M428, or menu item. Saved to EEPROM.
|
333
|
|
-float home_offset[3] = { 0 };
|
|
334
|
+float home_offset[XYZ] = { 0 };
|
334
|
335
|
|
335
|
|
-// Software Endstops. Default to configured limits.
|
336
|
|
-float sw_endstop_min[3] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS };
|
337
|
|
-float sw_endstop_max[3] = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS };
|
|
336
|
+// Software Endstops are based on the configured limits.
|
|
337
|
+#if ENABLED(min_software_endstops) || ENABLED(max_software_endstops)
|
|
338
|
+ bool soft_endstops_enabled = true;
|
|
339
|
+#endif
|
|
340
|
+float soft_endstop_min[XYZ] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS },
|
|
341
|
+ soft_endstop_max[XYZ] = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS };
|
338
|
342
|
|
339
|
343
|
#if FAN_COUNT > 0
|
340
|
344
|
int fanSpeeds[FAN_COUNT] = { 0 };
|
|
@@ -458,11 +462,11 @@ static uint8_t target_extruder;
|
458
|
462
|
#define TOWER_2 Y_AXIS
|
459
|
463
|
#define TOWER_3 Z_AXIS
|
460
|
464
|
|
461
|
|
- float delta[3];
|
462
|
|
- float cartesian_position[3] = { 0 };
|
|
465
|
+ float delta[ABC];
|
|
466
|
+ float cartesian_position[XYZ] = { 0 };
|
463
|
467
|
#define SIN_60 0.8660254037844386
|
464
|
468
|
#define COS_60 0.5
|
465
|
|
- float endstop_adj[3] = { 0 };
|
|
469
|
+ float endstop_adj[ABC] = { 0 };
|
466
|
470
|
// these are the default values, can be overriden with M665
|
467
|
471
|
float delta_radius = DELTA_RADIUS;
|
468
|
472
|
float delta_tower1_x = -SIN_60 * (delta_radius + DELTA_RADIUS_TRIM_TOWER_1); // front left tower
|
|
@@ -491,8 +495,8 @@ static uint8_t target_extruder;
|
491
|
495
|
|
492
|
496
|
#if ENABLED(SCARA)
|
493
|
497
|
float delta_segments_per_second = SCARA_SEGMENTS_PER_SECOND;
|
494
|
|
- float delta[3];
|
495
|
|
- float axis_scaling[3] = { 1, 1, 1 }; // Build size scaling, default to 1
|
|
498
|
+ float delta[ABC];
|
|
499
|
+ float axis_scaling[ABC] = { 1, 1, 1 }; // Build size scaling, default to 1
|
496
|
500
|
#endif
|
497
|
501
|
|
498
|
502
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
|
@@ -1411,7 +1415,7 @@ DEFINE_PGM_READ_ANY(float, float);
|
1411
|
1415
|
DEFINE_PGM_READ_ANY(signed char, byte);
|
1412
|
1416
|
|
1413
|
1417
|
#define XYZ_CONSTS_FROM_CONFIG(type, array, CONFIG) \
|
1414
|
|
- static const PROGMEM type array##_P[3] = \
|
|
1418
|
+ static const PROGMEM type array##_P[XYZ] = \
|
1415
|
1419
|
{ X_##CONFIG, Y_##CONFIG, Z_##CONFIG }; \
|
1416
|
1420
|
static inline type array(int axis) \
|
1417
|
1421
|
{ return pgm_read_any(&array##_P[axis]); }
|
|
@@ -1477,21 +1481,21 @@ void update_software_endstops(AxisEnum axis) {
|
1477
|
1481
|
if (axis == X_AXIS) {
|
1478
|
1482
|
float dual_max_x = max(hotend_offset[X_AXIS][1], X2_MAX_POS);
|
1479
|
1483
|
if (active_extruder != 0) {
|
1480
|
|
- sw_endstop_min[X_AXIS] = X2_MIN_POS + offs;
|
1481
|
|
- sw_endstop_max[X_AXIS] = dual_max_x + offs;
|
|
1484
|
+ soft_endstop_min[X_AXIS] = X2_MIN_POS + offs;
|
|
1485
|
+ soft_endstop_max[X_AXIS] = dual_max_x + offs;
|
1482
|
1486
|
return;
|
1483
|
1487
|
}
|
1484
|
1488
|
else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE) {
|
1485
|
|
- sw_endstop_min[X_AXIS] = base_min_pos(X_AXIS) + offs;
|
1486
|
|
- sw_endstop_max[X_AXIS] = min(base_max_pos(X_AXIS), dual_max_x - duplicate_extruder_x_offset) + offs;
|
|
1489
|
+ soft_endstop_min[X_AXIS] = base_min_pos(X_AXIS) + offs;
|
|
1490
|
+ soft_endstop_max[X_AXIS] = min(base_max_pos(X_AXIS), dual_max_x - duplicate_extruder_x_offset) + offs;
|
1487
|
1491
|
return;
|
1488
|
1492
|
}
|
1489
|
1493
|
}
|
1490
|
1494
|
else
|
1491
|
1495
|
#endif
|
1492
|
1496
|
{
|
1493
|
|
- sw_endstop_min[axis] = base_min_pos(axis) + offs;
|
1494
|
|
- sw_endstop_max[axis] = base_max_pos(axis) + offs;
|
|
1497
|
+ soft_endstop_min[axis] = base_min_pos(axis) + offs;
|
|
1498
|
+ soft_endstop_max[axis] = base_max_pos(axis) + offs;
|
1495
|
1499
|
}
|
1496
|
1500
|
|
1497
|
1501
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
@@ -1499,16 +1503,15 @@ void update_software_endstops(AxisEnum axis) {
|
1499
|
1503
|
SERIAL_ECHOPAIR("For ", axis_codes[axis]);
|
1500
|
1504
|
SERIAL_ECHOPAIR(" axis:\n home_offset = ", home_offset[axis]);
|
1501
|
1505
|
SERIAL_ECHOPAIR("\n position_shift = ", position_shift[axis]);
|
1502
|
|
- SERIAL_ECHOPAIR("\n sw_endstop_min = ", sw_endstop_min[axis]);
|
1503
|
|
- SERIAL_ECHOPAIR("\n sw_endstop_max = ", sw_endstop_max[axis]);
|
|
1506
|
+ SERIAL_ECHOPAIR("\n soft_endstop_min = ", soft_endstop_min[axis]);
|
|
1507
|
+ SERIAL_ECHOPAIR("\n soft_endstop_max = ", soft_endstop_max[axis]);
|
1504
|
1508
|
SERIAL_EOL;
|
1505
|
1509
|
}
|
1506
|
1510
|
#endif
|
1507
|
1511
|
|
1508
|
1512
|
#if ENABLED(DELTA)
|
1509
|
|
- if (axis == Z_AXIS) {
|
1510
|
|
- delta_clip_start_height = sw_endstop_max[axis] - delta_safe_distance_from_top();
|
1511
|
|
- }
|
|
1513
|
+ if (axis == Z_AXIS)
|
|
1514
|
+ delta_clip_start_height = soft_endstop_max[axis] - delta_safe_distance_from_top();
|
1512
|
1515
|
#endif
|
1513
|
1516
|
|
1514
|
1517
|
}
|
|
@@ -1552,7 +1555,7 @@ static void set_axis_is_at_home(AxisEnum axis) {
|
1552
|
1555
|
|
1553
|
1556
|
if (axis == X_AXIS || axis == Y_AXIS) {
|
1554
|
1557
|
|
1555
|
|
- float homeposition[3];
|
|
1558
|
+ float homeposition[XYZ];
|
1556
|
1559
|
LOOP_XYZ(i) homeposition[i] = LOGICAL_POSITION(base_home_pos(i), i);
|
1557
|
1560
|
|
1558
|
1561
|
// SERIAL_ECHOPGM("homeposition[x]= "); SERIAL_ECHO(homeposition[0]);
|
|
@@ -1574,8 +1577,8 @@ static void set_axis_is_at_home(AxisEnum axis) {
|
1574
|
1577
|
* SCARA home positions are based on configuration since the actual
|
1575
|
1578
|
* limits are determined by the inverse kinematic transform.
|
1576
|
1579
|
*/
|
1577
|
|
- sw_endstop_min[axis] = base_min_pos(axis); // + (delta[axis] - base_home_pos(axis));
|
1578
|
|
- sw_endstop_max[axis] = base_max_pos(axis); // + (delta[axis] - base_home_pos(axis));
|
|
1580
|
+ soft_endstop_min[axis] = base_min_pos(axis); // + (delta[axis] - base_home_pos(axis));
|
|
1581
|
+ soft_endstop_max[axis] = base_max_pos(axis); // + (delta[axis] - base_home_pos(axis));
|
1579
|
1582
|
}
|
1580
|
1583
|
else
|
1581
|
1584
|
#endif
|
|
@@ -3323,7 +3326,7 @@ inline void gcode_G28() {
|
3323
|
3326
|
switch (state) {
|
3324
|
3327
|
case MeshReport:
|
3325
|
3328
|
if (mbl.has_mesh()) {
|
3326
|
|
- SERIAL_PROTOCOLPAIR("State: ", mbl.active() ? "On" : "Off");
|
|
3329
|
+ SERIAL_PROTOCOLPAIR("State: ", mbl.active() ? MSG_ON : MSG_OFF);
|
3327
|
3330
|
SERIAL_PROTOCOLLNPGM("\nNum X,Y: " STRINGIFY(MESH_NUM_X_POINTS) "," STRINGIFY(MESH_NUM_Y_POINTS));
|
3328
|
3331
|
SERIAL_PROTOCOLLNPGM("Z search height: " STRINGIFY(MESH_HOME_SEARCH_Z));
|
3329
|
3332
|
SERIAL_PROTOCOLPGM("Z offset: "); SERIAL_PROTOCOL_F(mbl.z_offset, 5);
|
|
@@ -5554,24 +5557,40 @@ inline void gcode_M206() {
|
5554
|
5557
|
*/
|
5555
|
5558
|
inline void gcode_M209() {
|
5556
|
5559
|
if (code_seen('S')) {
|
5557
|
|
- int t = code_value_int();
|
5558
|
|
- switch (t) {
|
5559
|
|
- case 0:
|
5560
|
|
- autoretract_enabled = false;
|
5561
|
|
- break;
|
5562
|
|
- case 1:
|
5563
|
|
- autoretract_enabled = true;
|
5564
|
|
- break;
|
5565
|
|
- default:
|
5566
|
|
- unknown_command_error();
|
5567
|
|
- return;
|
5568
|
|
- }
|
|
5560
|
+ autoretract_enabled = code_value_bool();
|
5569
|
5561
|
for (int i = 0; i < EXTRUDERS; i++) retracted[i] = false;
|
5570
|
5562
|
}
|
5571
|
5563
|
}
|
5572
|
5564
|
|
5573
|
5565
|
#endif // FWRETRACT
|
5574
|
5566
|
|
|
5567
|
+/**
|
|
5568
|
+ * M211: Enable, Disable, and/or Report software endstops
|
|
5569
|
+ *
|
|
5570
|
+ * Usage: M211 S1 to enable, M211 S0 to disable, M211 alone for report
|
|
5571
|
+ */
|
|
5572
|
+inline void gcode_M211() {
|
|
5573
|
+ SERIAL_ECHO_START;
|
|
5574
|
+ #if ENABLED(min_software_endstops) || ENABLED(max_software_endstops)
|
|
5575
|
+ if (code_seen('S')) soft_endstops_enabled = code_value_bool();
|
|
5576
|
+ #endif
|
|
5577
|
+ #if ENABLED(min_software_endstops) || ENABLED(max_software_endstops)
|
|
5578
|
+ SERIAL_ECHOPGM(MSG_SOFT_ENDSTOPS ": ");
|
|
5579
|
+ serialprintPGM(soft_endstops_enabled ? PSTR(MSG_ON) : PSTR(MSG_OFF));
|
|
5580
|
+ #else
|
|
5581
|
+ SERIAL_ECHOPGM(MSG_SOFT_ENDSTOPS ": " MSG_OFF);
|
|
5582
|
+ #endif
|
|
5583
|
+ SERIAL_ECHOPGM(" " MSG_SOFT_MIN ": ");
|
|
5584
|
+ SERIAL_ECHOPAIR( MSG_X, soft_endstop_min[X_AXIS]);
|
|
5585
|
+ SERIAL_ECHOPAIR(" " MSG_Y, soft_endstop_min[Y_AXIS]);
|
|
5586
|
+ SERIAL_ECHOPAIR(" " MSG_Z, soft_endstop_min[Z_AXIS]);
|
|
5587
|
+ SERIAL_ECHOPGM(" " MSG_SOFT_MAX ": ");
|
|
5588
|
+ SERIAL_ECHOPAIR( MSG_X, soft_endstop_max[X_AXIS]);
|
|
5589
|
+ SERIAL_ECHOPAIR(" " MSG_Y, soft_endstop_max[Y_AXIS]);
|
|
5590
|
+ SERIAL_ECHOPAIR(" " MSG_Z, soft_endstop_max[Z_AXIS]);
|
|
5591
|
+ SERIAL_EOL;
|
|
5592
|
+}
|
|
5593
|
+
|
5575
|
5594
|
#if HOTENDS > 1
|
5576
|
5595
|
|
5577
|
5596
|
/**
|
|
@@ -6175,7 +6194,7 @@ inline void gcode_M428() {
|
6175
|
6194
|
bool err = false;
|
6176
|
6195
|
LOOP_XYZ(i) {
|
6177
|
6196
|
if (axis_homed[i]) {
|
6178
|
|
- float base = (current_position[i] > (sw_endstop_min[i] + sw_endstop_max[i]) * 0.5) ? base_home_pos(i) : 0,
|
|
6197
|
+ float base = (current_position[i] > (soft_endstop_min[i] + soft_endstop_max[i]) * 0.5) ? base_home_pos(i) : 0,
|
6179
|
6198
|
diff = current_position[i] - LOGICAL_POSITION(base, i);
|
6180
|
6199
|
if (diff > -20 && diff < 20) {
|
6181
|
6200
|
set_home_offset((AxisEnum)i, home_offset[i] - diff);
|
|
@@ -6499,8 +6518,7 @@ inline void gcode_M503() {
|
6499
|
6518
|
stepper.synchronize();
|
6500
|
6519
|
extruder_duplication_enabled = code_seen('S') && code_value_int() == 2;
|
6501
|
6520
|
SERIAL_ECHO_START;
|
6502
|
|
- SERIAL_ECHOPAIR(MSG_DUPLICATION_MODE, extruder_duplication_enabled ? MSG_ON : MSG_OFF);
|
6503
|
|
- SERIAL_EOL;
|
|
6521
|
+ SERIAL_ECHOLNPAIR(MSG_DUPLICATION_MODE, extruder_duplication_enabled ? MSG_ON : MSG_OFF);
|
6504
|
6522
|
}
|
6505
|
6523
|
|
6506
|
6524
|
#endif // M605
|
|
@@ -7495,6 +7513,10 @@ void process_next_command() {
|
7495
|
7513
|
break;
|
7496
|
7514
|
#endif // FWRETRACT
|
7497
|
7515
|
|
|
7516
|
+ case 211: // M211 - Enable, Disable, and/or Report software endstops
|
|
7517
|
+ gcode_M211();
|
|
7518
|
+ break;
|
|
7519
|
+
|
7498
|
7520
|
#if HOTENDS > 1
|
7499
|
7521
|
case 218: // M218 - Set a tool offset: T<index> X<offset> Y<offset>
|
7500
|
7522
|
gcode_M218();
|
|
@@ -7749,18 +7771,22 @@ void ok_to_send() {
|
7749
|
7771
|
SERIAL_EOL;
|
7750
|
7772
|
}
|
7751
|
7773
|
|
7752
|
|
-void clamp_to_software_endstops(float target[3]) {
|
7753
|
|
- if (min_software_endstops) {
|
7754
|
|
- NOLESS(target[X_AXIS], sw_endstop_min[X_AXIS]);
|
7755
|
|
- NOLESS(target[Y_AXIS], sw_endstop_min[Y_AXIS]);
|
7756
|
|
- NOLESS(target[Z_AXIS], sw_endstop_min[Z_AXIS]);
|
7757
|
|
- }
|
7758
|
|
- if (max_software_endstops) {
|
7759
|
|
- NOMORE(target[X_AXIS], sw_endstop_max[X_AXIS]);
|
7760
|
|
- NOMORE(target[Y_AXIS], sw_endstop_max[Y_AXIS]);
|
7761
|
|
- NOMORE(target[Z_AXIS], sw_endstop_max[Z_AXIS]);
|
|
7774
|
+#if ENABLED(min_software_endstops) || ENABLED(max_software_endstops)
|
|
7775
|
+
|
|
7776
|
+ void clamp_to_software_endstops(float target[XYZ]) {
|
|
7777
|
+ #if ENABLED(min_software_endstops)
|
|
7778
|
+ NOLESS(target[X_AXIS], soft_endstop_min[X_AXIS]);
|
|
7779
|
+ NOLESS(target[Y_AXIS], soft_endstop_min[Y_AXIS]);
|
|
7780
|
+ NOLESS(target[Z_AXIS], soft_endstop_min[Z_AXIS]);
|
|
7781
|
+ #endif
|
|
7782
|
+ #if ENABLED(max_software_endstops)
|
|
7783
|
+ NOMORE(target[X_AXIS], soft_endstop_max[X_AXIS]);
|
|
7784
|
+ NOMORE(target[Y_AXIS], soft_endstop_max[Y_AXIS]);
|
|
7785
|
+ NOMORE(target[Z_AXIS], soft_endstop_max[Z_AXIS]);
|
|
7786
|
+ #endif
|
7762
|
7787
|
}
|
7763
|
|
-}
|
|
7788
|
+
|
|
7789
|
+#endif
|
7764
|
7790
|
|
7765
|
7791
|
#if ENABLED(DELTA)
|
7766
|
7792
|
|
|
@@ -7776,9 +7802,9 @@ void clamp_to_software_endstops(float target[3]) {
|
7776
|
7802
|
delta_diagonal_rod_2_tower_3 = sq(diagonal_rod + delta_diagonal_rod_trim_tower_3);
|
7777
|
7803
|
}
|
7778
|
7804
|
|
7779
|
|
- void inverse_kinematics(const float in_cartesian[3]) {
|
|
7805
|
+ void inverse_kinematics(const float in_cartesian[XYZ]) {
|
7780
|
7806
|
|
7781
|
|
- const float cartesian[3] = {
|
|
7807
|
+ const float cartesian[XYZ] = {
|
7782
|
7808
|
RAW_X_POSITION(in_cartesian[X_AXIS]),
|
7783
|
7809
|
RAW_Y_POSITION(in_cartesian[Y_AXIS]),
|
7784
|
7810
|
RAW_Z_POSITION(in_cartesian[Z_AXIS])
|
|
@@ -7808,7 +7834,7 @@ void clamp_to_software_endstops(float target[3]) {
|
7808
|
7834
|
}
|
7809
|
7835
|
|
7810
|
7836
|
float delta_safe_distance_from_top() {
|
7811
|
|
- float cartesian[3] = {
|
|
7837
|
+ float cartesian[XYZ] = {
|
7812
|
7838
|
LOGICAL_X_POSITION(0),
|
7813
|
7839
|
LOGICAL_Y_POSITION(0),
|
7814
|
7840
|
LOGICAL_Z_POSITION(0)
|
|
@@ -7889,20 +7915,20 @@ void clamp_to_software_endstops(float target[3]) {
|
7889
|
7915
|
cartesian_position[Z_AXIS] = z1 + ex[2]*Xnew + ey[2]*Ynew - ez[2]*Znew;
|
7890
|
7916
|
};
|
7891
|
7917
|
|
7892
|
|
- void forward_kinematics_DELTA(float point[3]) {
|
7893
|
|
- forward_kinematics_DELTA(point[X_AXIS], point[Y_AXIS], point[Z_AXIS]);
|
|
7918
|
+ void forward_kinematics_DELTA(float point[ABC]) {
|
|
7919
|
+ forward_kinematics_DELTA(point[A_AXIS], point[B_AXIS], point[C_AXIS]);
|
7894
|
7920
|
}
|
7895
|
7921
|
|
7896
|
7922
|
void set_cartesian_from_steppers() {
|
7897
|
|
- forward_kinematics_DELTA(stepper.get_axis_position_mm(X_AXIS),
|
7898
|
|
- stepper.get_axis_position_mm(Y_AXIS),
|
7899
|
|
- stepper.get_axis_position_mm(Z_AXIS));
|
|
7923
|
+ forward_kinematics_DELTA(stepper.get_axis_position_mm(A_AXIS),
|
|
7924
|
+ stepper.get_axis_position_mm(B_AXIS),
|
|
7925
|
+ stepper.get_axis_position_mm(C_AXIS));
|
7900
|
7926
|
}
|
7901
|
7927
|
|
7902
|
7928
|
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
|
7903
|
7929
|
|
7904
|
7930
|
// Adjust print surface height by linear interpolation over the bed_level array.
|
7905
|
|
- void adjust_delta(float cartesian[3]) {
|
|
7931
|
+ void adjust_delta(float cartesian[XYZ]) {
|
7906
|
7932
|
if (delta_grid_spacing[X_AXIS] == 0 || delta_grid_spacing[Y_AXIS] == 0) return; // G29 not done!
|
7907
|
7933
|
|
7908
|
7934
|
int half = (AUTO_BED_LEVELING_GRID_POINTS - 1) / 2;
|
|
@@ -8375,8 +8401,8 @@ void prepare_move_to_destination() {
|
8375
|
8401
|
|
8376
|
8402
|
#if ENABLED(SCARA)
|
8377
|
8403
|
|
8378
|
|
- void forward_kinematics_SCARA(float f_scara[3]) {
|
8379
|
|
- // Perform forward kinematics, and place results in delta[3]
|
|
8404
|
+ void forward_kinematics_SCARA(float f_scara[ABC]) {
|
|
8405
|
+ // Perform forward kinematics, and place results in delta[]
|
8380
|
8406
|
// The maths and first version has been done by QHARLEY . Integrated into masterbranch 06/2014 and slightly restructured by Joachim Cerny in June 2014
|
8381
|
8407
|
|
8382
|
8408
|
float x_sin, x_cos, y_sin, y_cos;
|
|
@@ -8401,9 +8427,9 @@ void prepare_move_to_destination() {
|
8401
|
8427
|
//SERIAL_ECHOPGM(" delta[Y_AXIS]="); SERIAL_ECHOLN(delta[Y_AXIS]);
|
8402
|
8428
|
}
|
8403
|
8429
|
|
8404
|
|
- void inverse_kinematics(const float cartesian[3]) {
|
|
8430
|
+ void inverse_kinematics(const float cartesian[XYZ]) {
|
8405
|
8431
|
// Inverse kinematics.
|
8406
|
|
- // Perform SCARA IK and place results in delta[3].
|
|
8432
|
+ // Perform SCARA IK and place results in delta[].
|
8407
|
8433
|
// The maths and first version were done by QHARLEY.
|
8408
|
8434
|
// Integrated, tweaked by Joachim Cerny in June 2014.
|
8409
|
8435
|
|