Skip to content
Snippets Groups Projects
Commit 5ae24173 authored by Lan Dam's avatar Lan Dam
Browse files

Checking endtime, starttime

parent 01409b5c
No related branches found
No related tags found
1 merge request!75Checking endtime, starttime
......@@ -368,6 +368,16 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow):
Read data from selected files/directories, process and plot channels
read from those according to current options set on the GUI
"""
start_tm_str = self.time_from_date_edit.date().toString(
QtCore.Qt.ISODate)
end_tm_str = self.time_to_date_edit.date().toString(QtCore.Qt.ISODate)
self.start_tm = datetime.strptime(start_tm_str, TM_FORMAT).timestamp()
self.end_tm = datetime.strptime(end_tm_str, TM_FORMAT).timestamp()
if self.end_tm <= self.start_tm:
msg = "To Date must be greater than From Date."
QtWidgets.QMessageBox.warning(self, "Wrong Date Given", msg)
return
self.info_list_widget.clear()
is_working = (self.is_loading_data or self.is_plotting_soh or
self.is_plotting_waveform or self.is_plotting_tps)
......@@ -424,12 +434,6 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow):
self.req_soh_chans = self.get_requested_soh_chan()
self.req_wf_chans = self.get_requested_wf_chans()
start_tm_str = self.time_from_date_edit.date().toString(
QtCore.Qt.ISODate)
end_tm_str = self.time_to_date_edit.date().toString(QtCore.Qt.ISODate)
self.start_tm = datetime.strptime(start_tm_str, TM_FORMAT).timestamp()
self.end_tm = datetime.strptime(end_tm_str, TM_FORMAT).timestamp()
self.data_loader.init_loader(
self.data_type,
self.tracking_info_text_browser,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment