Skip to content

Commit

Permalink
Add some initial Fahrty stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
fpletz committed Jun 7, 2014
1 parent 8189ef4 commit 845faed
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 2 deletions.
18 changes: 18 additions & 0 deletions animations/init.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import acabsl
import time
t = 1

acabsl.update()

def set_all(r,g,b):
for w in range(acabsl.NOOFWALLS):
for x in range(acabsl.WALLSIZEX):
for y in range(acabsl.WALLSIZEY):
acabsl.send(x,y,r,g,b,0,w)
acabsl.update()

set_all(20,70,30)

17 changes: 17 additions & 0 deletions playlist-fahrty.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import dircache
import random


def getPlaylist():
playlist = [
#[time_in_seconds, [[simultanious_animation1, argument1, ...], [simultanious_animation2, argument1, ...], ...]]
[15, [["python","animations/screw.py","--wall=0"]]],
#[5, [["python","animations/rainbowscroll.py","--wall=0"]]],
#[5, [["python","animations/multiwall_rainbowscroll.py"]]],
#[5, [["python","animations/s-color4-faster.py"]]],
#[5, [["python","animations/red-sym-scroll.py"]]],
#[5, [["python","animations/multiwall_fullpulse.py"]]],
#[5, [["python","animations/dropping.py"]]],
[15, [["python","animations/multiwall_warp_core.py"]]],
]
return playlist
3 changes: 2 additions & 1 deletion scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ def abort(signal,frame,pids):
signal.pause

while 1:
reload(playlist)
pl=playlist.getPlaylist()
i = random.choice(pl)
i = random.choice(pl)
t = i[0]
processlist=[]
pids=open(pidfile,"w")
Expand Down
2 changes: 1 addition & 1 deletion server/acabslrouter.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
server_base_port = int(sys.argv[2])
router_base_port = int(sys.argv[3])

walls = [{'host': 'localhost', 'port': server_base_port, 'simhost': '83.133.179.134', 'simport': server_base_port, 'startx': 0, 'starty': 0}]
walls = [{'host': 'localhost', 'port': server_base_port, 'simhost': '0.0.0.0', 'simport': server_base_port, 'startx': 0, 'starty': 0}]

#inputs = [[port, priority, timeout, socket],
inputs = [{'port': router_base_port + 0, 'priority': 0, 'timeout': 1},
Expand Down
7 changes: 7 additions & 0 deletions start-fahrty
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
python server/acabslrouter.py nosimulation 7004 8000 &
python server/acabslserver.py server/config-fahrty.py &
#python animations/s-color4-faster.py --port=8000 --wallsizex=2 --wallsizey=4 &
python animations/init.py

screen -A -m -d -S schedulerfahrty python scheduler.py playlist-fahrty 8001 2 4

0 comments on commit 845faed

Please sign in to comment.