Ignore:
Timestamp:
07/10/10 03:06:54 (11 years ago)
Author:
sc
Message:

remote_control/puzzlebox_brainstorms_network_client.py:

  • NXT voltage status updates to client interface

remote_control/puzzlebox_brainstorms_remote_control.py:

  • NXT voltage status updates to client interface

remote_control/puzzlebox_brainstorms_client_interface_local.py:

  • automatic connection to local Brainstorms server instance

remote_control/puzzlebox_brainstorms_network_server.py:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • remote_control/puzzlebox_brainstorms_remote_control.py

    r87 r98  
    99# For more information please refer to http://www.gnu.org/copyleft/gpl.html 
    1010# 
    11 # Last Update: 2010.07.06 
     11# Last Update: 2010.07.09 
    1212# 
    1313##################################################################### 
     
    9696        def get_battery_voltage(self, connection): 
    9797                 
    98                 cmd = jaraco.nxt.messages.GetBatteryLevel() 
    99                 connection.send(cmd) 
    100                  
    101                 response = connection.receive() 
    102                 voltage = response.get_voltage() 
     98                voltage = 'N/A' 
     99                 
     100                if connection != None: 
     101                         
     102                        cmd = jaraco.nxt.messages.GetBatteryLevel() 
     103                        connection.send(cmd) 
     104                         
     105                        response = connection.receive() 
     106                        voltage = response.get_voltage() 
     107                 
    103108                 
    104109                return(voltage) 
Note: See TracChangeset for help on using the changeset viewer.