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
102f4907
Commit
102f4907
authored
Aug 12, 2020
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated readings
parent
64250314
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
BreathingLoop.cpp
arduino/hev_prototype_v1/src/BreathingLoop.cpp
+2
-1
UILoop.cpp
arduino/hev_prototype_v1/src/UILoop.cpp
+3
-2
No files found.
arduino/hev_prototype_v1/src/BreathingLoop.cpp
View file @
102f4907
...
...
@@ -187,7 +187,8 @@ void BreathingLoop::updateReadings()
_readings_avgs
.
pressure_o2_supply
=
adcToMillibarFloat
((
_readings_sums
.
pressure_o2_supply
/
_readings_N
));
_readings_avgs
.
pressure_o2_regulated
=
adcToMillibarFloat
((
_readings_sums
.
pressure_o2_regulated
/
_readings_N
));
_readings_avgs
.
pressure_diff_patient
=
adcToMillibarDPFloat
((
_readings_sums
.
pressure_diff_patient
/
_readings_N
),
_calib_avgs
.
pressure_diff_patient
)
;
_readings_avgs
.
o2_percent
=
adcToO2PercentFloat
((
_readings_sums
.
o2_percent
/
_readings_N
));
//_readings_avgs.o2_percent = adcToO2PercentFloat((_readings_sums.o2_percent / _readings_N));
_readings_avgs
.
o2_percent
=
adcToO2PercentFloat
(
static_cast
<
float
>
(
analogRead
(
pin_o2_sensor
)));
#endif
_pid
.
process_pressure
=
_readings_avgs
.
pressure_inhale
;
// Update the process pressure independent of the system state
...
...
arduino/hev_prototype_v1/src/UILoop.cpp
View file @
102f4907
...
...
@@ -81,7 +81,7 @@ void UILoop::reportFastReadings()
// TO SWITCH BETWEEN RAW AND MILLIBAR DATA UNCOMMENT BELOW
readings
<
float
>
readings
=
_breathing_loop
->
getReadingAverages
();
//readings<
int16_
t> readings = _breathing_loop->getRawReadings();
//readings<
floa
t> readings = _breathing_loop->getRawReadings();
_fast_data
.
timestamp
=
static_cast
<
uint32_t
>
(
readings
.
timestamp
);
_fast_data
.
fsm_state
=
_breathing_loop
->
getFsmState
();
...
...
@@ -93,7 +93,8 @@ void UILoop::reportFastReadings()
_fast_data
.
pressure_patient
=
readings
.
pressure_patient
;
_fast_data
.
temperature_buffer
=
readings
.
temperature_buffer
;
_fast_data
.
pressure_o2_supply
=
readings
.
pressure_o2_supply
;
_fast_data
.
pressure_o2_regulated
=
readings
.
pressure_o2_regulated
;
//_fast_data.pressure_o2_regulated = readings.pressure_o2_regulated;
_fast_data
.
pressure_o2_regulated
=
readings
.
o2_percent
;
_fast_data
.
pressure_diff_patient
=
readings
.
pressure_diff_patient
;
pid_variables
&
pid
=
_breathing_loop
->
getPIDVariables
();
...
...
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