Skip to content

Commit

Permalink
Merge pull request #82 from introlab/dev
Browse files Browse the repository at this point in the history
Main merge for 1.1.2 release
  • Loading branch information
SBriere authored Apr 25, 2024
2 parents 920b59d + a7b280c commit bbd2d0e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion python/env/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pypiwin32==223; sys_platform == 'win32'
PySide6==6.7.0
PySide6==6.6.3
cython==3.0.10
numpy==1.26.4
scipy==1.11.4
Expand Down
5 changes: 5 additions & 0 deletions python/libopenimu/importers/AppleWatchImporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1365,6 +1365,11 @@ def read_data_file(self, file, debug=False):
if debug:
print('setting_json : ', settings_json_str)

# Sort settings values
settings_json = json.loads(settings_json_str)
settings_json = dict(sorted(settings_json.items()))
settings_json_str = json.dumps(settings_json)

[end_header_id] = struct.unpack("<H", file.read(2))
if end_header_id != self.HEADER:
if debug:
Expand Down
2 changes: 1 addition & 1 deletion python/libopenimu/qt/BackgroundProcess.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def timerEvent(self, a0: 'QTimerEvent'):
self.work_speed_estimates.append(instant_speed)
if len(self.work_speed_estimates) > min(10, int(self.total_work_load / 25)):
mean_speed = sum(self.work_speed_estimates) / len(self.work_speed_estimates)
remaining_time = int(mean_speed) * (self.total_work_load - self.total_work_done)
remaining_time = int(mean_speed) * (self.total_work_load - self.total_work_done) - elapsed_time
self.work_speed_estimates.pop(0)
self.UI.lblRemainingValue.setText(self.format_time_display(remaining_time))

Expand Down
3 changes: 0 additions & 3 deletions python/libopenimu/qt/GPSView.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ def __init__(self, parent):
# Load file from qrc
self.setUrl(QUrl('qrc:/OpenIMU/html/map.html'))

# 3IT = 45.3790193,-71.9430778
# self.setCurrentPosition(45.3790193, -71.9430778)

# def closeEvent(self, QCloseEvent):
# self.aboutToClose.emit(self)

Expand Down
10 changes: 6 additions & 4 deletions python/libopenimu/qt/RecordsetWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def load_sensors(self):
self.sensors_menu.addSection(sensor.location)
if sensor.id_sensor not in self.sensors:
self.sensors[sensor.id_sensor] = sensor
sensor_item = QAction(sensor.name + ' [' + str(sensor.sampling_rate) + ' Hz]')
sensor_item = QAction(sensor.name + ' [' + "{:.1f}".format(sensor.sampling_rate) + ' Hz]')
sensor_item.setCheckable(True)
sensor_item.setProperty("sensor_id", sensor.id_sensor)
self.sensors_items[sensor.id_sensor] = sensor_item
Expand Down Expand Up @@ -449,7 +449,8 @@ def draw_sensors_names(self):
for sensor_id in sensors:
sensor = self.sensors[sensor_id]
# Sensor names
label = self.timeSensorsScene.addText(sensor.name + ' [' + str(sensor.sampling_rate) + ' Hz]')
label = self.timeSensorsScene.addText(sensor.name + ' [' + "{:.1f}".format(sensor.sampling_rate)
+ ' Hz]')
label.setPos(0, pos)
label.setDefaultTextColor(Qt.black)
# label.setFont(QFont("Times", 10, QFont.Bold))
Expand Down Expand Up @@ -622,7 +623,8 @@ def query_sensor_data(self, sensor: Sensor, start_time: datetime, end_time: date
def sensor_graph_selected(self, sensor_item):
sensor_id = sensor_item.property("sensor_id")
sensor = self.sensors[sensor_id]
sensor_label = sensor.name + " (" + sensor.location + ")" + ' [' + str(sensor.sampling_rate) + ' Hz]'
sensor_label = (sensor.name + " (" + sensor.location + ")" + ' [' + "{:.1f}".format(sensor.sampling_rate) +
' Hz]')

if sensor_item.isChecked():
# Choose the correct display for each sensor
Expand Down Expand Up @@ -707,7 +709,7 @@ def sensor_graph_selected(self, sensor_item):
# self.UI.displayContents.layout().insertWidget(0,graph)

graph_window.show()
QApplication.instance().processEvents()
# QApplication.instance().processEvents()

graph_window.aboutToClose.connect(self.graph_was_closed)
graph_window.requestData.connect(self.query_sensor_data)
Expand Down
2 changes: 1 addition & 1 deletion python/resources/ui/StartDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ in database</string>
</font>
</property>
<property name="text">
<string notr="true">1.1.1</string>
<string notr="true">1.1.2</string>
</property>
</widget>
</item>
Expand Down

0 comments on commit bbd2d0e

Please sign in to comment.