1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| class nmeaManager(object) :
def __init__(self,source_file,gps_solution,log_file,update_rate):
### Get the Source File
##############################################
self.source = source_file
### Get the Gps solution depending on the name of the file
##############################################
self.gps_solution = gps_solution
### Get the Destination File
##############################################
self.destination = log_file
###Set the Destination file
##############################################
logging.basicConfig(filename=self.destination,filemode='w',format= "[%(asctime)s]%(message)s",level=logging.DEBUG)
#Get update_rate
self.update_rate = update_rate
###Start the ckecking cycle
##############################################
self.start(self.gps_solution,self.update_rate,self.source)
self.stop(self.destination) |
Partager