-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathconfig_base.py
109 lines (91 loc) · 2.81 KB
/
config_base.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
# basic set of plugins
plugins = set(['score', 'game', 'sound', 'io_debug', 'menu', 'control', 'league', 'leds', 'io_evdev_keyboard'])
onscreen_leds_enabled = False
blank_console = True
standby_timeout_secs = 600
bg_change_secs = 300
# use dispmanx to draw bg as a separate layer
draw_bg_with_dispmanx = True
clock_format = "%H:%M"
hipchat_token = 'your_token'
hipchat_room = 'your_room_id'
min_goal_usecs = 1000
min_secs_between_goals = 3
show_instructions = True
team_names = {"yellow": "yellow", "black": "black"}
team_colors = {"yellow": (1, 0.7, 0), "black": (0, 0, 0)}
# game modes: tuples of (winning score, timeout in minutes)
game_modes = [(None, None), (3, None), (5, None), (3, 120)]
replay_path = '/dev/shm/replay'
replay_fps = 25
ignore_recent_chunks = 1
short_chunks = 10
long_chunks = 25
league_dir = './league'
league_url = 'http://localhost:8888/api'
league_apikey = 'put-your-apikey-here'
video_size=(1280, 720)
video_fps = 49
camera_preview = "-p 0,0,128,72"
camera_chunk_settings = "-sg 100 -wr 100 -g 10"
camera_extra_params = "--ev 7"
# config parameters for motion detector
# MV frame size
md_size = (video_size[0] // 16 + 1, video_size[1] // 16)
# crop pixels on each size of the frame to avoid detecting movement outside of the table
md_crop_x = 25
# threshold to consider MV movement
md_mv_threshold = 100000
# number of vectors to consider frame to contain movement
md_min_vectors = 30
# number of contiguous frames to required to consider it movemen
md_min_frames = 9
# send people_stop_playing event after X seconds without movement
md_ev_absence_timeout = 30
# send movement_detected every X seconds
md_ev_interval = 2
log = {
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"simple": {
"format": "%(asctime)s %(levelname)7s %(name)s - %(message)s",
"datefmt": "%H:%M:%S"
},
"console": {
"format": "%(levelname)7s - %(message)s"
}
},
"handlers": {
"console": {
"class": "logging.StreamHandler",
"level": "DEBUG",
"formatter": "console",
"stream": "ext://sys.stdout"
},
"file_handler": {
"class": "logging.handlers.RotatingFileHandler",
"level": "DEBUG",
"formatter": "simple",
"filename": "/dev/shm/foos_event.log",
"maxBytes": 1000000,
"backupCount": 3
},
},
"loggers": {
"plugins.event_debugger": {
"level": "DEBUG",
"handlers": ["file_handler"],
"propagate": "no",
},
"pi3d": {
"level": "WARN",
"handlers": ["console", "file_handler"],
"propagate": "no",
}
},
"root": {
"level": "INFO",
"handlers": ["console", "file_handler"]
}
}