Ver código fonte

Disable SCHED_RR - causes serial buffer corruption on Pi 3B+

The real-time scheduling (SCHED_RR priority 60 + CPU 0 pinning)
appears to cause serial buffer corruption on Pi 3B+, resulting in:
- Commands being merged (e.g., "G1 G53" -> "G10G53")
- GRBL errors from corrupted commands
- Pattern execution failures

This is separate from the FluidNC echo issue (which main branch
handled silently). The corruption is timing-related and specific
to certain Pi models.

Keeping disabled until we can investigate proper CPU affinity
settings that don't interfere with serial I/O.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
tuanchris 1 semana atrás
pai
commit
2ce38dd635
1 arquivos alterados com 8 adições e 0 exclusões
  1. 8 0
      modules/core/scheduling.py

+ 8 - 0
modules/core/scheduling.py

@@ -172,6 +172,14 @@ def setup_realtime_thread(tid: Optional[int] = None, priority: int = 50) -> None
         priority: SCHED_RR priority (1-99). Higher = more important.
                   Motion should use higher than LED (e.g., 60 vs 40).
     """
+    # DISABLED: SCHED_RR + CPU pinning causes serial buffer corruption on Pi 3B+
+    # The real-time scheduling appears to interfere with serial I/O timing,
+    # causing commands to be merged/corrupted (e.g., "G1 G53" -> "G10G53").
+    # This needs further investigation - may need to pin to a different CPU
+    # or use a different scheduling policy.
+    logger.info(f"Real-time scheduling disabled (was priority {priority}) - causes serial issues on some Pi models")
+    return
+
     cpu_count = get_cpu_count()
 
     # Elevate priority (logs internally on success)