Bläddra i källkod

Open-able launcher

Zach Isbach 7 år sedan
förälder
incheckning
44d9eac124
2 ändrade filer med 34 tillägg och 1 borttagningar
  1. 0 1
      dmx/dmx.py
  2. 34 0
      dmx/dmxStart.sh

+ 0 - 1
dmx/dmx.py

@@ -121,7 +121,6 @@ def SendDMXFrame():
   
   # Update values for each channel
   for i in range(state_len):
-    print 'I', i
     delta = 0
     if (cmds['value'][i] != state[i]):
       if (cmds['delay'][i] > 0):

+ 34 - 0
dmx/dmxStart.sh

@@ -0,0 +1,34 @@
+#!/bin/sh
+
+LA_DIR="${HOME}/Library/LaunchAgents"
+if [ ! -d "${LA_DIR}" ]; then
+	echo "Invalid LaunchAgents directory: ${LA_DIR}" 1>&2
+	exit 1
+fi
+cd $LA_DIR
+
+BIN="${HOME}/bin/video/dmx/dmxLauncher.sh"
+if [ ! -x "${BIN}" ]; then
+	echo "Invalid binary: ${BIN}" 1>&2
+	exit 2
+fi
+
+# Unload the jerky version
+launchctl unload com.uberzach.ola.plist
+# Unload all deps, which will automatially stop when OLA does
+for i in com.uberzach.ola.*.plist; do
+	launchctl unload "${i}"
+done
+
+# Launch the non-jerky version
+${HOME}/bin/video/dmx/dmxLauncher.sh &
+sleep 2
+
+# Reload all the deps
+for i in com.uberzach.ola.*.plist; do
+	launchctl load "${i}"
+done
+
+echo
+echo "Success"
+exit 0