latlon = None
if self.gps_state == "FIX" :
latlon = ( self.device.fix[4] , self.device.fix[5] , self.device.fix[7] )
- out_str = self.store_scan( scan_out , tstamp , scan_out , latlon )
+ self.store_scan( scan_out , tstamp , scan_out , latlon )
self.refresh_infowin( tstamp )
if self._debug :
osso.SystemNote(self.osso_context).system_note_infoprint("Found %d APs" % len(scan_out) )
else :
- self.write_logs( out_str )
+ self.write_logs( scan_out )
return True
def store_scan ( self , timestamp , scan_out , gps_info ) :
- out_str = ""
for net in scan_out.split() :
self.nfp += 1
items = net.rsplit(":", 1)
- out_str += " %s %s" % ( items[0] , items[1] )
if self.scanlist :
self.scanlist.insert_at_cursor( "%s %5d\n" % ( items[0] , int(items[1]) ) )
stored = self.db.get( items[0] )
else :
self.newap += 1
self.db.add( items[0] , int(items[1]) , timestamp , gps_info )
- return out_str
- def store_logscan ( self , timestamp , scan_out , gps_info ) :
+ def store_legacy ( self , timestamp , scan_out , gps_info ) :
nets = scan_out.split()
while nets :
self.nfp += 1
def write_logs ( self , timestamp , out_str ) :
fd = open( os.path.join( conf.homedir , "wiscan_gui.info" ) , 'a' )
- fd.write( "%s %s%s\n" % ( timestamp , self.gps_info , out_str ) )
+ fd.write( "%s %s %s\n" % ( timestamp , self.gps_info , out_str ) )
fd.close()
if self.satellites :
loclist = open( os.path.join( conf.homedir , "location.info" ) , 'a' )