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
6e5f9ee8
Commit
6e5f9ee8
authored
Jun 18, 2021
by
Benjamin Mummery
💻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated startup_config_default to include message field
parent
148c7054
Pipeline
#1817
failed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
startup_config_default.json
NativeUI/configs/startup_config_default.json
+6
-3
startup_handler.py
NativeUI/widget_library/startup_handler.py
+5
-3
No files found.
NativeUI/configs/startup_config_default.json
View file @
6e5f9ee8
...
...
@@ -2,16 +2,19 @@
"calibration"
:
{
"label"
:
"calibration"
,
"last_performed"
:
0
,
"cmd_code"
:
"calib_rate"
"cmd_code"
:
"calib_rate"
,
"message"
:
"Ensure patient is disconnected from ventilator"
},
"leak_test"
:
{
"label"
:
"Leak Test"
,
"last_performed"
:
0
,
"cmd_code"
:
"leak_test"
"cmd_code"
:
"leak_test"
,
"message"
:
"Ensure patient is disconnected from ventilator"
},
"maintenance"
:
{
"label"
:
"maintenance"
,
"last_performed"
:
0
,
"cmd_code"
:
"main_tenance"
"cmd_code"
:
"main_tenance"
,
"message"
:
"Was maintenance carried out successfully?"
}
}
NativeUI/widget_library/startup_handler.py
View file @
6e5f9ee8
...
...
@@ -30,6 +30,7 @@ class StartupHandler(
self
.
modeRadioDict
=
{}
self
.
settingsRadioDict
=
{}
self
.
calibs_done_dict
=
{}
self
.
activeWidget
=
None
def
add_widget
(
self
,
widget
,
key
:
str
):
if
isinstance
(
widget
,
labelledSpin
):
...
...
@@ -70,13 +71,14 @@ class StartupHandler(
Currently doesn't actually do any calibrations, just a placeholder for now.
"""
self
.
NativeUI
.
messagePopup
.
setLabelText
(
calibrationWidget
.
infoDict
[
"message"
])
self
.
activeWidget
=
calibrationWidget
#self.NativeUI.messagePopup.okButton.pressed.connec
self
.
NativeUI
.
messagePopup
.
setLabelText
(
calibrationWidget
.
infoDict
[
"message"
])
def
carryout_calibration
(
self
)
->
int
:
assert
self
.
activeWidget
is
not
None
calibrationWidget
=
self
.
activeWidget
#self.NativeUI.display_stack.setCurrentWidget(self.NativeUI.startupWidget)
# self.NativeUI.display_stack.setCurrentWidget(self.NativeUI.startupWidget)
calibrationWidget
.
progBar
.
setValue
(
100
)
calibrationWidget
.
lineEdit
.
setText
(
"completed"
)
...
...
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