Browse Source

PLR accessors for Ext UI (#23687)

InsanityAutomation 2 years ago
parent
commit
c2fa7e5942
2 changed files with 14 additions and 0 deletions
  1. 9
    0
      Marlin/src/lcd/extui/ui_api.cpp
  2. 5
    0
      Marlin/src/lcd/extui/ui_api.h

+ 9
- 0
Marlin/src/lcd/extui/ui_api.cpp View File

94
   #include "../../feature/caselight.h"
94
   #include "../../feature/caselight.h"
95
 #endif
95
 #endif
96
 
96
 
97
+#if ENABLED(POWER_LOSS_RECOVERY)
98
+  #include "../../feature/powerloss.h"
99
+#endif
100
+
97
 #if ENABLED(BABYSTEPPING)
101
 #if ENABLED(BABYSTEPPING)
98
   #include "../../feature/babystep.h"
102
   #include "../../feature/babystep.h"
99
 #endif
103
 #endif
674
     #endif
678
     #endif
675
   #endif
679
   #endif
676
 
680
 
681
+  #if ENABLED(POWER_LOSS_RECOVERY)
682
+    bool getPowerLossRecoveryEnabled()                 { return recovery.enabled; }
683
+    void setPowerLossRecoveryEnabled(const bool value) {  recovery.enable(value); }
684
+  #endif
685
+
677
   #if ENABLED(LIN_ADVANCE)
686
   #if ENABLED(LIN_ADVANCE)
678
     float getLinearAdvance_mm_mm_s(const extruder_t extruder) {
687
     float getLinearAdvance_mm_mm_s(const extruder_t extruder) {
679
       return (extruder < EXTRUDERS) ? planner.extruder_advance_K[extruder - E0] : 0;
688
       return (extruder < EXTRUDERS) ? planner.extruder_advance_K[extruder - E0] : 0;

+ 5
- 0
Marlin/src/lcd/extui/ui_api.h View File

315
     #endif
315
     #endif
316
   #endif
316
   #endif
317
 
317
 
318
+  #if ENABLED(POWER_LOSS_RECOVERY)
319
+    bool getPowerLossRecoveryEnabled();
320
+    void setPowerLossRecoveryEnabled(const bool);
321
+  #endif
322
+
318
   #if ENABLED(PIDTEMP)
323
   #if ENABLED(PIDTEMP)
319
     float getPIDValues_Kp(const extruder_t);
324
     float getPIDValues_Kp(const extruder_t);
320
     float getPIDValues_Ki(const extruder_t);
325
     float getPIDValues_Ki(const extruder_t);

Loading…
Cancel
Save