Skip to content
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

Interface refactor #16

merged 12 commits into from Aug 18, 2016

Interface refactor #16

merged 12 commits into from Aug 18, 2016


Copy link

@ReeceStevens ReeceStevens commented Aug 10, 2016

Develop a better system of managing UI and interactive elements on the screen. This became a higher priority after I realized that UI became my bottleneck in developing the NIBP system (PR #15).

Goals of this refactor:

  • Create a clearly organized and well-documented way to construct a screen layout, update it, and interact with it
  • Reduce the amount of code clogging up the main.cpp file
  • Shoot for making the NIBP UI a close-to-trivial task to develop

ReeceStevens added 12 commits Aug 9, 2016
Starting to develop a new scheme where there is a master `Screen` object
which contains a `Vector` of `ScreenElement` objects (see
docs/ for more details).
Moving signal traces to a generic SignalTrace class.
Moved the signal based interface elements into their own file.

Also, beginning work on how to manage touch events using the new screen
-> screen element system. This is a work in progress, see TODO note in
Add callback functions to Button objects that are called when the
Screen they are associated with checks for touch events. Also, perform
general code base maintenance, renaming, and organization of variables.

Also, update docs to reflect that I ditched the proposed Action system
in favor of the callback function because it was easier and clearer in
pretty much every conceivable way.
Update docs to describe the lifecycle hooks that occur during every
screen update. Changed `main.cpp` to more clearly reflect when these
lifecycle hooks are called.

In keeping with this, `listenForTouch` was renamed to `propogateTouch`
and the full touch screen cycle was moved inside this function. The
call sequence for a screen lifecycle iteration is now:


where `some_delay` is a delay period to allow the display chip to
finish rendering all updated elements.
Copy link
Owner Author

ReeceStevens commented Aug 18, 2016

Looks like all aforementioned goals have been accomplished and everything is working smoothly, so I'm going to merge this into master!

@ReeceStevens ReeceStevens merged commit c277611 into master Aug 18, 2016
@ReeceStevens ReeceStevens deleted the interface-refactor branch Aug 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant