Changeset 43


Ignore:
Timestamp:
06/02/10 09:20:26 (11 years ago)
Author:
sc
Message:

server:

  • import of remote_control by server to execute in order

to avoid pathing issues for Python under Windows

configuration:

  • sane platform dependent defaults for Bluetooth communications

port

py2exe:

  • preparation for 0.1.1 release
Location:
remote_control
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • remote_control/puzzlebox_brainstorms_configuration.py

    r42 r43  
    99# For more information please refer to http://www.gnu.org/copyleft/gpl.html 
    1010# 
    11 # Last Update: 2010.05.03 
     11# Last Update: 2010.06.01 
    1212# 
    1313##################################################################### 
    1414 
    15 import os 
     15import os, sys 
    1616import pygame 
    1717 
     
    2222DEBUG = 1 
    2323 
    24 DISCRETE_CONTROL_COMMANDS = False 
     24DISCRETE_CONTROL_COMMANDS = True 
    2525 
    2626##################################################################### 
     
    6161##################################################################### 
    6262 
    63 BLUETOOTH_DEVICE = '/dev/rfcomm0' 
     63if (sys.platform == 'win32'): 
     64        BLUETOOTH_DEVICE = 'COM1' 
     65else: 
     66        BLUETOOTH_DEVICE = '/dev/rfcomm0' 
     67 
    6468MOTORS_MOUNTED_BACKWARDS = True 
    6569MOTOR_PORT_RIGHT = 'a' 
  • remote_control/puzzlebox_brainstorms_py2exe.py

    r31 r43  
    88# For more information please refer to http://www.gnu.org/copyleft/gpl.html 
    99# 
    10 # Last Update: 2010.02.02 
     10# Last Update: 2010.06.01 
    1111# 
    1212##################################################################### 
     
    2525setup( 
    2626        name='Puzzlebox Brainstorms', 
    27         version='0.1.0', 
     27        version='0.1.1', 
    2828        description='Puzzlebox Brainstorms', 
    2929        author='Steve Castellotti', 
  • remote_control/puzzlebox_brainstorms_server.py

    r42 r43  
    99# For more information please refer to http://www.gnu.org/copyleft/gpl.html 
    1010# 
    11 # Last Update: 2010.05.03 
     11# Last Update: 2010.06.01 
    1212# 
    1313##################################################################### 
     
    2020import puzzlebox_brainstorms_configuration as configuration 
    2121import puzzlebox_brainstorms_client 
     22import puzzlebox_brainstorms_remote_control as remote_control 
    2223#import puzzlebox_logger 
    2324 
     
    6162                if DISCRETE_CONTROL_COMMANDS: 
    6263                         
    63                         command_line = 'python puzzlebox_brainstorms_remote_control.py --command=%s' % command 
    64                          
    65                         os.system(command_line) 
     64                        self.execute_command(command) 
    6665                 
    6766                 
     
    7170                 
    7271                return d 
     72         
     73         
     74        ################################################################## 
     75         
     76        def execute_command(self, command): 
     77                 
     78                #command_line = 'python puzzlebox_brainstorms_remote_control.py --command=%s' % command 
     79                 
     80                #os.system(command_line) 
     81                 
     82                rc = remote_control.puzzlebox_brainstorms_rc( \ 
     83                        device=configuration.BLUETOOTH_DEVICE, \ 
     84                        command=command, \ 
     85                        DEBUG=DEBUG) 
     86                 
     87                if rc.connection != None: 
     88                        rc.run(rc.command) 
     89                        rc.stop() 
    7390         
    7491         
Note: See TracChangeset for help on using the changeset viewer.