Browse Source

Merge pull request #8889 from thinkyhead/bf2_action_on_action

[2.0.x] //Actions on Pause / Resume (M600, M125, etc.)
Scott Lahteine 7 years ago
parent
commit
68438b0d4e
No account linked to committer's email address
48 changed files with 385 additions and 90 deletions
  1. 8
    0
      Marlin/Configuration_adv.h
  2. 8
    0
      Marlin/src/config/default/Configuration_adv.h
  3. 8
    0
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  4. 8
    0
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  5. 8
    0
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  6. 8
    0
      Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h
  7. 8
    0
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  8. 8
    0
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  9. 8
    0
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  10. 8
    0
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  11. 8
    0
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  12. 8
    0
      Marlin/src/config/examples/Felix/Configuration_adv.h
  13. 8
    0
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
  14. 8
    0
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  15. 8
    0
      Marlin/src/config/examples/MakerParts/Configuration_adv.h
  16. 8
    0
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  17. 8
    0
      Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
  18. 8
    0
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
  19. 8
    0
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  20. 8
    0
      Marlin/src/config/examples/RigidBot/Configuration_adv.h
  21. 8
    0
      Marlin/src/config/examples/SCARA/Configuration_adv.h
  22. 8
    0
      Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
  23. 8
    0
      Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
  24. 8
    0
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
  25. 8
    0
      Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
  26. 8
    0
      Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
  27. 8
    0
      Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
  28. 8
    0
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
  29. 8
    0
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
  30. 8
    0
      Marlin/src/config/examples/delta/generic/Configuration_adv.h
  31. 8
    0
      Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
  32. 8
    0
      Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
  33. 8
    0
      Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
  34. 8
    0
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
  35. 8
    0
      Marlin/src/config/examples/makibox/Configuration_adv.h
  36. 8
    0
      Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
  37. 8
    0
      Marlin/src/config/examples/wt150/Configuration_adv.h
  38. 13
    15
      Marlin/src/feature/bedlevel/bedlevel.cpp
  39. 4
    3
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
  40. 8
    0
      Marlin/src/feature/pause.cpp
  41. 1
    1
      Marlin/src/gcode/bedlevel/M420.cpp
  42. 7
    10
      Marlin/src/gcode/bedlevel/abl/G29.cpp
  43. 5
    9
      Marlin/src/gcode/feature/pause/M125.cpp
  44. 1
    1
      Marlin/src/lcd/ultralcd.cpp
  45. 34
    37
      Marlin/src/module/configuration_store.cpp
  46. 8
    8
      Marlin/src/module/configuration_store.h
  47. 4
    1
      Marlin/src/pins/pins_GT2560_REV_A.h
  48. 4
    5
      Marlin/src/pins/pins_GT2560_REV_A_PLUS.h

+ 8
- 0
Marlin/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/default/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/Anet/A6/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/Anet/A8/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h View File

1431
  */
1431
  */
1432
 //#define ACTION_ON_KILL "poweroff"
1432
 //#define ACTION_ON_KILL "poweroff"
1433
 
1433
 
1434
+/**
1435
+ * Specify an action command to send to the host on pause and resume.
1436
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1437
+ * The host must be configured to handle the action command.
1438
+ */
1439
+//#define ACTION_ON_PAUSE "pause"
1440
+//#define ACTION_ON_RESUME "resume"
1441
+
1434
 //===========================================================================
1442
 //===========================================================================
1435
 //====================== I2C Position Encoder Settings ======================
1443
 //====================== I2C Position Encoder Settings ======================
1436
 //===========================================================================
1444
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/Cartesio/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h View File

1433
  */
1433
  */
1434
 //#define ACTION_ON_KILL "poweroff"
1434
 //#define ACTION_ON_KILL "poweroff"
1435
 
1435
 
1436
+/**
1437
+ * Specify an action command to send to the host on pause and resume.
1438
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1439
+ * The host must be configured to handle the action command.
1440
+ */
1441
+//#define ACTION_ON_PAUSE "pause"
1442
+//#define ACTION_ON_RESUME "resume"
1443
+
1436
 //===========================================================================
1444
 //===========================================================================
1437
 //====================== I2C Position Encoder Settings ======================
1445
 //====================== I2C Position Encoder Settings ======================
1438
 //===========================================================================
1446
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/Felix/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/MakerParts/Configuration_adv.h View File

1402
  */
1402
  */
1403
 //#define ACTION_ON_KILL "poweroff"
1403
 //#define ACTION_ON_KILL "poweroff"
1404
 
1404
 
1405
+/**
1406
+ * Specify an action command to send to the host on pause and resume.
1407
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1408
+ * The host must be configured to handle the action command.
1409
+ */
1410
+//#define ACTION_ON_PAUSE "pause"
1411
+//#define ACTION_ON_RESUME "resume"
1412
+
1405
 //===========================================================================
1413
 //===========================================================================
1406
 //====================== I2C Position Encoder Settings ======================
1414
 //====================== I2C Position Encoder Settings ======================
1407
 //===========================================================================
1415
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h View File

1427
  */
1427
  */
1428
 //#define ACTION_ON_KILL "poweroff"
1428
 //#define ACTION_ON_KILL "poweroff"
1429
 
1429
 
1430
+/**
1431
+ * Specify an action command to send to the host on pause and resume.
1432
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1433
+ * The host must be configured to handle the action command.
1434
+ */
1435
+//#define ACTION_ON_PAUSE "pause"
1436
+//#define ACTION_ON_RESUME "resume"
1437
+
1430
 //===========================================================================
1438
 //===========================================================================
1431
 //====================== I2C Position Encoder Settings ======================
1439
 //====================== I2C Position Encoder Settings ======================
1432
 //===========================================================================
