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
daf6c35f
Commit
daf6c35f
authored
Feb 11, 2021
by
Emigdio Jimenez Dominguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_compliace
parent
fe80f510
Pipeline
#910
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
BreathingLoop.cpp
arduino/hev_prototype_v1/src/BreathingLoop.cpp
+16
-2
No files found.
arduino/hev_prototype_v1/src/BreathingLoop.cpp
View file @
daf6c35f
...
...
@@ -283,10 +283,10 @@ void BreathingLoop::updateCycleReadings()
_cycle_index
=
(
_cycle_index
==
CYCLE_AVG_READINGS
-
1
)
?
0
:
_cycle_index
+
1
;
_cycle_readings
.
timestamp
=
tnow
;
_cycle_readings
.
fiO2_percent
=
_cycle_readings
.
lung
_compliance
//_readings_avgs.o2_percent;// FIXME
_cycle_readings
.
fiO2_percent
=
_cycle_readings
.
dynamic
_compliance
//_readings_avgs.o2_percent;// FIXME
_running_inhale_minute_volume
[
_cycle_index
]
=
_volume_inhale
;
_running_exhale_minute_volume
[
_cycle_index
]
=
_volume_exhale
;
//
logMsg(" I, E "+String(_volume_inhale)+ " "+String(_volume_exhale));
logMsg
(
" I, E "
+
String
(
_volume_inhale
)
+
" "
+
String
(
_volume_exhale
));
_total_cycle_duration
[
_cycle_index
]
=
(
_measured_durations
.
buff_pre_inhale
+
_measured_durations
.
inhale
...
...
@@ -304,6 +304,13 @@ void BreathingLoop::updateCycleReadings()
// inh_sum += _inhale_cycle_duration[i];
// exh_sum += _exhale_cycle_duration[i];
}
logMsg
(
"mv_sum: "
+
String
(
mv_sum
));
logMsg
(
"mvi_sum: "
+
String
(
mvi_sum
));
logMsg
(
"mve_sum: "
+
String
(
mve_sum
));
logMsg
(
"tot_sum: "
+
String
(
tot_sum
));
logMsg
(
"CYCLE_AVG_READINGS: "
+
String
(
CYCLE_AVG_READINGS
));
_airway_pressure
=
_ap_readings_N
==
0
?
0
:
_sum_airway_pressure
/
_ap_readings_N
;
_cycle_readings
.
respiratory_rate
=
60000.0
/
(
tot_sum
/
CYCLE_AVG_READINGS
);
...
...
@@ -315,6 +322,7 @@ void BreathingLoop::updateCycleReadings()
_cycle_readings
.
exhaled_tidal_volume
=
mve_sum
/
CYCLE_AVG_READINGS
;
_cycle_readings
.
lung_compliance
=
_cycle_readings
.
tidal_volume
/
(
_cycle_readings
.
peak_inspiratory_pressure
-
_peep
);
_cycle_readings
.
static_compliance
=
_cycle_readings
.
tidal_volume
/
(
_cycle_readings
.
plateau_pressure
-
_peep
);
_cycle_readings
.
dynamic_compliance
=
_cycle_readings
.
inhaled_tidal_volume
/
(
_cycle_readings
.
peak_inspiratory_pressure
-
_peep
);
_cycle_readings
.
mean_airway_pressure
=
_airway_pressure
;
_cycle_readings
.
inhalation_pressure
=
_airway_pressure
;
_cycle_readings
.
apnea_index
+=
(
_apnea_event
==
true
)
?
1
:
0
;
...
...
@@ -325,6 +333,12 @@ void BreathingLoop::updateCycleReadings()
+
_max_exhale_time
;
// apnea time = time from breath start to maximum time allow for breath
_cycle_readings
.
mandatory_breath
=
_mandatory_inhale
&
_mandatory_exhale
;
logMsg
(
"_cycle_readings.tidal_volume: "
+
String
(
_cycle_readings
.
tidal_volume
));
logMsg
(
"_cycle_readings.inhaled_tidal_volume: "
+
String
(
_cycle_readings
.
inhaled_tidal_volume
));
logMsg
(
"_cycle_readings.exhaled_tidal_volume: "
+
String
(
_cycle_readings
.
exhaled_tidal_volume
));
logMsg
(
"_cycle_readings.peak_inspiratory_pressure: "
+
String
(
_cycle_readings
.
peak_inspiratory_pressure
));
logMsg
(
"_peep: "
+
String
(
_peep
));
_sum_airway_pressure
=
0
;
_ap_readings_N
=
0
;
_volume_inhale
=
0
;
...
...
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