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
6b643141
Commit
6b643141
authored
Jan 27, 2021
by
Derick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use spare pin 2 to indicate to NI DAQ that the embedded system detected a spontaneous breath
parent
9cdd43f8
Pipeline
#850
failed with stages
in 0 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
4 deletions
+85
-4
install_software_last.yml
ansible/playbooks/install_software_last.yml
+76
-0
BreathingLoop.cpp
arduino/hev_prototype_v1/src/BreathingLoop.cpp
+6
-4
main.cpp
arduino/hev_prototype_v1/src/main.cpp
+3
-0
No files found.
ansible/playbooks/install_software_last.yml
0 → 100644
View file @
6b643141
---
# © Copyright CERN, Riga Technical University and University of Liverpool 2020.
# All rights not expressly granted are reserved.
#
# This file is part of hev-sw.
#
# hev-sw is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public Licence as published by the Free
# Software Foundation, either version 3 of the Licence, or (at your option)
# any later version.
#
# hev-sw is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Licence
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with hev-sw. If not, see <http://www.gnu.org/licenses/>.
#
# The authors would like to acknowledge the much appreciated support
# of all those involved with the High Energy Ventilator project
# (https://hev.web.cern.ch/).
-
hosts
:
hevpi
remote_user
:
pi
vars
:
download_dir
:
/home/pi/Downloads
repos
:
-
hev
tasks
:
-
name
:
include vars
include_vars
:
lists.yml
-
name
:
apt update, apt upgrade
apt
:
upgrade
:
yes
update_cache
:
yes
become
:
yes
-
name
:
install software via apt
apt
:
name
:
"
{{
rpi_swlist
}}"
state
:
latest
become
:
yes
-
name
:
mk sw dir
file
:
path
:
/home/pi/sw/bin
state
:
directory
-
name
:
link libts
file
:
src
:
"
/usr/lib/arm-linux-gnueabihf/libts.so.0"
dest
:
"
/usr/lib/arm-linux-gnueabihf/libts-0.0.so.0"
state
:
link
become
:
yes
-
name
:
Adding user pi to www-data
user
:
name
:
pi
groups
:
www-data
append
:
yes
become
:
yes
-
name
:
install hevconf into apache
copy
:
src
:
"
{{
ansible_env.HOME
}}/hev/raspberry-backend/share/hev.conf"
dest
:
"
/etc/apache2/sites-available/hev.conf"
remote_src
:
yes
become
:
yes
-
name
:
setup apache
command
:
"
{{
download_dir
}}/setup_apache.sh"
become
:
yes
arduino/hev_prototype_v1/src/BreathingLoop.cpp
View file @
6b643141
...
...
@@ -613,7 +613,7 @@ void BreathingLoop::FSM_breathCycle()
_pid
.
istep
=
0
;
_peep
=
_running_avg_peep
;
digitalWrite
(
pin_spare_2
,
LOW
);
break
;
case
BL_STATES
:
:
INHALE
:
//_valves_controller.setValves(VALVE_STATE::CLOSED, VALVE_STATE::CLOSED, VALVE_STATE::OPEN, VALVE_STATE::CLOSED, VALVE_STATE::CLOSED);//Comment this line for the PID control during inhale
...
...
@@ -662,7 +662,8 @@ void BreathingLoop::FSM_breathCycle()
}
//logMsg("exhale "+String(_peak_flow_time)+" "+_measured_durations.inhale+ " "+_measured_durations.exhale+" " +_fsm_timeout);
measurePEEP
();
digitalWrite
(
pin_led_red
,
LOW
);
digitalWrite
(
pin_led_red
,
LOW
);
digitalWrite
(
pin_spare_2
,
LOW
);
_mandatory_inhale
=
inhaleTrigger
();
_pressure_buffer_fitter
.
resetCalculation
(
_peak_flow_time
);
_pressure_patient_fitter
.
resetCalculation
(
_peak_flow_time
);
...
...
@@ -1146,10 +1147,11 @@ bool BreathingLoop::inhaleTrigger()
//logMsg(" -- INHALE TRIGGER " +String(millis()) + String("Exp. Flow: ") + String(expected_flow) + String(" Difference: ") + String(_flow - expected_flow));
//logMsg(" -- INHALE TRIGGER " +String(millis()) );//+ String("Exp. Flow: ") + String(expected_flow) + String(" Difference: ") + String(_flow - expected_flow));
result
=
" -- INHALE TRIGGER"
;
_fsm_timeout
=
0
;
// go to next state immediately
// _fsm_timeout = 0; // go to next state immediately
_apnea_event
=
false
;
_inhale_triggered
=
true
;
digitalWrite
(
pin_led_red
,
HIGH
);
digitalWrite
(
pin_led_red
,
HIGH
);
digitalWrite
(
pin_spare_2
,
HIGH
);
return
false
;
}
// logMsg("D " + String(expected_flow) +" "+String(_flow));
...
...
arduino/hev_prototype_v1/src/main.cpp
View file @
6b643141
...
...
@@ -103,6 +103,9 @@ void setup()
pinMode
(
pin_led_yellow
,
OUTPUT
);
pinMode
(
pin_led_red
,
OUTPUT
);
pinMode
(
pin_spare_2
,
OUTPUT
);
digitalWrite
(
pin_spare_2
,
LOW
);
//pinMode(pin_buzzer, OUTPUT);
comms
.
beginSerial
();
...
...
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