1440
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/Malyan/M200/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h View File

1431
  */
1431
  */
1432
 //#define ACTION_ON_KILL "poweroff"
1432
 //#define ACTION_ON_KILL "poweroff"
1433
 
1433
 
1434
+/**
1435
+ * Specify an action command to send to the host on pause and resume.
1436
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1437
+ * The host must be configured to handle the action command.
1438
+ */
1439
+//#define ACTION_ON_PAUSE "pause"
1440
+//#define ACTION_ON_RESUME "resume"
1441
+
1434
 //===========================================================================
1442
 //===========================================================================
1435
 //====================== I2C Position Encoder Settings ======================
1443
 //====================== I2C Position Encoder Settings ======================
1436
 //===========================================================================
1444
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h View File

1438
  */
1438
  */
1439
 //#define ACTION_ON_KILL "poweroff"
1439
 //#define ACTION_ON_KILL "poweroff"
1440
 
1440
 
1441
+/**
1442
+ * Specify an action command to send to the host on pause and resume.
1443
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1444
+ * The host must be configured to handle the action command.
1445
+ */
1446
+//#define ACTION_ON_PAUSE "pause"
1447
+//#define ACTION_ON_RESUME "resume"
1448
+
1441
 //===========================================================================
1449
 //===========================================================================
1442
 //====================== I2C Position Encoder Settings ======================
1450
 //====================== I2C Position Encoder Settings ======================
1443
 //===========================================================================
1451
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/RigidBot/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/SCARA/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/Sanguinololu/Configuration_adv.h View File

1419
  */
1419
  */
1420
 //#define ACTION_ON_KILL "poweroff"
1420
 //#define ACTION_ON_KILL "poweroff"
1421
 
1421
 
1422
+/**
1423
+ * Specify an action command to send to the host on pause and resume.
1424
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1425
+ * The host must be configured to handle the action command.
1426
+ */
1427
+//#define ACTION_ON_PAUSE "pause"
1428
+//#define ACTION_ON_RESUME "resume"
1429
+
1422
 //===========================================================================
1430
 //===========================================================================
1423
 //====================== I2C Position Encoder Settings ======================
1431
 //====================== I2C Position Encoder Settings ======================
1424
 //===========================================================================
1432
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/TinyBoy2/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h View File

1441
  */
1441
  */
1442
 //#define ACTION_ON_KILL "poweroff"
1442
 //#define ACTION_ON_KILL "poweroff"
1443
 
1443
 
1444
+/**
1445
+ * Specify an action command to send to the host on pause and resume.
1446
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1447
+ * The host must be configured to handle the action command.
1448
+ */
1449
+//#define ACTION_ON_PAUSE "pause"
1450
+//#define ACTION_ON_RESUME "resume"
1451
+
1444
 //===========================================================================
1452
 //===========================================================================
1445
 //====================== I2C Position Encoder Settings ======================
1453
 //====================== I2C Position Encoder Settings ======================
1446
 //===========================================================================
1454
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h View File

1431
  */
1431
  */
1432
 //#define ACTION_ON_KILL "poweroff"
1432
 //#define ACTION_ON_KILL "poweroff"
1433
 
1433
 
1434
+/**
1435
+ * Specify an action command to send to the host on pause and resume.
1436
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1437
+ * The host must be configured to handle the action command.
1438
+ */
1439
+//#define ACTION_ON_PAUSE "pause"
1440
+//#define ACTION_ON_RESUME "resume"
1441
+
1434
 //===========================================================================
1442
 //===========================================================================
1435
 //====================== I2C Position Encoder Settings ======================
1443
 //====================== I2C Position Encoder Settings ======================
1436
 //===========================================================================
1444
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h View File

1432
  */
1432
  */
1433
 //#define ACTION_ON_KILL "poweroff"
1433
 //#define ACTION_ON_KILL "poweroff"
1434
 
1434
 
1435
+/**
1436
+ * Specify an action command to send to the host on pause and resume.
1437
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1438
+ * The host must be configured to handle the action command.
1439
+ */
1440
+//#define ACTION_ON_PAUSE "pause"
1441
+//#define ACTION_ON_RESUME "resume"
1442
+
1435
 //===========================================================================
1443
 //===========================================================================
1436
 //====================== I2C Position Encoder Settings ======================
1444
 //====================== I2C Position Encoder Settings ======================
1437
 //===========================================================================
1445
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h View File

1432
  */
1432
  */
1433
 //#define ACTION_ON_KILL "poweroff"
1433
 //#define ACTION_ON_KILL "poweroff"
1434
 
1434
 
1435
+/**
1436
+ * Specify an action command to send to the host on pause and resume.
1437
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1438
+ * The host must be configured to handle the action command.
1439
+ */
1440
+//#define ACTION_ON_PAUSE "pause"
1441
+//#define ACTION_ON_RESUME "resume"
1442
+
1435
 //===========================================================================
1443
 //===========================================================================
1436
 //====================== I2C Position Encoder Settings ======================
1444
 //====================== I2C Position Encoder Settings ======================
1437
 //===========================================================================
1445
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h View File

1432
  */
1432
  */
1433
 //#define ACTION_ON_KILL "poweroff"
1433
 //#define ACTION_ON_KILL "poweroff"
1434
 
1434
 
1435
+/**
1436
+ * Specify an action command to send to the host on pause and resume.
1437
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1438
+ * The host must be configured to handle the action command.
1439
+ */
1440
+//#define ACTION_ON_PAUSE "pause"
1441
+//#define ACTION_ON_RESUME "resume"
1442
+
1435
 //===========================================================================
1443
 //===========================================================================
1436
 //====================== I2C Position Encoder Settings ======================
