Ignore:
Timestamp:
07/02/10 03:17:56 (11 years ago)
Author:
sc
Message:

remote_control/puzzlebox_brainstorms_network_client.py:

  • power transmission settings added

remote_control/puzzlebox_brainstorms_remote_control.py:

  • custom power settings added

remote_control/puzzlebox_brainstorms_client_interface.py:

  • power transmission settings added
  • udpateSpeed method tracks and calculates power settings
  • power transmission settings added

remote_control/puzzlebox_brainstorms_configuration.ini:

  • DEFAULT_NXT_POWER_LEVEL added and set to 80

remote_control/interface/qt4_form.py:

  • font sizes tweaked

remote_control/puzzlebox_brainstorms_configuration.py:

  • DEFAULT_NXT_POWER_LEVEL added and set to 80

remote_control/puzzlebox_brainstorms_network_server.py

  • power transmission settings added
File:
1 edited

Legend:

Unmodified
Added
Removed
  • remote_control/puzzlebox_brainstorms_network_client.py

    r75 r84  
    99# For more information please refer to http://www.gnu.org/copyleft/gpl.html 
    1010# 
    11 # Last Update: 2010.06.28 
     11# Last Update: 2010.07.01 
    1212# 
    1313##################################################################### 
     
    3636DELIMITER = configuration.BRAINSTORMS_DELIMITER 
    3737 
     38DEFAULT_NXT_POWER_LEVEL = configuration.DEFAULT_NXT_POWER_LEVEL 
    3839NXT_DEFAULT_RC_COMMAND = configuration.NXT_DEFAULT_RC_COMMAND 
    3940 
     
    6667                #self.blockSize = 0 
    6768                self.socket = QtNetwork.QTcpSocket() 
    68                 self.socket.name = 'Puzzlebox Brainstorms Client' 
     69                self.socket.name = 'Brainstorms Client' 
    6970                 
    7071                self.socket.readyRead.connect(self.printReply) 
     
    129130        ################################################################## 
    130131         
    131         def sendCommand(self, command): 
     132        def sendCommand(self, command, power=DEFAULT_NXT_POWER_LEVEL): 
     133                 
     134                packet = {} 
     135                packet['command'] = command 
     136                packet['power'] = power 
    132137                 
    133138                if self.DEBUG: 
    134139                        print "--> [%s] Sending:" % self.socket.name, 
    135                         print command 
     140                        print packet 
    136141                 
    137142                self.socket.abort() 
    138143                self.socket.connectToHost(self.server_host, self.server_port) 
    139144                 
    140                 data = json.dumps(command) 
     145                data = json.dumps(packet) 
    141146                 
    142147                if self.socket.waitForConnected(CLIENT_NO_REPLY_WAIT): 
Note: See TracChangeset for help on using the changeset viewer.