New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIBP #15

merged 31 commits into from Oct 2, 2016


None yet
1 participant

ReeceStevens commented Aug 5, 2016

Developments for the NIBP module and data analysis. Addresses #11.

ReeceStevens added some commits Jul 9, 2016

Fix CircleBuffer init error, add pressure pin
Fix an error in CircleBuffer where an object's CircleBuffer attribute
would be initialized instead of just being declared, then
re-initialized, causing pointer chaos and very strange graphing
outputs. Resolved by adding a `resize` function that allows a
CircleBuffer to be resized rather than require it be instantiated with
the correct size.

Also, added support for two inputs on the NIBP: pressure and pulsing
amplitude. Both signals are required to make accurate BP measurements.
Beginning to add interface infrastructure for interacting with the BP
unit as well (hence the button addition).
Adjust screen resolution, add resize functions
Changed the screen grid to a 12x12 instead of a 10x10 in order to
accommodate the UX for the NIBP unit. Also, changed the rest of the
object constructors that were causing double-deletes to the `resize()`
function introduced in 736e8ba.

Beginning work on the program logic for the NIBP test.
Modify display box borders so they don't overlap
Cursors in the signal display boxes were overwriting neighboring box
borders. Adjusted sizes so that the outline of each box remains intact.

@ReeceStevens ReeceStevens referenced this pull request Aug 10, 2016


Interface refactor #16

ReeceStevens added some commits Aug 18, 2016

Add sandboxes, allow changing ScreenElement values
Added a `Sandbox` ScreenElement that mounts other ScreenElement objects
inside it. Currently being used to develop the NIBP interface.

Also, added modifier functions to let the text and color of some
ScreenElement objects to be dynamically modified and updated on the
screen. Useful in the NIBP interface building process since we won't
have to recreate screen elements every time the state changes, we can
just modify the fields.
Build initial NIBP UI and state machine
Used the `Sandbox` ScreenElement to mount the UI for the NIBP module.
Hooked the display objects into `mainScreen` and build the structure
for the state machine.

Also, miscellaneous small interface fixes. Notably, removed the
distinction between a `Button` and all other `ScreenElement`s in the
definition of `Screen`. Now, a button has both an `update` method
(which runs the onClick function if it has been tapped) and an
`isTapped` method (which returns a boolean if the button was tapped).
Implement RMS measurements, console printout
Added RMS measurements for the pulsing pressure values after every 10
mmHg decrease in the absolute pressure during the measurement state.
While this yields somewhat sensible results, they aren't too reliable
right now because there is too much signal noise in the pulsing
pressure due to deflation still occuring when the measurement is
triggered. Next commits should address this issue.

Also performed some small refactorings to the state machine, moving the
initial state setup to the top of the case block since... well, it just
makes more sense. This is also a blatant violation of "one function,
one purpose," so this will probably be refactored into separate
functions at some point later on down the line.

@ReeceStevens ReeceStevens added this to the v1 milestone Sep 7, 2016

ReeceStevens added some commits Oct 1, 2016

Develop SpO2 algorithm, fix roundoff errors
The SpO2 algorithm focuses on finding the systolic and diastolic
pressure based on the mean arterial pressure (MAP). Currently, systolic
is determined as the pressure level greater than the MAP that has an RMS
amplitude of 1/3 the MAP RMS (Rms_max). Conversely, diastolic pressure
is determined as the pressure level less than the MAP that has an RMS
amplitude of 2/3 Rms_max.

This is giving pretty good result agreement with a standard at-home
automatic blood pressure cuff, but these cutoff points are still a
little crude and probably can be refined.
Add BP measurement display
Also, increased wait time for the RMS measurements to allow the pressure
readings to stabilize after letting out some air. Raw data plots are
showing excellent consistency and repeatability! Hooray!

This comment has been minimized.

Show comment
Hide comment

ReeceStevens Oct 1, 2016


NIBP is now funcitonal! The interface requires some refinement, but I want to get all the components merged together first so that the system can be designed as a whole. Moving ahead with merging into master!


ReeceStevens commented Oct 1, 2016

NIBP is now funcitonal! The interface requires some refinement, but I want to get all the components merged together first so that the system can be designed as a whole. Moving ahead with merging into master!

@ReeceStevens ReeceStevens merged commit fbd8993 into master Oct 2, 2016

@ReeceStevens ReeceStevens deleted the nibp branch Oct 2, 2016

This was referenced Oct 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment