makman2 / mp Goto Github PK
View Code? Open in Web Editor NEWMeasurePulse, the Android app for the blood pressure measuring hardware.
MeasurePulse, the Android app for the blood pressure measuring hardware.
To reduce the x-differences between two points (that can get quite huge with nanosecond precision) allow to multiply with BigDecimal
.
For that purpose write a BigDecimalConverter
.
The current class allows not related values, but the remote module gives us data frames with equal time differences. Subclass from DataFrame
and implement constructor with these parameters. Then also a file writer is possible with more efficient storage handling.
Add these files to .gitignore.
Since the text based settings store actual strings, we need to validate the information.
AsyncTask
is the special designed class for this purpose. Especially the asynchrone WifiConnector
functions can be replaced with it.
Big advance: AsyncTask
s are cancellable! This is needed from the UI.
BigInteger brings the four overloads inside one function:
BigInteger.valueOf(long)
No need to use 4 overloads.
If BigInteger.valueOf()
is considered better, remove the BigIntegerConverter
module and the associated test.
The order of iteration is not the same as the elements get added. The internal hash sorting seems to be platform dependent (memory stuff etc). Need to extend the test to check just for existence of the added items^^
Create an abstraction layer class that handles complete MPDF management. The user can only create and open files via this interface.
The ChartData.setDrawValues()
/DataSet.setDrawValues()
function solves the problem.
All resource ID's and layouts lay directly at R.id
/ R.layout
. They should be organized under namespaces too.
Checksums add a layer of security, but to handle them correctly is quite complicated. The data format is quite simple so it is maybe not really worth it.
So in short:
Pro:
Contra:
Nearly all classes lack the capability of copying. There are two options:
clone()
:
Object
has a clone
-function.Android Studion natively supports resource string translation.
The code file Settings.java
contains the key names of the settings used in the PreferenceFragment
.
The keys should be defined in a new strings XML file and also their defaults. Settings.java
loads the resources at static constructor (or if possible in the same line as the constants get defined) and the PreferenceFragment
just addresses the resources.
Implement the GUI.
Some things that are needed:
Adjust the filter to retrieve only valid remote modules (in class tuhh.nme.mp.remote.WifiConnector
)
The current format allows to place entries with a length of 4GB!!! That is definetly too much and needs to be reduced. Otherwise this would be a possible exploit.
Limitting to a short (64KB) is enough.
Needs a new activity that displays these data.
Need a class that creates the x-axis strings for MPAndroidChart.
Allows to browse saved data.
Implement DataFrame
organizing classes and classes that handle data output suited for MPAndroidChart.
Implement classes to receive remote module data.
Which protocol is used and how exactly needs to be determined.
This is faster and has a bigger range.
The big plus: The user doesn't need to disconnect from his current WLAN and can continue browsing without reconnection delay.
We need a thread that handles all data request to the module, my plan:
The good aspect behind this system is that one thread hosts the connection to the remote module. Multiple threads are difficult to realize (but would simplify the callback process).
Many routers send more than one possible WiFi connection (i.e. different frequencies because of different WLAN standards, WLAN repeaters).
Need to catch the broadcast and select the connection with the best signal strength.
If connection is not possible fall back to the least good signal.
The basic idea behind this is to allow automatically generate data from parameters.
For our specific blood pressure example:
Because we receive data-bunches where each data-piece has equal time difference, we don't need to manually save x-data. That would allow also to write a custom file writer that takes advantage of this fact.
In my opinion PressureDataFrame
is a way too generic name. Since our application measures explicitly blood pressure we should call the object more appropriate (BloodPressureDataFrame
).
If the device malfunctions the fragment could hang up.
So:
close()
does not finish in a specific amount of time (about 30sec), terminate()
it.This would affect the LiveDataFragment
.
Automatically detect and adjust units and x-values on the axis.
The WiFi refresh menu action button shall spin until the refreshed view is shown.
This is a bit complicated since the SDK has problems with AppCompat and uses a dumb system regarding drawable rotations. Just complicated and not helpful at all.
So best way:
Place a start and stop button into the action menu so the user can manually stop and start again the data fetch.
If we render for example 1000 data points (starting from zero), we get something like:
It would be better to display the x-label "1000" itself at the right edge, but if we adjust code to get 1001 labels (so from 0 until 1000), the plot calculates even more ugly values (and there's still no 1000 at the right edge):
We should try to display the range 0 until 1000 (or any other range, but it shouldn't be cut off like this).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.