Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
HEV - High Energy Ventilator
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
HEV - High Energy Ventilator
Commits
1d425fd2
Commit
1d425fd2
authored
Apr 12, 2021
by
Benjamin Mummery
💻
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Battery display is now handed data rather than calling NativeUI.get_db
parent
40758453
Pipeline
#1221
failed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
NativeUI.py
NativeUI/NativeUI.py
+2
-2
battery_display_widget.py
NativeUI/widget_library/battery_display_widget.py
+2
-2
No files found.
NativeUI/NativeUI.py
View file @
1d425fd2
...
...
@@ -47,7 +47,7 @@ logging.basicConfig(
class
NativeUI
(
HEVClient
,
QMainWindow
):
"""Main application with client logic"""
battery_signal
=
Signal
()
battery_signal
=
Signal
(
dict
)
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
NativeUI
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
...
...
@@ -371,7 +371,7 @@ class NativeUI(HEVClient, QMainWindow):
self
.
ongoingAlarms
=
payload
[
"alarms"
]
if
payload
[
"type"
]
==
"BATTERY"
:
self
.
set_battery_db
(
payload
[
"BATTERY"
])
self
.
battery_signal
.
emit
()
self
.
battery_signal
.
emit
(
self
.
get_db
(
"battery"
)
)
if
payload
[
"type"
]
==
"ALARM"
:
self
.
set_alarms_db
(
payload
[
"ALARM"
])
if
payload
[
"type"
]
==
"TARGET"
:
...
...
NativeUI/widget_library/battery_display_widget.py
View file @
1d425fd2
...
...
@@ -48,7 +48,7 @@ class BatteryDisplayWidget(QtWidgets.QWidget):
self
.
status
=
{}
self
.
set_default_status
()
self
.
update_value
()
self
.
update_value
(
self
.
status
)
def
set_default_status
(
self
)
->
dict
:
"""
...
...
@@ -66,7 +66,7 @@ class BatteryDisplayWidget(QtWidgets.QWidget):
return
self
.
status
@
QtCore
.
Slot
(
dict
)
def
update_value
(
self
):
def
update_value
(
self
,
dict
):
battery_data
=
self
.
NativeUI
.
get_db
(
"battery"
)
# Update status
...
...
Benjamin Mummery
💻
@BenjaminMummery
mentioned in commit
c6c04f95
·
Apr 13, 2021
mentioned in commit
c6c04f95
mentioned in commit c6c04f95f775b56522e2151a208985e4153fbe09
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment