Handle geocoordinates in logscanner
[wifihood] / wifiscanner / wifimap / wifiscan.py
index b35d7f0..6dcd3f5 100644 (file)
@@ -81,7 +81,7 @@ class Scanner ( gps.GPSObject ) :
                 self.db.add( items[0] , int(items[1]) , timestamp )
         return out_str
 
-    def store_logscan ( self , timestamp , scan_out ) :
+    def store_logscan ( self , timestamp , scan_out , gps_info=None ) :
         nets = scan_out.split()
         while nets :
             self.nfp += 1
@@ -93,10 +93,10 @@ class Scanner ( gps.GPSObject ) :
                 max_rss = int(items[1])
                 if stored[0] > max_rss :
                     max_rss = stored[0]
-                self.db.update( items[0] , max_rss , timestamp )
+                self.db.update( items[0] , max_rss , timestamp , gps_info )
             else :
                 self.newap += 1
-                self.db.add( items[0] , int(items[1]) , timestamp )
+                self.db.add( items[0] , int(items[1]) , timestamp , gps_info )
 
     def write_logs ( self , timestamp , out_str ) :
             fd = open( os.path.join( conf.homedir , "wiscan_gui.info" ) , 'a' )