| time_epoch = subprocess.check_output(CMD_TIME_EPOCH, shell=True).decode( | time_epoch = subprocess.check_output(CMD_TIME_EPOCH, shell=True).decode( | ||||
| "utf-8" | "utf-8" | ||||
| ) | ) | ||||
| write_to_file(output_file, "{},{}".format(nmea_str, time_epoch)) | |||||
| write_to_file(output_file, "{},{}".format(nmea_str.replace("\n", ""), time_epoch)) | |||||
| except: | except: | ||||
| if not ser.is_open: | if not ser.is_open: | ||||
| print_message("GPS serial port is closed. Exit monitoring thread.") | print_message("GPS serial port is closed. Exit monitoring thread.") |