[tuxdroid-svn] r5352 - software_suite_v3/smart-core/smart-server/trunk/resources/02_robot
Status: Beta
Brought to you by:
ks156
|
From: remi <c2m...@c2...> - 2009-09-10 14:10:33
|
Author: remi
Date: 2009-09-10 16:10:04 +0200 (Thu, 10 Sep 2009)
New Revision: 5352
Modified:
software_suite_v3/smart-core/smart-server/trunk/resources/02_robot/10_resourceRF.py
Log:
* Improved wifi auto-avoidance strategy.
Modified: software_suite_v3/smart-core/smart-server/trunk/resources/02_robot/10_resourceRF.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/resources/02_robot/10_resourceRF.py 2009-09-10 10:52:06 UTC (rev 5351)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/02_robot/10_resourceRF.py 2009-09-10 14:10:04 UTC (rev 5352)
@@ -147,6 +147,7 @@
self.__setChannelInUse(userChannel)
self.__setConnectionDetected(True)
else:
+ """
if URLTools.URLCheck("http://ftp.kysoh.com", 5.0):
detectedChannel = self.detectChannel()
if detectedChannel != None:
@@ -159,6 +160,14 @@
self.avoidChannel(1, WIFI_DEFAULT_AVOIDED_BANDWIDTH)
self.__setChannelInUse(1)
self.__setConnectionDetected(True)
+ """
+ # Don't detect internet connection seems to have better results
+ detectedChannel = self.detectChannel()
+ if detectedChannel != None:
+ print "Avoid auto detected channel :", detectedChannel
+ self.avoidChannel(detectedChannel, WIFI_DEFAULT_AVOIDED_BANDWIDTH)
+ self.__setChannelInUse(detectedChannel)
+ self.__setConnectionDetected(True)
def resetStates(self):
print "Reset wifi channel states"
|