Ignore:
Timestamp:
10/02/10 01:46:17 (12 years ago)
Author:
sc
Message:

trunk/synapse/Puzzlebox/Synapse/Interface.py:

  • comment cleanup

Brainstorms:

  • Initial update to proper Python Module support
Location:
trunk/brainstorms/Puzzlebox
Files:
6 added
7 moved

Legend:

Unmodified
Added
Removed
  • trunk/brainstorms/Puzzlebox/Brainstorms/Client.py

    r196 r197  
    88# This code is released under the GNU Pulic License (GPL) version 2 
    99# For more information please refer to http://www.gnu.org/copyleft/gpl.html 
    10 # 
    11 # Last Update: 2010.07.10 
    12 # 
    13 ##################################################################### 
     10 
     11__changelog__ = """\ 
     12Last Update: 2010.10.01 
     13 
     14""" 
    1415 
    1516import os, sys 
     
    2930import simplejson as json 
    3031 
    31 import puzzlebox_brainstorms_configuration as configuration 
     32import Configuration as configuration 
    3233#import puzzlebox_logger 
    3334 
  • trunk/brainstorms/Puzzlebox/Brainstorms/Configuration.py

    r196 r197  
    88# This code is released under the GNU Pulic License (GPL) version 2 
    99# For more information please refer to http://www.gnu.org/copyleft/gpl.html 
    10 # 
    11 # Last Update: 2010.07.10 
    12 # 
    13 ##################################################################### 
     10 
     11__changelog__ = """\ 
     12Last Update: 2010.10.01 
     13 
     14""" 
    1415 
    1516import os, sys 
    16 import pygame 
     17#import pygame 
    1718 
    1819##################################################################### 
     
    175176##################################################################### 
    176177 
    177 CLIENT_PYGAME_DISPLAY_WINDOW_X_COORDINATE = 0 
    178 CLIENT_PYGAME_DISPLAY_WINDOW_Y_COORDINATE = 0 
    179 CLIENT_PYGAME_DISPLAY_WINDOW_X_DIMENSION = 254 
    180 CLIENT_PYGAME_DISPLAY_WINDOW_Y_DIMENSION = 424 
    181  
    182 #CLIENT_PYGAME_WINDOW_BACKGROUND_COLOR = (255,255,255) # white background 
    183 #CLIENT_PYGAME_WINDOW_BACKGROUND_COLOR = (128,128,128) # grey background 
    184 #CLIENT_PYGAME_WINDOW_BACKGROUND_COLOR = (64,64,64)    # dark grek background 
    185 CLIENT_PYGAME_WINDOW_BACKGROUND_COLOR = (0,0,0)       # black background 
    186  
    187 CLIENT_PYGAME_IMAGE_DIRECTORY = os.path.join(os.getcwd(), 'images') 
    188  
    189 # Keyboard key reference at http://www.pygame.org/docs/ref/key.html#pygame.key 
    190 CLIENT_PYGAME_BUTTON_LAYOUT = { \ 
    191          
    192         'left': { \ 
    193                 'command': 'turn_left', \ 
    194                 'active': False, \ 
    195                 'button_image': '1-upper_left-white.png', \ 
    196                 'activated_image': '1-upper_left-orange.png', \ 
    197                 'image_x': 0, \ 
    198                 'image_y': 0, \ 
    199                 'match_keys': [pygame.K_LEFT, pygame.K_a, pygame.K_q] 
    200                 }, \ 
    201          
    202         'forward': { \ 
    203                 'command': 'drive_forward', \ 
    204                 'active': False, \ 
    205                 'button_image': '2-up-white.png', \ 
    206                 'activated_image': '2-up-orange.png', \ 
    207                 'image_x': 98, \ 
    208                 'image_y': 0, \ 
    209                 'match_keys': [pygame.K_UP, pygame.K_w] 
    210                 }, \ 
    211          
    212         'right': { \ 
    213                 'command': 'turn_right', \ 
    214                 'active': False, \ 
    215                 'button_image': '3-upper_right-white.png', \ 
    216                 'activated_image': '3-upper_right-orange.png', \ 
    217                 'image_x': 157, \ 
    218                 'image_y': 0, \ 
    219                 'match_keys': [pygame.K_RIGHT, pygame.K_d, pygame.K_e] 
    220                 }, \ 
    221          
    222         'reverse_left': { \ 
    223                 'command': 'turn_left_in_reverse', \ 
    224                 'active': False, \ 
    225                 'button_image': '7-lower_left-white.png', \ 
    226                 'activated_image': '7-lower_left-orange.png', \ 
    227                 'image_x': 0, \ 
    228                 'image_y': 220, \ 
    229                 'match_keys': [pygame.K_z] 
    230                 }, \ 
    231          
    232         'reverse': { \ 
    233                 'command': 'drive_reverse', \ 
    234                 'active': False, \ 
    235                 'button_image': '8-down-white.png', \ 
    236                 'activated_image': '8-down-orange.png', \ 
    237                 'image_x': 98, \ 
    238                 'image_y': 220, \ 
    239                 'match_keys': [pygame.K_DOWN, pygame.K_s, pygame.K_x] 
    240                 }, \ 
    241          
    242         'reverse_right': { \ 
    243                 'command': 'turn_right_in_reverse', \ 
    244                 'active': False, \ 
    245                 'button_image': '9-lower_right-white.png', \ 
    246                 'activated_image': '9-lower_right-orange.png', \ 
    247                 'image_x': 157, \ 
    248                 'image_y': 220, \ 
    249                 'match_keys': [pygame.K_PAGEDOWN, pygame.K_c] 
    250                 }, \ 
    251          
    252 } # BUTTON_LAYOUT 
     178#CLIENT_PYGAME_DISPLAY_WINDOW_X_COORDINATE = 0 
     179#CLIENT_PYGAME_DISPLAY_WINDOW_Y_COORDINATE = 0 
     180#CLIENT_PYGAME_DISPLAY_WINDOW_X_DIMENSION = 254 
     181#CLIENT_PYGAME_DISPLAY_WINDOW_Y_DIMENSION = 424 
     182 
     183##CLIENT_PYGAME_WINDOW_BACKGROUND_COLOR = (255,255,255) # white background 
     184##CLIENT_PYGAME_WINDOW_BACKGROUND_COLOR = (128,128,128) # grey background 
     185##CLIENT_PYGAME_WINDOW_BACKGROUND_COLOR = (64,64,64)    # dark grek background 
     186#CLIENT_PYGAME_WINDOW_BACKGROUND_COLOR = (0,0,0)       # black background 
     187 
     188#CLIENT_PYGAME_IMAGE_DIRECTORY = os.path.join(os.getcwd(), 'images') 
     189 
     190## Keyboard key reference at http://www.pygame.org/docs/ref/key.html#pygame.key 
     191#CLIENT_PYGAME_BUTTON_LAYOUT = { \ 
     192         
     193        #'left': { \ 
     194                #'command': 'turn_left', \ 
     195                #'active': False, \ 
     196                #'button_image': '1-upper_left-white.png', \ 
     197                #'activated_image': '1-upper_left-orange.png', \ 
     198                #'image_x': 0, \ 
     199                #'image_y': 0, \ 
     200                #'match_keys': [pygame.K_LEFT, pygame.K_a, pygame.K_q] 
     201                #}, \ 
     202         
     203        #'forward': { \ 
     204                #'command': 'drive_forward', \ 
     205                #'active': False, \ 
     206                #'button_image': '2-up-white.png', \ 
     207                #'activated_image': '2-up-orange.png', \ 
     208                #'image_x': 98, \ 
     209                #'image_y': 0, \ 
     210                #'match_keys': [pygame.K_UP, pygame.K_w] 
     211                #}, \ 
     212         
     213        #'right': { \ 
     214                #'command': 'turn_right', \ 
     215                #'active': False, \ 
     216                #'button_image': '3-upper_right-white.png', \ 
     217                #'activated_image': '3-upper_right-orange.png', \ 
     218                #'image_x': 157, \ 
     219                #'image_y': 0, \ 
     220                #'match_keys': [pygame.K_RIGHT, pygame.K_d, pygame.K_e] 
     221                #}, \ 
     222         
     223        #'reverse_left': { \ 
     224                #'command': 'turn_left_in_reverse', \ 
     225                #'active': False, \ 
     226                #'button_image': '7-lower_left-white.png', \ 
     227                #'activated_image': '7-lower_left-orange.png', \ 
     228                #'image_x': 0, \ 
     229                #'image_y': 220, \ 
     230                #'match_keys': [pygame.K_z] 
     231                #}, \ 
     232         
     233        #'reverse': { \ 
     234                #'command': 'drive_reverse', \ 
     235                #'active': False, \ 
     236                #'button_image': '8-down-white.png', \ 
     237                #'activated_image': '8-down-orange.png', \ 
     238                #'image_x': 98, \ 
     239                #'image_y': 220, \ 
     240                #'match_keys': [pygame.K_DOWN, pygame.K_s, pygame.K_x] 
     241                #}, \ 
     242         
     243        #'reverse_right': { \ 
     244                #'command': 'turn_right_in_reverse', \ 
     245                #'active': False, \ 
     246                #'button_image': '9-lower_right-white.png', \ 
     247                #'activated_image': '9-lower_right-orange.png', \ 
     248                #'image_x': 157, \ 
     249                #'image_y': 220, \ 
     250                #'match_keys': [pygame.K_PAGEDOWN, pygame.K_c] 
     251                #}, \ 
     252         
     253#} # BUTTON_LAYOUT 
    253254 
    254255 
  • trunk/brainstorms/Puzzlebox/Brainstorms/Interface.py

    r196 r197  
    88# This code is released under the GNU Pulic License (GPL) version 2 
    99# For more information please refer to http://www.gnu.org/copyleft/gpl.html 
    10 # 
    11 # Last Update: 2010.07.10 
    12 # 
    13 ##################################################################### 
    14 # To Do: 
    15 # - server may not correctly handle multiple clients connected 
    16 #      to an embedded Brainstorms server 
    17 # - disable autorepeating on shortcut keys 
    18 # - update configuration.ini file with settings entered into interface 
    19 ##################################################################### 
     10 
     11__changelog__ = """\ 
     12Last Update: 2010.10.01 
     13 
     14""" 
     15 
     16__todo__ = """ 
     17 - server may not correctly handle multiple clients connected 
     18      to an embedded Brainstorms server 
     19 - disable autorepeating on shortcut keys 
     20 - update configuration.ini file with settings entered into interface 
     21 
     22""" 
    2023 
    2124import os, sys 
     
    3336#from PySide import QtCore, QtGui, QtNetwork 
    3437 
    35 from puzzlebox_brainstorms_client_interface_design import Ui_Form 
     38from Interface_Design import Ui_Form as Design 
    3639 
    3740import simplejson as json 
    3841 
    39 import puzzlebox_brainstorms_configuration as configuration 
    40 import puzzlebox_brainstorms_network_client as brainstorms_client 
    41 import puzzlebox_brainstorms_network_client_thinkgear as thinkgear_client 
     42import Configuration as configuration 
     43import Client as brainstorms_client 
     44import Puzzlebox.Brainstorms.ThinkGear.Client as thinkgear_client 
    4245#import puzzlebox_logger 
    4346 
     
    6366##################################################################### 
    6467 
    65 class puzzlebox_brainstorms_client_interface(QtGui.QWidget, Ui_Form): 
     68class puzzlebox_brainstorms_client_interface(QtGui.QWidget, Design): 
    6669         
    6770        def __init__(self, log, server=None, DEBUG=DEBUG, parent = None): 
  • trunk/brainstorms/Puzzlebox/Brainstorms/Remote_Control.py

    r196 r197  
    88# This code is released under the GNU Pulic License (GPL) version 2 
    99# For more information please refer to http://www.gnu.org/copyleft/gpl.html 
    10 # 
    11 # Last Update: 2010.07.10 
    12 # 
    13 ##################################################################### 
     10 
     11__changelog__ = """ 
     12Last Update: 2010.10.01 
     13 
     14""" 
    1415 
    1516import sys, time 
     
    1920import jaraco.nxt.messages 
    2021 
    21 import puzzlebox_brainstorms_configuration as configuration 
     22import Configuration as configuration 
    2223 
    2324##################################################################### 
  • trunk/brainstorms/Puzzlebox/Brainstorms/Server.py

    r196 r197  
    88# This code is released under the GNU Pulic License (GPL) version 2 
    99# For more information please refer to http://www.gnu.org/copyleft/gpl.html 
    10 # 
    11 # Last Update: 2010.07.19 
    12 # 
    13 ##################################################################### 
     10 
     11__changelog__ = """\ 
     12Last Update: 2010.10.01 
     13 
     14""" 
    1415 
    1516import os, sys 
     
    2930from PyQt4 import QtCore, QtNetwork 
    3031 
    31 import puzzlebox_brainstorms_configuration as configuration 
    32 import puzzlebox_brainstorms_remote_control as remote_control 
     32import Configuration as configuration 
     33import Remote_Control as remote_control 
    3334#import puzzlebox_logger 
    3435 
  • trunk/brainstorms/Puzzlebox/Brainstorms/ThinkGear/Client.py

    r196 r197  
    2929import simplejson as json 
    3030 
    31 import puzzlebox_brainstorms_configuration as configuration 
     31import Puzzlebox.Brainstorms.Configuration as configuration 
    3232#import puzzlebox_logger 
    3333 
Note: See TracChangeset for help on using the changeset viewer.