Kaynağa Gözat

Drop extra PLR save test (#13554)

Robby Candra 6 yıl önce
ebeveyn
işleme
cd1ef33c8c
1 değiştirilmiş dosya ile 3 ekleme ve 5 silme
  1. 3
    5
      Marlin/src/feature/power_loss_recovery.cpp

+ 3
- 5
Marlin/src/feature/power_loss_recovery.cpp Dosyayı Görüntüle

126
   #endif
126
   #endif
127
 
127
 
128
   // Did Z change since the last call?
128
   // Did Z change since the last call?
129
-  const float zmoved = current_position[Z_AXIS] - info.current_position[Z_AXIS];
130
-
131
   if (force
129
   if (force
132
     #if DISABLED(SAVE_EACH_CMD_MODE)      // Always save state when enabled
130
     #if DISABLED(SAVE_EACH_CMD_MODE)      // Always save state when enabled
133
       #if PIN_EXISTS(POWER_LOSS)          // Save if power loss pin is triggered
131
       #if PIN_EXISTS(POWER_LOSS)          // Save if power loss pin is triggered
136
       #if SAVE_INFO_INTERVAL_MS > 0       // Save if interval is elapsed
134
       #if SAVE_INFO_INTERVAL_MS > 0       // Save if interval is elapsed
137
         || ELAPSED(ms, next_save_ms)
135
         || ELAPSED(ms, next_save_ms)
138
       #endif
136
       #endif
139
-      || zmoved > 0                       // Z moved up (including Z-hop)
140
-      || zmoved < -5                      // Z moved down a lot (for some reason)
137
+        // Save every time Z is higher than the last call
138
+        || current_position[Z_AXIS] > info.current_position[Z_AXIS] 
141
     #endif
139
     #endif
142
   ) {
140
   ) {
143
 
141
 
375
       if (info.valid_head == info.valid_foot) {
373
       if (info.valid_head == info.valid_foot) {
376
         SERIAL_ECHOPGM("current_position: ");
374
         SERIAL_ECHOPGM("current_position: ");
377
         LOOP_XYZE(i) {
375
         LOOP_XYZE(i) {
376
+          if (i) SERIAL_CHAR(',');
378
           SERIAL_ECHO(info.current_position[i]);
377
           SERIAL_ECHO(info.current_position[i]);
379
-          if (i < E_AXIS) SERIAL_CHAR(',');
380
         }
378
         }
381
         SERIAL_EOL();
379
         SERIAL_EOL();
382
         SERIAL_ECHOLNPAIR("feedrate: ", info.feedrate);
380
         SERIAL_ECHOLNPAIR("feedrate: ", info.feedrate);

Loading…
İptal
Kaydet