CLEANUP: remove debug messages
git-svn-id: http://www.neo1973-germany.de/svn@47 46df4e5c-bc4e-4628-a0fc-830ba316316d
This commit is contained in:
parent
c539f22371
commit
2406fb85e0
1 changed files with 1 additions and 9 deletions
|
@ -29,6 +29,7 @@ from GlobalConfiguration import *
|
||||||
from SysFSAccess import *
|
from SysFSAccess import *
|
||||||
from ProcessInterface import *
|
from ProcessInterface import *
|
||||||
|
|
||||||
|
|
||||||
class BluetoothScanner(threading.Thread):
|
class BluetoothScanner(threading.Thread):
|
||||||
def __init__(self, update_callback):
|
def __init__(self, update_callback):
|
||||||
threading.Thread.__init__(self)
|
threading.Thread.__init__(self)
|
||||||
|
@ -40,13 +41,10 @@ class BluetoothScanner(threading.Thread):
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
while (self.keep_running):
|
while (self.keep_running):
|
||||||
print "RUN"
|
|
||||||
if self.scan_active:
|
if self.scan_active:
|
||||||
print "SCAN"
|
|
||||||
self.update_callback(self.update_list())
|
self.update_callback(self.update_list())
|
||||||
time.sleep(3) # scan every 3 seconds, when running
|
time.sleep(3) # scan every 3 seconds, when running
|
||||||
else:
|
else:
|
||||||
print "WAIT"
|
|
||||||
time.sleep(1) # check again if we are active in a second
|
time.sleep(1) # check again if we are active in a second
|
||||||
|
|
||||||
|
|
||||||
|
@ -251,11 +249,9 @@ class BluetoothPanel(gtk.VBox):
|
||||||
def update_from_scanner(self, data):
|
def update_from_scanner(self, data):
|
||||||
(visible_peers, connected_peers) = data
|
(visible_peers, connected_peers) = data
|
||||||
|
|
||||||
print "enter critical section"
|
|
||||||
self.update_ui_condition.acquire() # <- critical section
|
self.update_ui_condition.acquire() # <- critical section
|
||||||
self.peer_list = [] # to be handled in critical section!
|
self.peer_list = [] # to be handled in critical section!
|
||||||
|
|
||||||
print "entry loop"
|
|
||||||
for entry in visible_peers:
|
for entry in visible_peers:
|
||||||
## see if entry can be found in conneced list
|
## see if entry can be found in conneced list
|
||||||
found = False
|
found = False
|
||||||
|
@ -265,13 +261,9 @@ class BluetoothPanel(gtk.VBox):
|
||||||
found = True
|
found = True
|
||||||
## add to list als (Name, Address, Found)
|
## add to list als (Name, Address, Found)
|
||||||
self.peer_list.append((entry[0], entry[1], found))
|
self.peer_list.append((entry[0], entry[1], found))
|
||||||
print "added entry"
|
|
||||||
|
|
||||||
print "entry loop left"
|
|
||||||
|
|
||||||
self.async_updated = True # to be handled in critical section!
|
self.async_updated = True # to be handled in critical section!
|
||||||
self.update_ui_condition.release() # -> critical section
|
self.update_ui_condition.release() # -> critical section
|
||||||
print "leaving critical section"
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
####################### Callbacks from GUI #####################################
|
####################### Callbacks from GUI #####################################
|
||||||
|
|
Loading…
Reference in a new issue