source: rc/puzzlebox_brainstorms_configuration.py @ 20

Last change on this file since 20 was 20, checked in by sc, 12 years ago

configuration:

  • SVG arrows replacing Cog Engine arrows
File size: 4.3 KB
Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3#
4# Puzzlebox - Brainstorms - Configuration
5#
6# Copyright Steven M. Castellotti (2010)
7#
8# Portions of this code have been previously
9# released under the GNU Pulic License (GPL) version 2
10# and is Copyright Steven M. Castellotti (2010)
11# For more information please refer to http://www.gnu.org/copyleft/gpl.htm
12#
13# Last Update: 2010.02.01
14#
15#####################################################################
16
17import os
18
19#####################################################################
20# General configuration
21#####################################################################
22
23DEBUG = 1
24
25#####################################################################
26# Logging
27#####################################################################
28
29LOG_LEVEL_DEBUG = 2
30LOG_LEVEL_INFO = 1
31LOG_LEVEL_ERROR = 0
32LOG_LEVEL_DISABLE = -1
33
34DEFAULT_LOG_LEVEL = LOG_LEVEL_DEBUG
35DEFAULT_LOGFILE = 'puzzlebox'
36
37LOGFILE_DIR = '/var/log/puzzlebox'
38LOGFILE_SUFFIX = '.log'
39LOGFILE_SUFFIX_DEBUG = '_debug.log'
40LOGFILE_SUFFIX_INFO = '_info.log'
41LOGFILE_SUFFIX_ERROR = '_error.log'
42
43SPLIT_LOGFILES = False
44
45#MONITORING_LOGFILE = 'monitoring'
46#MONITORING_FAILLOG = 'monitoring_failure'
47#XORG_RESET_LOGFILE = 'xorg_reset'
48
49
50#####################################################################
51# Network addresses
52#####################################################################
53
54#SERVER_HOST = '127.0.0.1'
55SERVER_HOST = '192.168.1.150'
56#SERVER_HOST = ''
57SERVER_PORT = 8194
58
59
60#####################################################################
61# Remote Control configuration
62#####################################################################
63
64BLUETOOTH_DEVICE = '/dev/rfcomm0'
65MOTORS_MOUNTED_BACKWARDS = True
66MOTOR_PORT_RIGHT = 'a'
67MOTOR_PORT_LEFT = 'b'
68DEFAULT_RC_COMMAND = 'test_drive'
69
70
71#####################################################################
72# Server configuration
73#####################################################################
74
75MAX_COMPONENTS = 16
76
77
78#####################################################################
79# Client configuration
80#####################################################################
81
82MAX_CONNECTION_ATTEMPTS = 5
83HEALTH_CHECK_CONNECTION_ATTEMPTS = 5
84NO_REPLY_WAIT = 10 # how many seconds before considering a component dead
85
86
87#####################################################################
88# Client Interface configuration
89#####################################################################
90
91DISPLAY_WINDOW_X_COORDINATE = 0
92DISPLAY_WINDOW_Y_COORDINATE = 0
93DISPLAY_WINDOW_X_DIMENSION = 313
94DISPLAY_WINDOW_Y_DIMENSION = 526
95
96#WINDOW_BACKGROUND_COLOR = (255,255,255) # white background
97#WINDOW_BACKGROUND_COLOR = (128,128,128) # grey background
98#WINDOW_BACKGROUND_COLOR = (64,64,64)    # dark grek background
99WINDOW_BACKGROUND_COLOR = (0,0,0)       # black background
100
101IMAGE_DIRECTORY = os.path.join(os.getcwd(), 'images')
102
103#BUTTON_LAYOUT = { \
104        #'name': 'Button Layout', \
105        #'buttons': [ \
106                     #['2-up-orange.png', '2-up-yellow.png', \
107                       #37, 0, 'drive_forward'], \
108                     #['4-left-orange.png', '4-left-yellow.png',
109                       #0, 37, 'turn_left'], \
110                     #['5-center.png', '5-center.png',
111                       #37, 37, None], \
112                     #['6-right-orange.png', '6-right-yellow.png', \
113                       #74, 37, 'turn_right'], \
114                     #['8-down-orange.png', '8-down-yellow.png', \
115                       #37, 74, 'drive_reverse'], \
116                     #['9-lower_right-orange.png', '9-lower_right-yellow.png', \
117                       #74, 74, 'turn_in_reverse'], \
118                   #]
119#}
120
121BUTTON_LAYOUT = { \
122        'name': 'Button Layout', \
123        'buttons': [ \
124                     ['1-upper_left-white.png', '1-upper_left-orange.png',
125                       0, 0, 'turn_left'], \
126                     ['2-up-white.png', '2-up-orange.png', \
127                       121, 0, 'drive_forward'], \
128                     ['3-upper_right-white.png', '3-upper_right-orange.png', \
129                       193, 0, 'turn_right'], \
130                     ['7-lower_left-white.png', '7-lower_left-orange.png', \
131                       0, 300, 'turn_in_reverse'], \
132                     ['8-down-white.png', '8-down-orange.png', \
133                       121, 300, 'drive_reverse'], \
134                     ['9-lower_right-white.png', '9-lower_right-orange.png', \
135                       193, 300, 'turn_in_reverse'], \
136                   ]
137}
Note: See TracBrowser for help on using the repository browser.