fossasia / pslab-android Goto Github PK
View Code? Open in Web Editor NEWPSLab Android App https://play.google.com/store/apps/details?id=io.pslab
Home Page: https://pslab.io
License: Apache License 2.0
PSLab Android App https://play.google.com/store/apps/details?id=io.pslab
Home Page: https://pslab.io
License: Apache License 2.0
port RadioLink class from peripherals.py ( https://github.com/fossasia/pslab/blob/development/PSL/Peripherals.py )
port NRF24L01 class from peripherals.py ( https://github.com/fossasia/pslab/blob/development/PSL/Peripherals.py )
As @viveksb007 pointed out in #92, the application lags a little bit when we're opening the Applications tab for the first time.
As observed from the logs,
05-06 22:53:11.275 8299-8299/org.fossasia.pslab D/dalvikvm: GC_FOR_ALLOC freed 2460K, 14% free 22474K/25992K, paused 35ms, total 39ms
05-06 22:53:11.275 8299-8299/org.fossasia.pslab I/dalvikvm-heap: Grow heap (frag case) to 24.156MB for 1440016-byte allocation
05-06 22:53:11.305 8299-8308/org.fossasia.pslab D/dalvikvm: GC_FOR_ALLOC freed 6690K, 38% free 17190K/27400K, paused 22ms, total 22ms
05-06 22:53:11.325 8299-8299/org.fossasia.pslab D/dalvikvm: GC_FOR_ALLOC freed 62K, 38% free 17127K/27400K, paused 16ms, total 16ms
05-06 22:53:11.325 8299-8299/org.fossasia.pslab I/dalvikvm-heap: Grow heap (frag case) to 20.651MB for 3240016-byte allocation
05-06 22:53:11.356 8299-8308/org.fossasia.pslab E/dalvikvm: adjustAdaptiveCoef max=4194304, min=1048576, ut=568
05-06 22:53:11.356 8299-8308/org.fossasia.pslab D/dalvikvm: GC_FOR_ALLOC freed 0K, 26% free 20291K/27400K, paused 25ms, total 25ms
05-06 22:53:11.386 8299-8303/org.fossasia.pslab E/dalvikvm: adjustAdaptiveCoef max=6291456, min=1572864, ut=368
05-06 22:53:11.386 8299-8303/org.fossasia.pslab D/dalvikvm: GC_CONCURRENT freed 1K, 14% free 23625K/27400K, paused 6ms+4ms, total 28ms
there is a possible memory intensive task is happening. Currently I am investigating on this issue!
The current Applications view consists of a list view with basic list items. It doesn't have much of a description on what each item would do.
Current View |
---|
![]() |
This view can be enhanced with the help of a list view with card items or a grid view as follows!
Card Views | Grid Views |
---|---|
![]() |
![]() |
If this feature is okay to implement, I can get to work on it! :)
Have to implement AD7718 in the Android version!
In settings fragment add Auto-Start settings which allows app to start automatically when PSLab device is connected.
A discussion about the Android app has been taking place in the pslab issue here: fossasia/pslab-python#35
First python code has been ported to Android. Please outline the direction and goals of the development that has been started here.
There are directories like pp/src/main/java/com/viveksb007/pslab/
which have a personalised name. Please check which of these directories are required to be kept in the repository and rename personal files to general project names.
Add capture routines in sciencelab.java for oscilloscope functionality.
modify polynomial processing functions in AnalogInputSource to handle arguments as single value and array both.
Source File link
New Polynomial Implementation should be taken into consideration i.e Polynomial object provided by apache common math library and necessary changes should be made.
About Apache Common Math Polynomial #71
The following are the screenshots of proposed design of Control Activity.
The following has been implemented using 2 ListViews.
Please give suggestions and also review Oscilloscope's UI #33 so that I can make amendments while the python code is been ported.
This is the first step towards the development Oscilloscope's UI.
The above image showcase the landscape mode of the Oscilloscope Activity.
Gestures will also be integrated, like
-pinch zoom for changing the timebase.
-double tap on the graph to freeze.
-swipe down to save.
Please give suggestions on:
-layout and what needs to be improved.
-real-time graph api to be used ( I have used GraphView http://www.android-graphview.org). We can also use MPAndroidChart https://github.com/PhilJay/MPAndroidChart).
-I have researched on 3D graphs libraries but they are paid.
-any other thing I missed.
Port SPI() class from peripherals.py
I am currently port this class.
add capture method in I2C.java to capture values from different channels.
To avoid any confusion like I and @viveksb007 ended up working on the same code SensorList.py, I am hence telling I am starting to port MCP4728, NRF24L01, RadioLink (Peripherals) into the Android app. If you are working on same do let me know @viveksb007
To avoid any confusion like I and @viveksb007 ended up working on the same code SensorList.py, I am hence telling I am starting to port MCP4728, NRF24L01, RadioLink into the Android app.
improve UI of home screen like device status shown and remove duplicate SensorList.java class
porting DACCHAN.py
Modify sensor files to match standard coding style.
modify fix_value function to adapt calculation of both single values and arrays.
https://github.com/fossasia/pslab-python/blob/development/PSL/achan.py#L164
Addition of a manual Retry/Reconnect button in the Home UI if connection fails even when the device is connected.
While in operation, if the device gets abruptly disconnected, two solutions can be done-
Although its a minor issue, I would like to do it to get started and also get a hang of this project.
Porting the files from Sensor which are not dependent on sciencelab.py
Implement readLine function in CommunicationHandler.java, so that we can read a line i.e String terminated by '\n' and we don't know length of string beforehand.
Possible approach- read single byte in a loop and check for '\n', when found return the byte array formed before encountering '\n'. Tried but error in reading single byte from bulkTransfer. May be due to high BaudRate of 1Mbps.
For now it would only be used to read version String of device.
Please create an apk branch and autogenerate the app here on each build. Please ensure the previous apks are not saved in the history to ensure the repository is not getting super big.
Follow the way it is done for open event android and ask in the open event android channel for help, if needed.
Override fixValue method so that it can take integer array as a parameter and return a double array with the calculate return an array of newly calculated points.
Please integrate TravisCI and Codacy, which would automate code review and easy to see build status before merging the PR.
Apache Math Common provides a range Polynomial functions that can be used to implement polynomials efficiently. A discussion can take place whether we can use this approach or stick to previous one.
The source has been tested with Android Studio 2.3.1 with Gradle 3.2, and builds without errors once a few dependencies have been synced. However, automatic Download & execution failed.
Device: Xiaomi Redmi 3S + , Android Version 6.0.1 MMB29M, MIUI : Global 8.2 |Stable
Console Output
04/14 15:38:33: Launching app
$ adb install-multiple -r /home/jithin/ACTIVE_PROJECTS/PSLab/pslab-android/app/build/outputs/apk/app-debug.apk /home/jithin/ACTIVE_PROJECTS/PSLab/pslab-android/app/build/intermediates/split-apk/debug/slices/slice_4.apk ... [Truncated] ... slice_3.apk
$ adb shell pm uninstall org.fossasia.pslab
DELETE_FAILED_INTERNAL_ERROR
Error while Installing APKs
The uninstall process causes it to fail , but the Apk can be installed via adb separately. Using the 'build apk' command creates app-debug.apk , so please add instructions on building a standalone Apk
$ adb install -r app-debug.apk
This App will wait for the debugger to attach ( Can be launched separately via Android Studio), and then displays the Home page.
I will try to test on a few other Android devices to check if the uninstallation failure is not an MIUI specific issue.
To be tested with hardware
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.fossasia.pslab/org.fossasia.pslab.activity.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.hardware.usb.UsbDeviceConnection.claimInterface(android.hardware.usb.UsbInterface, boolean)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2423)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2483)
at android.app.ActivityThread.access$900(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5441)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.hardware.usb.UsbDeviceConnection.claimInterface(android.hardware.usb.UsbInterface, boolean)' on a null object reference
at org.fossasia.pslab.communication.CommunicationHandler.open(CommunicationHandler.java:80)
at org.fossasia.pslab.communication.ScienceLab.<init>(ScienceLab.java:34)
at org.fossasia.pslab.activity.MainActivity.onCreate(MainActivity.java:74)
at android.app.Activity.performCreate(Activity.java:6303)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2376)
... 9 more
add instructions about building and running app for new contributors to set up environment on their own PC and test app.
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.