1444
 //====================== I2C Position Encoder Settings ======================
1437
 //===========================================================================
1445
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/delta/generic/Configuration_adv.h View File

1432
  */
1432
  */
1433
 //#define ACTION_ON_KILL "poweroff"
1433
 //#define ACTION_ON_KILL "poweroff"
1434
 
1434
 
1435
+/**
1436
+ * Specify an action command to send to the host on pause and resume.
1437
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1438
+ * The host must be configured to handle the action command.
1439
+ */
1440
+//#define ACTION_ON_PAUSE "pause"
1441
+//#define ACTION_ON_RESUME "resume"
1442
+
1435
 //===========================================================================
1443
 //===========================================================================
1436
 //====================== I2C Position Encoder Settings ======================
1444
 //====================== I2C Position Encoder Settings ======================
1437
 //===========================================================================
1445
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h View File

1432
  */
1432
  */
1433
 //#define ACTION_ON_KILL "poweroff"
1433
 //#define ACTION_ON_KILL "poweroff"
1434
 
1434
 
1435
+/**
1436
+ * Specify an action command to send to the host on pause and resume.
1437
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1438
+ * The host must be configured to handle the action command.
1439
+ */
1440
+//#define ACTION_ON_PAUSE "pause"
1441
+//#define ACTION_ON_RESUME "resume"
1442
+
1435
 //===========================================================================
1443
 //===========================================================================
1436
 //====================== I2C Position Encoder Settings ======================
1444
 //====================== I2C Position Encoder Settings ======================
1437
 //===========================================================================
1445
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h View File

1437
  */
1437
  */
1438
 //#define ACTION_ON_KILL "poweroff"
1438
 //#define ACTION_ON_KILL "poweroff"
1439
 
1439
 
1440
+/**
1441
+ * Specify an action command to send to the host on pause and resume.
1442
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1443
+ * The host must be configured to handle the action command.
1444
+ */
1445
+//#define ACTION_ON_PAUSE "pause"
1446
+//#define ACTION_ON_RESUME "resume"
1447
+
1440
 //===========================================================================
1448
 //===========================================================================
1441
 //====================== I2C Position Encoder Settings ======================
1449
 //====================== I2C Position Encoder Settings ======================
1442
 //===========================================================================
1450
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h View File

1432
  */
1432
  */
1433
 //#define ACTION_ON_KILL "poweroff"
1433
 //#define ACTION_ON_KILL "poweroff"
1434
 
1434
 
1435
+/**
1436
+ * Specify an action command to send to the host on pause and resume.
1437
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1438
+ * The host must be configured to handle the action command.
1439
+ */
1440
+//#define ACTION_ON_PAUSE "pause"
1441
+//#define ACTION_ON_RESUME "resume"
1442
+
1435
 //===========================================================================
1443
 //===========================================================================
1436
 //====================== I2C Position Encoder Settings ======================
1444
 //====================== I2C Position Encoder Settings ======================
1437
 //===========================================================================
1445
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/makibox/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h View File

1430
  */
1430
  */
1431
 //#define ACTION_ON_KILL "poweroff"
1431
 //#define ACTION_ON_KILL "poweroff"
1432
 
1432
 
1433
+/**
1434
+ * Specify an action command to send to the host on pause and resume.
1435
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1436
+ * The host must be configured to handle the action command.
1437
+ */
1438
+//#define ACTION_ON_PAUSE "pause"
1439
+//#define ACTION_ON_RESUME "resume"
1440
+
1433
 //===========================================================================
1441
 //===========================================================================
1434
 //====================== I2C Position Encoder Settings ======================
1442
 //====================== I2C Position Encoder Settings ======================
1435
 //===========================================================================
1443
 //===========================================================================

+ 8
- 0
Marlin/src/config/examples/wt150/Configuration_adv.h View File

1431
  */
1431
  */
1432
 //#define ACTION_ON_KILL "poweroff"
1432
 //#define ACTION_ON_KILL "poweroff"
1433
 
1433
 
1434
+/**
1435
+ * Specify an action command to send to the host on pause and resume.
1436
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
1437
+ * The host must be configured to handle the action command.
1438
+ */
1439
+//#define ACTION_ON_PAUSE "pause"
1440
+//#define ACTION_ON_RESUME "resume"
1441
+
1434
 //===========================================================================
1442
 //===========================================================================
1435
 //====================== I2C Position Encoder Settings ======================
1443
 //====================== I2C Position Encoder Settings ======================
1436
 //===========================================================================
1444
 //===========================================================================

+ 13
- 15
Marlin/src/feature/bedlevel/bedlevel.cpp View File

173
  * Reset calibration results to zero.
173
  * Reset calibration results to zero.
174
  */
174
  */
175
 void reset_bed_level() {
175
 void reset_bed_level() {
176
+  #if ENABLED(DEBUG_LEVELING_FEATURE)
177
+    if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("reset_bed_level");
178
+  #endif
176
   set_bed_leveling_enabled(false);
179
   set_bed_leveling_enabled(false);
177
   #if ENABLED(MESH_BED_LEVELING)
180
   #if ENABLED(MESH_BED_LEVELING)
178
     if (leveling_is_valid()) {
181
     if (leveling_is_valid()) {
179
       mbl.reset();
182
       mbl.reset();
180
       mbl.has_mesh = false;
183
       mbl.has_mesh = false;
181
     }
184
     }
182
-  #else
183
-    #if ENABLED(DEBUG_LEVELING_FEATURE)
184
-      if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("reset_bed_level");
185
-    #endif
186
-    #if ABL_PLANAR
187
-      planner.bed_level_matrix.set_to_identity();
188
-    #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
189
-      bilinear_start[X_AXIS] = bilinear_start[Y_AXIS] =
190
-      bilinear_grid_spacing[X_AXIS] = bilinear_grid_spacing[Y_AXIS] = 0;
191
-      for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
192
-        for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
193
-          z_values[x][y] = NAN;
194
-    #elif ENABLED(AUTO_BED_LEVELING_UBL)
195
-      ubl.reset();
196
-    #endif
185
+  #elif ENABLED(AUTO_BED_LEVELING_UBL)
186
+    ubl.reset();
187
+  #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
188
+    bilinear_start[X_AXIS] = bilinear_start[Y_AXIS] =
189
+    bilinear_grid_spacing[X_AXIS] = bilinear_grid_spacing[Y_AXIS] = 0;
190
+    for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
191
+      for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
192
+        z_values[x][y] = NAN;
193
+  #elif ABL_PLANAR
194
+    planner.bed_level_matrix.set_to_identity();
197
   #endif
195
   #endif
198
 }
196
 }
