Kaynağa Gözat

Hack to address stuttering caused by ISR not finishing in time

(PR #138)

When the ISR does not finish in time, the timer will
wrap in the computation of the next interrupt time.

This hack replaces the correct (past) time with a time not far in the future.
Scott Lahteine 9 yıl önce
ebeveyn
işleme
9f462f0cf5
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  1. 2
    0
      Marlin/stepper.cpp

+ 2
- 0
Marlin/stepper.cpp Dosyayı Görüntüle

@@ -749,6 +749,8 @@ ISR(TIMER1_COMPA_vect) {
749 749
       step_loops = step_loops_nominal;
750 750
     }
751 751
 
752
+    OCR1A = (OCR1A < (TCNT1 +16)) ? (TCNT1 + 16) : OCR1A;
753
+
752 754
     // If current block is finished, reset pointer
753 755
     if (step_events_completed >= current_block->step_event_count) {
754 756
       current_block = NULL;

Loading…
İptal
Kaydet