Browse Source

Merge pull request #11306 from thinkyhead/bf2_power_loss_pin

[2.0.x] Add support for power loss detect pin
pull/1/head
Scott Lahteine 6 years ago
committed by GitHub
parent
commit
6d2aff03bd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      Marlin/Configuration_adv.h
  2. 4
      Marlin/src/config/default/Configuration_adv.h
  3. 4
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  4. 4
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  5. 4
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  6. 4
      Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h
  7. 4
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
  8. 4
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
  9. 4
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  10. 4
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  11. 4
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  12. 4
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  13. 4
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  14. 4
      Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
  15. 4
      Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
  16. 4
      Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
  17. 4
      Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
  18. 4
      Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
  19. 4
      Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
  20. 4
      Marlin/src/config/examples/Felix/Configuration_adv.h
  21. 4
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
  22. 4
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
  23. 4
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
  24. 4
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  25. 4
      Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
  26. 4
      Marlin/src/config/examples/MakerParts/Configuration_adv.h
  27. 4
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  28. 4
      Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
  29. 4
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
  30. 4
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  31. 4
      Marlin/src/config/examples/RigidBot/Configuration_adv.h
  32. 4
      Marlin/src/config/examples/SCARA/Configuration_adv.h
  33. 4
      Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
  34. 4
      Marlin/src/config/examples/TheBorg/Configuration_adv.h
  35. 4
      Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
  36. 4
      Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h
  37. 4
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
  38. 4
      Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
  39. 4
      Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
  40. 4
      Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
  41. 4
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
  42. 4
      Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
  43. 4
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
  44. 4
      Marlin/src/config/examples/delta/generic/Configuration_adv.h
  45. 4
      Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
  46. 4
      Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
  47. 4
      Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
  48. 4
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
  49. 4
      Marlin/src/config/examples/makibox/Configuration_adv.h
  50. 4
      Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
  51. 4
      Marlin/src/config/examples/wt150/Configuration_adv.h
  52. 18
      Marlin/src/feature/power_loss_recovery.cpp
  53. 2
      buildroot/share/tests/megaatmega2560_tests

4
Marlin/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/default/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Anet/A6/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Anet/A8/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h

@ -597,6 +597,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Cartesio/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Felix/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/MakerParts/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Malyan/M200/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h

@ -590,6 +590,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/RigidBot/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/SCARA/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Sanguinololu/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/TheBorg/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/TinyBoy2/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h

@ -592,6 +592,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h

@ -591,6 +591,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h

@ -591,6 +591,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h

@ -591,6 +591,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h

@ -591,6 +591,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/delta/generic/Configuration_adv.h

@ -591,6 +591,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h

@ -591,6 +591,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h

@ -596,6 +596,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h

@ -591,6 +591,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/makibox/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h

@ -589,6 +589,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

4
Marlin/src/config/examples/wt150/Configuration_adv.h

@ -590,6 +590,10 @@
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#endif
/**
* Sort SD file listings in alphabetical order.

18
Marlin/src/feature/power_loss_recovery.cpp

@ -202,12 +202,19 @@ void save_job_recovery_info() {
millis_t ms = millis();
#endif
if (
#if SAVE_INFO_INTERVAL_MS > 0
ELAPSED(ms, next_save_ms) ||
#endif
// Save on every command
#if ENABLED(SAVE_EACH_CMD_MODE)
true
#else
// Save if power loss pin is triggered
#if PIN_EXISTS(POWER_LOSS)
READ(POWER_LOSS_PIN) == POWER_LOSS_STATE ||
#endif
// Save if interval is elapsed
#if SAVE_INFO_INTERVAL_MS > 0
ELAPSED(ms, next_save_ms) ||
#endif
// Save on every new Z height
(current_position[Z_AXIS] > 0 && current_position[Z_AXIS] > job_recovery_info.current_position[Z_AXIS])
#endif
) {
@ -267,6 +274,11 @@ void save_job_recovery_info() {
card.openJobRecoveryFile(false);
(void)card.saveJobRecoveryInfo();
// If power-loss pin was triggered, write just once then kill
#if PIN_EXISTS(POWER_LOSS)
if (READ(POWER_LOSS_PIN) == POWER_LOSS_STATE) kill(MSG_POWER_LOSS_RECOVERY);
#endif
}
}

2
buildroot/share/tests/megaatmega2560_tests

@ -27,7 +27,7 @@ opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING
opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS PINS_DEBUGGING
opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED AUTO_POWER_CONTROL NOZZLE_PARK_FEATURE FILAMENT_RUNOUT_SENSOR
opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE
opt_enable_adv ARC_P_CIRCLES ADVANCED_PAUSE_FEATURE CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS POWER_LOSS_RECOVERY
opt_enable_adv ARC_P_CIRCLES ADVANCED_PAUSE_FEATURE CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE
opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CODEPENDENT_XY_HOMING
opt_set GRID_MAX_POINTS_X 16
opt_set_adv FANMUX0_PIN 53

Loading…
Cancel
Save