Ignore:
Timestamp:
06/29/10 11:31:19 (11 years ago)
Author:
sc
Message:

brainstorms:

  • comprehensive file and class renaming in response to conversions

from PyGame/Twisted? frameworks to Qt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • remote_control/puzzlebox_brainstorms_configuration.py

    r67 r73  
    99# For more information please refer to http://www.gnu.org/copyleft/gpl.html 
    1010# 
    11 # Last Update: 2010.06.22 
     11# Last Update: 2010.06.28 
    1212# 
    1313##################################################################### 
     
    2222DEBUG = 1 
    2323 
    24 CONFIGURATION_FILE_PATH = 'puzzlebox_brainstorms_configuration.ini' 
    25  
    26 DISCRETE_CONTROL_COMMANDS = True 
    27  
    28 DEFAULT_WINDOWS_BLUETOOTH_DEVICE = 'COM1' 
    29 DEFAULT_LINUX_BLUETOOTH_DEVICE = '/dev/rfcomm0' 
     24BRAINSTORMS_CONFIGURATION_FILE_PATH = 'puzzlebox_brainstorms_configuration.ini' 
     25 
     26BRAINSTORMS_DISCRETE_CONTROL_COMMANDS = True 
     27 
    3028 
    3129##################################################################### 
     
    3937 
    4038DEFAULT_LOG_LEVEL = LOG_LEVEL_DEBUG 
    41 DEFAULT_LOGFILE = 'puzzlebox' 
     39DEFAULT_LOGFILE = 'brainstorms' 
    4240 
    4341LOGFILE_DIR = '/var/log/puzzlebox' 
     
    4947SPLIT_LOGFILES = False 
    5048 
    51 #BRAINSTORMS_LOGFILE = 'brainstorms' 
    52  
    5349 
    5450##################################################################### 
     
    5652##################################################################### 
    5753 
    58 SERVER_INTERFACE = '' # listen on all of server's network interfaces 
    59 #SERVER_HOST = '172.16.1.1' 
    60 SERVER_HOST = '127.0.0.1' # localhost 
    61 SERVER_PORT = 8194 
     54BRAINSTORMS_SERVER_INTERFACE = '' # listen on all of server's network interfaces 
     55BRAINSTORMS_SERVER_HOST = '127.0.0.1' # localhost 
     56BRAINSTORMS_SERVER_PORT = 8194 
    6257 
    6358THINKGEAR_SERVER_HOST = '127.0.0.1' 
     
    6964##################################################################### 
    7065 
     66DEFAULT_NXT_BLUETOOTH_DEVICE_WINDOWS = 'COM1' 
     67DEFAULT_NXT_BLUETOOTH_DEVICE_LINUX = '/dev/rfcomm0' 
     68 
    7169if (sys.platform == 'win32'): 
    72         BLUETOOTH_DEVICE = DEFAULT_WINDOWS_BLUETOOTH_DEVICE 
     70        NXT_BLUETOOTH_DEVICE = DEFAULT_NXT_BLUETOOTH_DEVICE_WINDOWS 
    7371else: 
    74         BLUETOOTH_DEVICE = DEFAULT_LINUX_BLUETOOTH_DEVICE 
    75  
    76 MOTORS_MOUNTED_BACKWARDS = True 
    77 MOTOR_PORT_RIGHT = 'a' 
    78 MOTOR_PORT_LEFT = 'b' 
    79 DEFAULT_RC_COMMAND = 'test_drive' 
     72        NXT_BLUETOOTH_DEVICE = DEFAULT_NXT_BLUETOOTH_DEVICE_LINUX 
     73 
     74NXT_MOTORS_MOUNTED_BACKWARDS = True 
     75NXT_MOTOR_PORT_RIGHT = 'a' 
     76NXT_MOTOR_PORT_LEFT = 'b' 
     77NXT_DEFAULT_RC_COMMAND = 'test_drive' 
    8078 
    8179 
     
    8482##################################################################### 
    8583 
    86 MAX_COMPONENTS = 16 
     84TWISTED_SERVER_MAX_COMPONENTS = 16 
    8785 
    8886 
     
    9189##################################################################### 
    9290 
    93 MAX_CONNECTION_ATTEMPTS = 5 
    94 HEALTH_CHECK_CONNECTION_ATTEMPTS = 5 
    95 NO_REPLY_WAIT = 10 # how many seconds before considering a component dead 
     91TWISTED_CLIENT_MAX_CONNECTION_ATTEMPTS = 5 
     92TWISTED_CLIENT_NO_REPLY_WAIT = 10 # how many seconds before considering a component dead 
    9693 
    9794 
     
    10097##################################################################### 
    10198 
    102 ENABLE_THINKGEAR_AUTHORIZATION = False 
     99THINKGEAR_DELIMITER = '\r' 
     100 
     101THINKGEAR_CONFIGURATION_PARAMETERS = {"enableRawOutput": False, "format": "Json"} 
     102 
     103THINKGEAR_AUTHORIZATION_ENABLED = False 
    103104 
    104105THINKGEAR_AUTHORIZATION_REQUEST = { \ 
    105         "appName": "Puzzlebox Brainstorms", \ 
    106         "appKey": "2e285d7bd5565c0ea73e7e265c73f0691d932408" 
    107         } 
     106        "appName": "Puzzlebox Brainstorms", \ 
     107        "appKey": "2e285d7bd5565c0ea73e7e265c73f0691d932408" 
     108} 
    108109 
    109110 
     
    112113##################################################################### 
    113114 
    114 POWER_THRESHOLDS = { \ 
     115THINKGEAR_POWER_THRESHOLDS = { \ 
    115116         
    116117        'concentration': { \ 
     
    143144                }, \ 
    144145         
    145 } # POWER_THRESHOLDS 
     146} # THINKGEAR_POWER_THRESHOLDS 
    146147 
    147148 
     
    150151##################################################################### 
    151152 
    152 DISPLAY_WINDOW_X_COORDINATE = 0 
    153 DISPLAY_WINDOW_Y_COORDINATE = 0 
    154 DISPLAY_WINDOW_X_DIMENSION = 254 
    155 DISPLAY_WINDOW_Y_DIMENSION = 424 
    156  
    157 #WINDOW_BACKGROUND_COLOR = (255,255,255) # white background 
    158 #WINDOW_BACKGROUND_COLOR = (128,128,128) # grey background 
    159 #WINDOW_BACKGROUND_COLOR = (64,64,64)    # dark grek background 
    160 WINDOW_BACKGROUND_COLOR = (0,0,0)       # black background 
    161  
    162 IMAGE_DIRECTORY = os.path.join(os.getcwd(), 'images') 
     153CLIENT_PYGAME_DISPLAY_WINDOW_X_COORDINATE = 0 
     154CLIENT_PYGAME_DISPLAY_WINDOW_Y_COORDINATE = 0 
     155CLIENT_PYGAME_DISPLAY_WINDOW_X_DIMENSION = 254 
     156CLIENT_PYGAME_DISPLAY_WINDOW_Y_DIMENSION = 424 
     157 
     158#CLIENT_PYGAME_WINDOW_BACKGROUND_COLOR = (255,255,255) # white background 
     159#CLIENT_PYGAME_WINDOW_BACKGROUND_COLOR = (128,128,128) # grey background 
     160#CLIENT_PYGAME_WINDOW_BACKGROUND_COLOR = (64,64,64)    # dark grek background 
     161CLIENT_PYGAME_WINDOW_BACKGROUND_COLOR = (0,0,0)       # black background 
     162 
     163CLIENT_PYGAME_IMAGE_DIRECTORY = os.path.join(os.getcwd(), 'images') 
    163164 
    164165# Keyboard key reference at http://www.pygame.org/docs/ref/key.html#pygame.key 
    165 BUTTON_LAYOUT = { \ 
     166CLIENT_PYGAME_BUTTON_LAYOUT = { \ 
    166167         
    167168        'left': { \ 
     
    246247##################################################################### 
    247248 
    248 if os.path.exists(CONFIGURATION_FILE_PATH): 
    249          
    250         file = open(CONFIGURATION_FILE_PATH, 'r') 
     249if os.path.exists(BRAINSTORMS_CONFIGURATION_FILE_PATH): 
     250         
     251        file = open(BRAINSTORMS_CONFIGURATION_FILE_PATH, 'r') 
    251252         
    252253        for line in file.readlines(): 
     
    261262                        exec line 
    262263                except: 
    263                         if DEBUG: 
    264                                 print "Error recognizing configuration option:", 
     264                        if DEBUG: 
     265                                print "Error recognizing Puzzlebox Brainstorms configuration option:", 
    265266                                print line 
    266267 
Note: See TracChangeset for help on using the changeset viewer.