199
 
197
 

+ 4
- 3
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp View File

310
   void unified_bed_leveling::G29() {
310
   void unified_bed_leveling::G29() {
311
 
311
 
312
     if (!settings.calc_num_meshes()) {
312
     if (!settings.calc_num_meshes()) {
313
-      SERIAL_PROTOCOLLNPGM("?Enable EEPROM and init with M502, M500.\n");
313
+      SERIAL_PROTOCOLLNPGM("?Enable EEPROM and init with");
314
+      SERIAL_PROTOCOLLNPGM("M502, M500, M501 in that order.\n");
314
       return;
315
       return;
315
     }
316
     }
316
 
317
 
608
     if (parser.seen('L')) {     // Load Current Mesh Data
609
     if (parser.seen('L')) {     // Load Current Mesh Data
609
       g29_storage_slot = parser.has_value() ? parser.value_int() : storage_slot;
610
       g29_storage_slot = parser.has_value() ? parser.value_int() : storage_slot;
610
 
611
 
611
-      int16_t a = settings.calc_num_meshes();
612
+      uint16_t a = settings.calc_num_meshes();
612
 
613
 
613
       if (!a) {
614
       if (!a) {
614
         SERIAL_PROTOCOLLNPGM("?EEPROM storage not available.");
615
         SERIAL_PROTOCOLLNPGM("?EEPROM storage not available.");
650
         return;
651
         return;
651
       }
652
       }
652
 
653
 
653
-      int16_t a = settings.calc_num_meshes();
654
+      uint16_t a = settings.calc_num_meshes();
654
 
655
 
655
       if (!a) {
656
       if (!a) {
656
         SERIAL_PROTOCOLLNPGM("?EEPROM storage not available.");
657
         SERIAL_PROTOCOLLNPGM("?EEPROM storage not available.");

+ 8
- 0
Marlin/src/feature/pause.cpp View File

114
 ) {
114
 ) {
115
   if (move_away_flag) return false; // already paused
115
   if (move_away_flag) return false; // already paused
116
 
116
 
117
+  #ifdef ACTION_ON_PAUSE
118
+    SERIAL_ECHOLNPGM("//action:" ACTION_ON_PAUSE);
119
+  #endif
120
+
117
   if (!DEBUGGING(DRYRUN) && unload_length != 0) {
121
   if (!DEBUGGING(DRYRUN) && unload_length != 0) {
118
     #if ENABLED(PREVENT_COLD_EXTRUSION)
122
     #if ENABLED(PREVENT_COLD_EXTRUSION)
119
       if (!thermalManager.allow_cold_extrude &&
123
       if (!thermalManager.allow_cold_extrude &&
342
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
346
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
343
   #endif
347
   #endif
344
 
348
 
349
+  #ifdef ACTION_ON_RESUME
350
+    SERIAL_ECHOLNPGM("//action:" ACTION_ON_RESUME);
351
+  #endif
352
+
345
   #if ENABLED(SDSUPPORT)
353
   #if ENABLED(SDSUPPORT)
346
     if (sd_print_paused) {
354
     if (sd_print_paused) {
347
       card.startFileprint();
355
       card.startFileprint();

+ 1
- 1
Marlin/src/gcode/bedlevel/M420.cpp View File

54
 
54
 
55
       #if ENABLED(EEPROM_SETTINGS)
55
       #if ENABLED(EEPROM_SETTINGS)
56
         const int8_t storage_slot = parser.has_value() ? parser.value_int() : ubl.storage_slot;
56
         const int8_t storage_slot = parser.has_value() ? parser.value_int() : ubl.storage_slot;
57
-        const int16_t a = settings.calc_num_meshes();
57
+        const uint16_t a = settings.calc_num_meshes();
58
 
58
 
59
         if (!a) {
59
         if (!a) {
60
           SERIAL_PROTOCOLLNPGM("?EEPROM storage not available.");
60
           SERIAL_PROTOCOLLNPGM("?EEPROM storage not available.");

+ 7
- 10
Marlin/src/gcode/bedlevel/abl/G29.cpp View File

390
     stepper.synchronize();
390
     stepper.synchronize();
391
 
391
 
392
     // Disable auto bed leveling during G29
392
     // Disable auto bed leveling during G29
393
-    planner.leveling_active = false;
393
+    // Be formal so G29 can be done successively without G28.
394
+    set_bed_leveling_enabled(false);
394
 
395
 
395
     if (!dryrun) {
396
     if (!dryrun) {
396
       // Re-orient the current position without leveling
397
       // Re-orient the current position without leveling
404
     #if HAS_BED_PROBE
405
     #if HAS_BED_PROBE
405
       // Deploy the probe. Probe will raise if needed.
406
       // Deploy the probe. Probe will raise if needed.
406
       if (DEPLOY_PROBE()) {
407
       if (DEPLOY_PROBE()) {
407
-        planner.leveling_active = abl_should_enable;
408
+        set_bed_leveling_enabled(abl_should_enable);
408
         return;
409
         return;
409
       }
410
       }
410
     #endif
411
     #endif
421
         || left_probe_bed_position != bilinear_start[X_AXIS]
422
         || left_probe_bed_position != bilinear_start[X_AXIS]
422
         || front_probe_bed_position != bilinear_start[Y_AXIS]
423
         || front_probe_bed_position != bilinear_start[Y_AXIS]
423
       ) {
424
       ) {
424
-        if (dryrun) {
425
-          // Before reset bed level, re-enable to correct the position
426
-          planner.leveling_active = abl_should_enable;
427
-        }
428
         // Reset grid to 0.0 or "not probed". (Also disables ABL)
425
         // Reset grid to 0.0 or "not probed". (Also disables ABL)
429
         reset_bed_level();
426
         reset_bed_level();
430
 
427
 
468
       #if HAS_SOFTWARE_ENDSTOPS
465
       #if HAS_SOFTWARE_ENDSTOPS
469
         soft_endstops_enabled = enable_soft_endstops;
466
         soft_endstops_enabled = enable_soft_endstops;
470
       #endif
467
       #endif
471
-      planner.leveling_active = abl_should_enable;
468
+      set_bed_leveling_enabled(abl_should_enable);
472
       g29_in_progress = false;
469
       g29_in_progress = false;
473
       #if ENABLED(LCD_BED_LEVELING)
470
       #if ENABLED(LCD_BED_LEVELING)
474
         lcd_wait_for_move = false;
471
         lcd_wait_for_move = false;
673
           measured_z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
670
           measured_z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
674
 
671
 
675
           if (isnan(measured_z)) {
672
           if (isnan(measured_z)) {
676
-            planner.leveling_active = abl_should_enable;
673
+            set_bed_leveling_enabled(abl_should_enable);
677
             break;
674
             break;
678
           }
675
           }
679
 
676
 
709
         yProbe = points[i].y;
706
         yProbe = points[i].y;
710
         measured_z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
707
         measured_z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
711
         if (isnan(measured_z)) {
708
         if (isnan(measured_z)) {
712
-          planner.leveling_active = abl_should_enable;
709
+          set_bed_leveling_enabled(abl_should_enable);
713
           break;
710
           break;
714
         }
711
         }
715
         points[i].z = measured_z;
712
         points[i].z = measured_z;
732
 
729
 
733
     // Raise to _Z_CLEARANCE_DEPLOY_PROBE. Stow the probe.
730
     // Raise to _Z_CLEARANCE_DEPLOY_PROBE. Stow the probe.
734
     if (STOW_PROBE()) {
731
     if (STOW_PROBE()) {
735
-      planner.leveling_active = abl_should_enable;
732
+      set_bed_leveling_enabled(abl_should_enable);
736
       measured_z = NAN;
733
       measured_z = NAN;
737
     }
734
     }
738
   }
735
   }

+ 5
- 9
Marlin/src/gcode/feature/pause/M125.cpp View File

49
  *    Z = override Z raise
49
  *    Z = override Z raise
50
  */
50
  */
51
 void GcodeSuite::M125() {
51
 void GcodeSuite::M125() {
52
-  point_t park_point = NOZZLE_PARK_POINT;
53
-
54
   // Initial retract before move to filament change position
52
   // Initial retract before move to filament change position
55
   const float retract = parser.seen('L') ? parser.value_axis_units(E_AXIS) : 0
53
   const float retract = parser.seen('L') ? parser.value_axis_units(E_AXIS) : 0
56
     #ifdef PAUSE_PARK_RETRACT_LENGTH
54
     #ifdef PAUSE_PARK_RETRACT_LENGTH
58
     #endif
56
     #endif
59
   ;
57
   ;
60
 
58
 
61
-  // Lift Z axis
62
-  if (parser.seenval('Z'))
63
-    park_point.z = parser.linearval('Z');
59
+  point_t park_point = NOZZLE_PARK_POINT;
64
 
60
 
65
   // Move XY axes to filament change position or given position
61
   // Move XY axes to filament change position or given position
66
-  if (parser.seenval('X'))
67
-    park_point.x = parser.linearval('X');
62
+  if (parser.seenval('X')) park_point.x = parser.linearval('X');
63
+  if (parser.seenval('Y')) park_point.y = parser.linearval('Y');
68
 
64
 
69
-  if (parser.seenval('Y'))
70
-    park_point.y = parser.linearval('Y');
65
+  // Lift Z axis
66
+  if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
71
 
67
 
72
   #if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE)
68
   #if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE)
73
     park_point.x += (active_extruder ? hotend_offset[X_AXIS][active_extruder] : 0);
69
     park_point.x += (active_extruder ? hotend_offset[X_AXIS][active_extruder] : 0);

+ 1
- 1
Marlin/src/lcd/ultralcd.cpp View File

2285
      *    Save Bed Mesh
2285
      *    Save Bed Mesh
2286
      */
2286
      */
2287
     void _lcd_ubl_storage_mesh() {
2287
     void _lcd_ubl_storage_mesh() {
2288
-      int16_t a = settings.calc_num_meshes();
2288
+      uint16_t a = settings.calc_num_meshes();
2289
       START_MENU();
2289
       START_MENU();
2290
       MENU_BACK(MSG_UBL_LEVEL_BED);
2290
       MENU_BACK(MSG_UBL_LEVEL_BED);
2291
       if (!WITHIN(ubl_storage_slot, 0, a - 1)) {
2291
       if (!WITHIN(ubl_storage_slot, 0, a - 1)) {

+ 34
- 37
Marlin/src/module/configuration_store.cpp View File

141
  *  539  M200 D    parser.volumetric_enabled        (bool)
141
  *  539  M200 D    parser.volumetric_enabled        (bool)
142
  *  540  M200 T D  planner.filament_size            (float x5) (T0..3)
142
  *  540  M200 T D  planner.filament_size            (float x5) (T0..3)
143
  *
143
  *
144
- * HAVE_TMC2130:                                    22 bytes
144
+ * HAS_TRINAMIC:                                    22 bytes
145
  *  560  M906 X    Stepper X current                (uint16_t)
145
  *  560  M906 X    Stepper X current                (uint16_t)
146
  *  562  M906 Y    Stepper Y current                (uint16_t)
146
  *  562  M906 Y    Stepper Y current                (uint16_t)
147
  *  564  M906 Z    Stepper Z current                (uint16_t)
147
  *  564  M906 Z    Stepper Z current                (uint16_t)
155
  *  580  M906 E4   Stepper E4 current               (uint16_t)
155
  *  580  M906 E4   Stepper E4 current               (uint16_t)
156
  *
156
  *
157
  * SENSORLESS HOMING                                4 bytes
157
  * SENSORLESS HOMING                                4 bytes
158
- *  580  M914 X    Stepper X and X2 threshold       (int16_t)
159
- *  582  M914 Y    Stepper Y and Y2 threshold       (int16_t)
158
+ *  582  M914 X    Stepper X and X2 threshold       (int16_t)
159
+ *  584  M914 Y    Stepper Y and Y2 threshold       (int16_t)
160
  *
160
  *
161
  * LIN_ADVANCE:                                     8 bytes
161
  * LIN_ADVANCE:                                     8 bytes
162
- *  582  M900 K    extruder_advance_k               (float)
163
- *  586  M900 WHD  advance_ed_ratio                 (float)
162
+ *  586  M900 K    extruder_advance_k               (float)
163
+ *  590  M900 WHD  advance_ed_ratio                 (float)
164
  *
164
  *
165
  * HAS_MOTOR_CURRENT_PWM:
165
  * HAS_MOTOR_CURRENT_PWM:
166
- *  590  M907 X    Stepper XY current               (uint32_t)
167
- *  594  M907 Z    Stepper Z current                (uint32_t)
168
- *  598  M907 E    Stepper E current                (uint32_t)
166
+ *  594  M907 X    Stepper XY current               (uint32_t)
167
+ *  598  M907 Z    Stepper Z current                (uint32_t)
168
+ *  602  M907 E    Stepper E current                (uint32_t)
169
  *
169
  *
170
  * CNC_COORDINATE_SYSTEMS                           108 bytes
170
  * CNC_COORDINATE_SYSTEMS                           108 bytes
171
- *  602  G54-G59.3 coordinate_system                (float x 27)
171
+ *  606  G54-G59.3 coordinate_system                (float x 27)
172
  *
172
  *
173
  * SKEW_CORRECTION:                                 12 bytes
173
  * SKEW_CORRECTION:                                 12 bytes
174
- *  710  M852 I    planner.xy_skew_factor           (float)
175
- *  714  M852 J    planner.xz_skew_factor           (float)
176
- *  718  M852 K    planner.yz_skew_factor           (float)
174
+ *  714  M852 I    planner.xy_skew_factor           (float)
175
+ *  718  M852 J    planner.xz_skew_factor           (float)
176
+ *  722  M852 K    planner.yz_skew_factor           (float)
177
  *
177
  *
178
- *  722                                   Minimum end-point
179
- * 2251 (722 + 208 + 36 + 9 + 288 + 988)  Maximum end-point
178
+ *  726                                   Minimum end-point
179
+ * 2255 (726 + 208 + 36 + 9 + 288 + 988)  Maximum end-point
180
  *
180
  *
181
  * ========================================================================
181
  * ========================================================================
182
  * meshes_begin (between max and min end-point, directly above)
182
  * meshes_begin (between max and min end-point, directly above)
290
   bool MarlinSettings::eeprom_error;
290
   bool MarlinSettings::eeprom_error;
291
 
291
 
292
   #if ENABLED(AUTO_BED_LEVELING_UBL)
292
   #if ENABLED(AUTO_BED_LEVELING_UBL)
293
-    int MarlinSettings::meshes_begin;
293
+    int16_t MarlinSettings::meshes_begin;
294
   #endif
294
   #endif
295
 
295
 
296
   /**
296
   /**
1256
       }
1256
       }
1257
     #endif
1257
     #endif
1258
 
1258
 
1259
-    int MarlinSettings::calc_num_meshes() {
1259
+    uint16_t MarlinSettings::calc_num_meshes() {
1260
       //obviously this will get more sophisticated once we've added an actual MAT
1260
       //obviously this will get more sophisticated once we've added an actual MAT
1261
 
1261
 
1262
       if (meshes_begin <= 0) return 0;
1262
       if (meshes_begin <= 0) return 0;
1264
       return (meshes_end - meshes_begin) / sizeof(ubl.z_values);
1264
       return (meshes_end - meshes_begin) / sizeof(ubl.z_values);
1265
     }
1265
     }
1266
 
1266
 
1267
-    void MarlinSettings::store_mesh(int8_t slot) {
1267
+    void MarlinSettings::store_mesh(const int8_t slot) {
1268
 
1268
 
1269
       #if ENABLED(AUTO_BED_LEVELING_UBL)
1269
       #if ENABLED(AUTO_BED_LEVELING_UBL)
1270
-        const int a = calc_num_meshes();
1270
+        const int16_t a = calc_num_meshes();
1271
         if (!WITHIN(slot, 0, a - 1)) {
1271
         if (!WITHIN(slot, 0, a - 1)) {
1272
           #if ENABLED(EEPROM_CHITCHAT)
1272
           #if ENABLED(EEPROM_CHITCHAT)
1273
             ubl_invalid_slot(a);
1273
             ubl_invalid_slot(a);
1280
         }
1280
         }
1281
 
1281
 
1282
         uint16_t crc = 0;
1282
         uint16_t crc = 0;
1283
-        bool status;
1284
         int pos = meshes_end - (slot + 1) * sizeof(ubl.z_values);
1283
         int pos = meshes_end - (slot + 1) * sizeof(ubl.z_values);
1285
 
1284
 
1286
         HAL::PersistentStore::access_start();
1285
         HAL::PersistentStore::access_start();
1287
-        status = HAL::PersistentStore::write_data(pos, (uint8_t *)&ubl.z_values, sizeof(ubl.z_values), &crc);
1286
+        const bool status = HAL::PersistentStore::write_data(pos, (uint8_t *)&ubl.z_values, sizeof(ubl.z_values), &crc);
1288
         HAL::PersistentStore::access_finish();
1287
         HAL::PersistentStore::access_finish();
1289
 
1288
 
1290
         if (status)
1289
         if (status)
1304
       #endif
1303
       #endif
1305
     }
1304
     }
1306
 
1305
 
1307
-    void MarlinSettings::load_mesh(int8_t slot, void *into /* = 0 */) {
1306
+    void MarlinSettings::load_mesh(const int8_t slot, void * const into/*=NULL*/) {
1308
 
1307
 
1309
       #if ENABLED(AUTO_BED_LEVELING_UBL)
1308
       #if ENABLED(AUTO_BED_LEVELING_UBL)
1310
 
1309
 
1320
         uint16_t crc = 0;
1319
         uint16_t crc = 0;
1321
         int pos = meshes_end - (slot + 1) * sizeof(ubl.z_values);
1320
         int pos = meshes_end - (slot + 1) * sizeof(ubl.z_values);
1322
         uint8_t * const dest = into ? (uint8_t*)into : (uint8_t*)&ubl.z_values;
1321
         uint8_t * const dest = into ? (uint8_t*)into : (uint8_t*)&ubl.z_values;
1323
-        uint16_t status;
1324
 
1322
 
1325
         HAL::PersistentStore::access_start();
1323
         HAL::PersistentStore::access_start();
1326
-        status = HAL::PersistentStore::read_data(pos, dest, sizeof(ubl.z_values), &crc);
1324
+        const uint16_t status = HAL::PersistentStore::read_data(pos, dest, sizeof(ubl.z_values), &crc);
1327
         HAL::PersistentStore::access_finish();
1325
         HAL::PersistentStore::access_finish();
1328
 
1326
 
1329
         if (status)
1327
         if (status)
1373
   planner.retract_acceleration = DEFAULT_RETRACT_ACCELERATION;
1371
   planner.retract_acceleration = DEFAULT_RETRACT_ACCELERATION;
1374
   planner.travel_acceleration = DEFAULT_TRAVEL_ACCELERATION;
1372
   planner.travel_acceleration = DEFAULT_TRAVEL_ACCELERATION;
1375
   planner.min_feedrate_mm_s = DEFAULT_MINIMUMFEEDRATE;
1373
   planner.min_feedrate_mm_s = DEFAULT_MINIMUMFEEDRATE;
1376
-  planner.min_segment_time_us = DEFAULT_MINSEGMENTTIME;
1377
   planner.min_travel_feedrate_mm_s = DEFAULT_MINTRAVELFEEDRATE;
1374
   planner.min_travel_feedrate_mm_s = DEFAULT_MINTRAVELFEEDRATE;
1375
+  planner.min_segment_time_us = DEFAULT_MINSEGMENTTIME;
1378
   planner.max_jerk[X_AXIS] = DEFAULT_XJERK;
1376
   planner.max_jerk[X_AXIS] = DEFAULT_XJERK;
1379
   planner.max_jerk[Y_AXIS] = DEFAULT_YJERK;
1377
   planner.max_jerk[Y_AXIS] = DEFAULT_YJERK;
1380
   planner.max_jerk[Z_AXIS] = DEFAULT_ZJERK;
1378
   planner.max_jerk[Z_AXIS] = DEFAULT_ZJERK;
1381
   planner.max_jerk[E_AXIS] = DEFAULT_EJERK;
1379
   planner.max_jerk[E_AXIS] = DEFAULT_EJERK;
1382
 
1380
 
1383
-  #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
1384
-    new_z_fade_height = 0.0;
1385
-  #endif
1386
-
1387
   #if HAS_HOME_OFFSET
1381
   #if HAS_HOME_OFFSET
1388
     ZERO(home_offset);
1382
     ZERO(home_offset);
1389
   #endif
1383
   #endif
1405
     LOOP_XYZ(i) HOTEND_LOOP() hotend_offset[i][e] = tmp4[i][e];
1399
     LOOP_XYZ(i) HOTEND_LOOP() hotend_offset[i][e] = tmp4[i][e];
1406
   #endif
1400
   #endif
1407
 
1401
 
1408
-  // Applies to all MBL and ABL
1402
+  //
1403
+  // Global Leveling
1404
+  //
1405
+
1406
+  #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
1407
+    new_z_fade_height = 0.0;
1408
+  #endif
1409
+
1409
   #if HAS_LEVELING
1410
   #if HAS_LEVELING
1410
     reset_bed_level();
1411
     reset_bed_level();
1411
   #endif
1412
   #endif
1466
     lcd_preheat_fan_speed[1] = PREHEAT_2_FAN_SPEED;
1467
     lcd_preheat_fan_speed[1] = PREHEAT_2_FAN_SPEED;
1467
   #endif
1468
   #endif
1468
 
1469
 
1469
-  #if HAS_LCD_CONTRAST
1470
-    lcd_contrast = DEFAULT_LCD_CONTRAST;
1471
-  #endif
1472
-
1473
   #if ENABLED(PIDTEMP)
1470
   #if ENABLED(PIDTEMP)
1474
     #if ENABLED(PID_PARAMS_PER_HOTEND) && HOTENDS > 1
1471
     #if ENABLED(PID_PARAMS_PER_HOTEND) && HOTENDS > 1
1475
       HOTEND_LOOP()
1472
       HOTEND_LOOP()
1493
     thermalManager.bedKd = scalePID_d(DEFAULT_bedKd);
1490
     thermalManager.bedKd = scalePID_d(DEFAULT_bedKd);
1494
   #endif
1491
   #endif
1495
 
1492
 
1493
+  #if HAS_LCD_CONTRAST
1494
+    lcd_contrast = DEFAULT_LCD_CONTRAST;
1495
+  #endif
1496
+
1496
   #if ENABLED(FWRETRACT)
1497
   #if ENABLED(FWRETRACT)
1497
     fwretract.reset();
1498
     fwretract.reset();
1498
   #endif
1499
   #endif
1579
       stepper.digipot_current(q, (stepper.motor_current_setting[q] = tmp_motor_current_setting[q]));
1580
       stepper.digipot_current(q, (stepper.motor_current_setting[q] = tmp_motor_current_setting[q]));
1580
   #endif
1581
   #endif
1581
 
1582
 
1582
-  #if ENABLED(AUTO_BED_LEVELING_UBL)
1583
-    ubl.reset();
1584
-  #endif
1585
-
1586
   #if ENABLED(SKEW_CORRECTION_GCODE)
1583
   #if ENABLED(SKEW_CORRECTION_GCODE)
1587
     planner.xy_skew_factor = XY_SKEW_FACTOR;
1584
     planner.xy_skew_factor = XY_SKEW_FACTOR;
1588
     #if ENABLED(SKEW_CORRECTION_FOR_Z)
1585
     #if ENABLED(SKEW_CORRECTION_FOR_Z)

+ 8
- 8
Marlin/src/module/configuration_store.h View File

37
 
37
 
38
       #if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
38
       #if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
39
                                          // That can store is enabled
39
                                          // That can store is enabled
40
-        FORCE_INLINE static int get_start_of_meshes() { return meshes_begin; }
41
-        FORCE_INLINE static int get_end_of_meshes() { return meshes_end; }
42
-        static int calc_num_meshes();
43
-        static void store_mesh(int8_t slot);
44
-        static void load_mesh(int8_t slot, void *into = 0);
40
+        FORCE_INLINE static int16_t get_start_of_meshes() { return meshes_begin; }
41
+        FORCE_INLINE static int16_t get_end_of_meshes() { return meshes_end; }
42
+        static uint16_t calc_num_meshes();
43
+        static void store_mesh(const int8_t slot);
44
+        static void load_mesh(const int8_t slot, void * const into=NULL);
45
 
45
 
46
         //static void delete_mesh();    // necessary if we have a MAT
46
         //static void delete_mesh();    // necessary if we have a MAT
47
         //static void defrag_meshes();  // "
47
         //static void defrag_meshes();  // "
66
 
66
 
67
       #if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
67
       #if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
68
                                          // That can store is enabled
68
                                          // That can store is enabled
69
-        static int meshes_begin;
70
-        const static int meshes_end = E2END - 128; // 128 is a placeholder for the size of the MAT; the MAT will always
71
-                                                   // live at the very end of the eeprom
69
+        static int16_t meshes_begin;
70
+        const static int16_t meshes_end = E2END - 128; // 128 is a placeholder for the size of the MAT; the MAT will always
71
+                                                       // live at the very end of the eeprom
72
 
72
 
73
       #endif
73
       #endif
74
 
74
 

+ 4
- 1
Marlin/src/pins/pins_GT2560_REV_A.h View File

30
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
30
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
31
 #endif
31
 #endif
32
 
32
 
33
-#define BOARD_NAME           "GT2560 Rev.A"
33
+#ifndef BOARD_NAME
34
+  #define BOARD_NAME "GT2560 Rev.A"
35
+#endif
34
 #define DEFAULT_MACHINE_NAME "Prusa i3 Pro B"
36
 #define DEFAULT_MACHINE_NAME "Prusa i3 Pro B"
37
+
35
 //
38
 //
36
 // Limit Switches
39
 // Limit Switches
37
 //
40
 //

+ 4
- 5
Marlin/src/pins/pins_GT2560_REV_A_PLUS.h View File

24
  * Geeetech GT2560 Revision A+ board pin assignments
24
  * Geeetech GT2560 Revision A+ board pin assignments
25
  */
25
  */
26
 
26
 
27
-#include "pins_GT2560_REV_A.h"
27
+#define BOARD_NAME "GT2560 Rev.A+"
28
 
28
 
29
-#undef BOARD_NAME
30
-#define BOARD_NAME  "GT2560 Rev.A+"
29
+#include "pins_GT2560_REV_A.h"
31
 
30
 
32
 #if ENABLED(BLTOUCH)
31
 #if ENABLED(BLTOUCH)
33
-  #define SERVO0_PIN  32
34
-#else
35
   #define SERVO0_PIN  11
32
   #define SERVO0_PIN  11
33
+#else
34
+  #define SERVO0_PIN  32
36
 #endif
35
 #endif

Loading…
Cancel
Save