aboutsummaryrefslogtreecommitdiff
path: root/host/config.py
diff options
context:
space:
mode:
authorjaseg <code@jaseg.net>2016-01-01 15:55:52 +0100
committerjaseg <code@jaseg.net>2016-01-02 01:28:58 +0100
commit330e1eb20ec751256ea1cee7a6b100e1cb2d3a72 (patch)
tree60b87fadebd58788b059b9eadc9e2ac3a6a9c746 /host/config.py
parent245fbf3d6b5bb5d9cd75882a2fda3f5604335f25 (diff)
downloadmatelight-330e1eb20ec751256ea1cee7a6b100e1cb2d3a72.tar.gz
matelight-330e1eb20ec751256ea1cee7a6b100e1cb2d3a72.tar.bz2
matelight-330e1eb20ec751256ea1cee7a6b100e1cb2d3a72.zip
Host: Add console CRAP client
Diffstat (limited to 'host/config.py')
-rw-r--r--host/config.py44
1 files changed, 28 insertions, 16 deletions
diff --git a/host/config.py b/host/config.py
index b68bee5..c6bd42e 100644
--- a/host/config.py
+++ b/host/config.py
@@ -1,13 +1,4 @@
-# Hard timeout in seconds after which (approximately) the rendering of a single item will be cut off
-RENDERER_TIMEOUT = 20.0
-# How long to show an image by default
-DEFAULT_IMAGE_DURATION = 10.0
-# Default scrolling speed in pixels/second
-DEFAULT_SCROLL_SPEED = 4
-# Pixels to leave blank between two letters
-LETTER_SPACING = 0
-
# Display geometry
# ┌─────────┐ ┌───┬───┬ ⋯ ┬───┬───┐
# │1 o o o 5│ │ 1 │ │ │ │ 8│
@@ -19,13 +10,34 @@ LETTER_SPACING = 0
# │25 │ │ │ │32 │
# └───┴───┴ ⋯ ┴───┴───┘
-CRATE_WIDTH = 5
-CRATE_HEIGHT = 4
-CRATES_X = 8
-CRATES_Y = 4
+# Physical display dimensions
+crate_width = 5
+crate_height = 4
+crates_x = 8
+crates_y = 4
# Computed values
-DISPLAY_WIDTH = CRATES_X * CRATE_WIDTH
-DISPLAY_HEIGHT = CRATES_Y * CRATE_HEIGHT
-FRAME_SIZE = DISPLAY_WIDTH*DISPLAY_HEIGHT*3
+display_width = crates_x * crate_width
+display_height = crates_y * crate_height
+crate_size = crate_width*crate_height
+frame_size = display_width*display_height
+
+# Display gamma factor
+gamma = 2.5
+
+# Brightness of the display. 0 to 1.0
+brightness = 1.0
+
+# Frame timeout for UDP clients
+udp_timeout = 3.0
+
+# Interval for rotation of multiple concurrent UDP clients
+udp_switch_interval = 30.0
+
+# Listening addr/port for UDP and TCP servers
+udp_addr = tcp_addr = ''
+udp_port = tcp_port = 1337
+
+# Forward addr/port
+crap_fw_addr, crap_fw_port = '127.0.0.1', 1338