src/dmx.c: bump mark-after-break and mark-between-frames to 3 bits
authorTero Marttila <terom@paivola.fi>
Tue, 02 Dec 2014 00:23:48 +0200
changeset 101 18c461237630
parent 100 d4ff49d86531
child 102 611787305686
src/dmx.c: bump mark-after-break and mark-between-frames to 3 bits
src/dmx.c
--- a/src/dmx.c	Tue Dec 02 00:21:46 2014 +0200
+++ b/src/dmx.c	Tue Dec 02 00:23:48 2014 +0200
@@ -39,17 +39,26 @@
 
     // mark-after-break (MAB)
     dmx_high();
-    dmx_pause(2);
+    dmx_pause(3); // min 2, recommended 3
 }
 
 #include "dmx_frame.c"
 
+/*
+ * Send out a full DMX packet, including the start-code frame and a frame for each channel given.
+ *
+ * Uses 3-bit mark-times between frames, since some fixtures don't seem happy with 2-bit mark-times.
+ */
 static void dmx_packet (byte count, byte *out)
 {
     dmx_break();
     dmx_frame(0);
+    dmx_pause(1); // MTBF 2+1 = 3
 
     for (byte i = 0; i < count; i++) {
         dmx_frame(out[i]);
+
+        // MTBF 2+1 = 3
+        dmx_pause(1);
     }
 }