source: rc/puzzlebox_brainstorms_configuration.py @ 25

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

configuration:

  • comment cleanup

client_interface:

  • page_down key fixed
File size: 3.5 KB
RevLine 
[5]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#
[11]13# Last Update: 2010.02.01
[5]14#
15#####################################################################
16
[12]17import os
18
[5]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
[23]45#BRAINSTORMS_LOGFILE = 'brainstorms'
[5]46
47
48#####################################################################
49# Network addresses
50#####################################################################
51
52#SERVER_HOST = '127.0.0.1'
[8]53SERVER_HOST = '192.168.1.150'
54#SERVER_HOST = ''
[5]55SERVER_PORT = 8194
56
57
58#####################################################################
59# Remote Control configuration
60#####################################################################
61
62BLUETOOTH_DEVICE = '/dev/rfcomm0'
63MOTORS_MOUNTED_BACKWARDS = True
64MOTOR_PORT_RIGHT = 'a'
65MOTOR_PORT_LEFT = 'b'
[7]66DEFAULT_RC_COMMAND = 'test_drive'
[5]67
68
69#####################################################################
[6]70# Server configuration
[5]71#####################################################################
72
[6]73MAX_COMPONENTS = 16
[5]74
75
[6]76#####################################################################
77# Client configuration
78#####################################################################
[5]79
80MAX_CONNECTION_ATTEMPTS = 5
81HEALTH_CHECK_CONNECTION_ATTEMPTS = 5
82NO_REPLY_WAIT = 10 # how many seconds before considering a component dead
83
[11]84
85#####################################################################
[12]86# Client Interface configuration
[11]87#####################################################################
88
89DISPLAY_WINDOW_X_COORDINATE = 0
90DISPLAY_WINDOW_Y_COORDINATE = 0
[21]91DISPLAY_WINDOW_X_DIMENSION = 254
92DISPLAY_WINDOW_Y_DIMENSION = 424
[11]93
94#WINDOW_BACKGROUND_COLOR = (255,255,255) # white background
95#WINDOW_BACKGROUND_COLOR = (128,128,128) # grey background
96#WINDOW_BACKGROUND_COLOR = (64,64,64)    # dark grek background
97WINDOW_BACKGROUND_COLOR = (0,0,0)       # black background
98
99IMAGE_DIRECTORY = os.path.join(os.getcwd(), 'images')
100
[18]101BUTTON_LAYOUT = { \
102        'name': 'Button Layout', \
103        'buttons': [ \
[20]104                     ['1-upper_left-white.png', '1-upper_left-orange.png',
105                       0, 0, 'turn_left'], \
106                     ['2-up-white.png', '2-up-orange.png', \
[21]107                       98, 0, 'drive_forward'], \
[20]108                     ['3-upper_right-white.png', '3-upper_right-orange.png', \
[21]109                       157, 0, 'turn_right'], \
[20]110                     ['7-lower_left-white.png', '7-lower_left-orange.png', \
[21]111                       0, 220, 'turn_left_in_reverse'], \
[20]112                     ['8-down-white.png', '8-down-orange.png', \
[21]113                       98, 220, 'drive_reverse'], \
[20]114                     ['9-lower_right-white.png', '9-lower_right-orange.png', \
[21]115                       157, 220, 'turn_right_in_reverse'], \
[18]116                   ]
[20]117}
Note: See TracBrowser for help on using the repository browser.