-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfig.py
143 lines (124 loc) · 3.68 KB
/
Config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
curtain = "" #choose old, new or local
whichProtocol = "UDP" #choose between UDP or TCP
useImages = False
useAudio = True
useInput = False
useHusl = False
useOpenWeather = False
class openWeather:
api=""
cityID="4931972"
import ScreenCanvasArray
Canvas = ScreenCanvasArray.Canvas
SendRate=24
####
#If using windows you must modify the following lines
pypyPath = "" #path to the pypy executable
#end modify windows
############
if whichProtocol == "TCP":
import Transportation.Sockets.ClientSocketTCP as Client
import Transportation.Sockets.ServerSocketTCP as Server
ClientProtocolClass = Client.ClientSocketTCP
ServerProtocolClass = Server.ServerSocketTCP
elif whichProtocol == "UDP":
import Transportation.Sockets.ClientSocketUDP as Client
import Transportation.Sockets.ServerSocketUDP as Server
ClientProtocolClass = Client.ClientSocketUDP
ServerProtocolClass = Server.ServerSocketUDP
else:
print("PLEASE CHOOSE A VALID PROTOCOL")
if curtain=="old":
width = 15
height = 5
host='10.0.63.101'
port=6038
import Transportation.Protocol.OldProtocol as P
Protocol = P
class ColorManagerConfig:
####
#Sets gamma to BaseGamma + brightness * factor
#This happens to improve the image quality, but it is not supported
#by theory.
redBaseGamma = 1.65
greenBaseGamma = 1.55
blueBaseGamma = 1.65
redBrightnessFactor = 1.1
greenBrightnessFactor = 1.2
blueBrightnessFactor = 1.1
import ColorManager as C
convertColor = C.convertColorToLin #Converts the color profile to linear
elif curtain=='local': #Assume local
width = 60
height = 30
host='localhost'
port=5000
import Transportation.Protocol.SimpleProtocol as P
Protocol = P
class ColorManagerConfig:
####
#Sets gamma to BaseGamma + brightness * factor
#This happens to improve the image quality, but it is not supported
#by theory.
redBaseGamma = 2.4
greenBaseGamma = 2.4
blueBaseGamma = 2.4
redBrightnessFactor = 0
greenBrightnessFactor = 0
blueBrightnessFactor = 0
import ColorManager as C
convertColor = C.convertColorToLin #Converts the color profile to linear
elif curtain=='new': #New LED panel
width = 60
height = 30
host=''
port=5000
import Transportation.Protocol.SimpleProtocol as P
Protocol = P
P.canvasToData = P.canvasToRawData
class ColorManagerConfig:
####
#Sets gamma to BaseGamma + brightness * factor
#This happens to improve the image quality, but it is not supported
#by theory.
redBaseGamma = 1.65
greenBaseGamma = 1.55
blueBaseGamma = 1.65
redBrightnessFactor = 1.1
greenBrightnessFactor = 1.2
blueBrightnessFactor = 1.1
import ColorManager as C
convertColor = C.convertColorToLin
class LocalDisplayConfig:
width = 60
height = 30
port = 5000
normalize = True
linearColorProfileCorretion = True
class ColorManagerConfig:
####
#Sets gamma to BaseGamma + brightness * factor
#This happens to improve the image quality, but it is not supported
#by theory.
redBaseGamma = 2.4
greenBaseGamma = 2.4
blueBaseGamma = 2.4
redBrightnessFactor = 0
greenBrightnessFactor = 0
blueBrightnessFactor = 0
class AudioServerConfig:
port = 5001
host = 'localhost'
delay = -0.13
alpha = 0.95
maxBPS = 6
class InputServerConfig:
port = 5002
host = 'localhost'
server = ''
playerNumber = '1'
class PiDisplayConfig:
width = 60
height = 30
port = 5000
host = ''