Skip to content

5. Installation & Start!

MiloSi edited this page May 31, 2017 · 18 revisions

Install

download from https://github.com/CatsProject/CatsLibrary/CatsLibrary2/

Setting

  1. Open or Make Project form Android Studio
  2. Input Cats Library to your project library
  3. Go build.gradle (Module: mobile and Module: wear)
    screensh 4_1. Input "compile 'com.opensource.cats.catslibrary:mobile-release:1.0@arr'" into dependencies.
    4_2. Input "compile 'com.opensource.cats.catslibrary:wear-release:1.0@arr'" into dependencies.
  4. Have a good coding!

Function

Mobile


Class CatsMobileController Controller of our library
Function void initLeftMotionCheck() Init left motion status
void initRightMotionCheck() Init right motion status
void initUpMotionCheck() Init up motion status
void initDownMotionCheck() Init right motion status
void setLeftMotion(int i, boolean check) Set i-th Left motion status
void setRightMotion(int i, boolean check) Set i-th Right motion status
void setUpMotion(int i, boolean check) Set i-th Up motion status
void setDownMotion(int i, boolean ) Set i-th Down motion status
boolean isLeftMotion(int i) get i-th left status
boolean isRightMotion(int i) get i-th right status
boolean isUpMotion(int i) get i-th up status
boolean isDownMotion(int i) get i-th down status
void setFilterCoefficient(float fc) config FILETER_COEFFICIENT value
float getFilterCoefficient() get FILETER_COEFFICIENT value
void setLeftThresholds(double spread , double bend) set threshold of left spread and bend angle
void setRightThresholds(double spread , double bend) set threshold of right spread and bend angle
void setUpThresholds(double spread , double bend) set threshold of up spread and bend angle
void setDownThresholds(double spread , double bend) set threshold of down spread and bend angle
double getLeftMotionSpread() get threshold of left spread
double getLeftMotionBend() get threshold of left Bend
double getRightMotionSpread() get threshold of right spread
double getRightMotionBend() get threshold of right Bend
double getUpMotionSpread() get threshold of up spread
double getUpMotionBend() get threshold of up Bend
double getDownMotionSpread() get threshold of down spread
double getDownMotionBend() get threshold of down Bend

Wearable

Class CatsWearableController Controller of our library
Function void setWeightSensors(double acc, double gyro, double mag) Set weight of sensor to set echo threshold
double getWeightAcc() Get Weight of sensor of acc
double getWeightGyro() Get Weight of sensor of gyro
double getWeightMag() Get Weight of sensor of mag
void setThresholdTime(int tt) Set time that ignore sensors if these sensors continue to fail threshold
int getThresholdTime() get threshold time
void setEchoThreshold(double et) Set Threshold that control flowing of sensor data from wearable to mobile
double getEchoThreshold() get Echo Threshold

Clone this wiki locally