Explorar el Código

Update documentation

master
陈福行 hace 5 años
padre
commit
9b1c583a49
Se han modificado 2 ficheros con 326 adiciones y 305 borrados
  1. 166
    154
      README.md
  2. 160
    151
      README_CN.md

+ 166
- 154
README.md Ver fichero

@@ -407,141 +407,153 @@ Get an instance of WBYService.WBYBinder in BleProfileServiceReadyActivity.onServ

- aicare.net.cn.iweightlibrary.entity.AlgorithmInfo (Algorithm Sequence Information)

```
Type Parameter //Description
double weight // weight
int algorithmId //algorithm ID
int adc // impedance value
DecimalInfo decimalInfo //number of decimal places
```

|Type | Parameter |Description
|---|---|---
|double |weight | weight
|int | algorithmId |algorithm ID
|int | adc | impedance value
|DecimalInfo| decimalInfo|number of decimal places


- BM09Data (BM09 data)

```
Type Parameter //Description
int agreementType //agreement type
int unitType //unit type
DecimalInfo decimalInfo //Decimal places
double weight //Weight
int adc //impedance value
double temp //temperature
int algorithmId //algorithm ID
int did //(currently useless)
String bleVersion //Bluetooth version
int bleType //Bluetooth type (0x09)
String address //device address
long timeMillis //measurement timestamp
whether boolean //isStable is stable
|Type | Parameter |Description
|---|---|---
|int |agreementType|agreement type
|int| unitType|unit type
|DecimalInfo| decimalInfo|Decimal places
|double| weight|Weight
|int| adc|impedance value
|double| temp|temperature
|int |algorithmId|algorithm ID
|int |did|currently useless
|String |bleVersion|Bluetooth version
|int| bleType|Bluetooth type (0x09)
|String |address|device address
|long |timeMillis |measurement timestamp
|whether |boolean |isStable is stable


```
- BM15Data (BM15 data)
```
Type Parameter name //Description
String version //Bluetooth version
int agreementType //agreementType
int unitType //unitType
double weight // weight
int adc //impedance value
double temp //temperature (if temp = 6553.5, the scale does not support temperature)
int algorithmId //algorithm ID
int did //(currently useless)
int bleType// Bluetooth type (0x15)
String address// device address
```
|Type | Parameter |Description
|---|---|---
|String |version|Bluetooth version
|int| agreementType|agreementType
|int| unitType|unitType
|double |weight|weight
|int| adc|impedance value
|double| temp |temperature (if temp = 6553.5, the scale does not support temperature)
|int |algorithmId |algorithm ID
|int |did |currently useless
|int| bleType|Bluetooth type (0x15)
|String |address|device address


- BodyFatData
```
Type Parameter // Description
String date //measurement date
String time //time
double weight //weight
double bmi
double bfr
double sfr
int uvi //visceral fat index
double rom //muscle rate
double bmr //basal metabolic rate
double bm //bone mass
double vwc //moisture content
double bodyAge //
double pp //protein rate
int number
int sex
int age //(1; male; 2, female)
int height
int adc //impedance value
```
|Type | Parameter |Description
|---|---|---
|String |date|measurement date
|String |time|time
|double |weight|weight
|double |bmi|
|double |bfr|
|double |sfr|
|int |uvi|visceral fat index
|double| rom|muscle rate
|double| bmr |basal metabolic rate
|double| bm |bone mass
|double| vwc |moisture content
|double| bodyAge |
|double| pp |protein rate
|int| number
|int |sex
|int |age |(1; male; 2, female)
|int |height
|int| adc|impedance value


- BroadData (broadcast data)
```
Type Parameter Description
String name //device name
String address //device address
boolean isBright //Whether the screen is bright
int rssi //signal value
byte [] specificData //broadcast data
int deviceType //device type
```
|Type | Parameter |Description
|---|---|---
|String| name|device name
|String |address|device address
|boolean |isBright|Whether the screen is bright
|int| rssi|signal value
|byte |[] specificData|broadcast data
|int |deviceType|device type


- DecimalInfo (decimal point information)
```
Type Parameter Description
int sourceDecimal // source data decimal places
int kgDecimal //kg number of decimal places
int lbDecimal //lb decimal places
int stDecimal //st number of decimal places
int kg //Graduation kg
int lb //Graduation lb
```
|Type | Parameter |Description
|---|---|---
|int |sourceDecimal|source data decimal places
|int |kgDecimal|kg number of decimal places
|int |lbDecimal|lb decimal places
|int |stDecimal|st number of decimal places
|int |kg|Graduation kg
|int| lb|Graduation lb


- User (User Information)
```
Type Parameter name Description
int id
int sex
int age //(1; male; 2, female)
int height
int weight
int adc //impedance (deprecated)
```
|Type | Parameter |Description
|---|---|---
|int| id|
|int |sex|
|int |age |(1; male; 2, female)
|int |height|
|int |weight|
|int |adc|impedance (deprecated)



- WeightData (weight data)
```
Type Parameter name Description
int cmdType //command type (1, change; 2, stable; 3, in impedance measurement)
double weight
double temp //temperature (if the temperature is Double.MAX_VALUE, the scale does not support temperature)
|Type | Parameter |Description
|---|---|---
|int |cmdType|command type (1, change; 2, stable; 3, in impedance measurement)
|double| weight|
|double| temp |temperature (if the temperature is Double.MAX_VALUE, the scale does not support temperature)
|DecimalInfo| decimalInfo
|int |adc|impedance value
|int |algorithmType|algorithm ID
|int |unitType|
|int| deviceType|device type



DecimalInfo decimalInfo
int adc //impedance value
int algorithmType // algorithm ID
int unitType
int deviceType //device type
```
- cn.net.aicare.algorithmutil.BodyFatData(Calculated body fat data)
```
Type Parameter name Description
double bmi; Body mass index
double bfr; body fat rate
double sfr; Subcutaneous fat rate
int uvi; Visceral fat index
double rom; Rate of muscle
int bmr; basal metabolic rate
double bm; Bone Mass
double vwc; Water content
int bodyAge; physical bodyAge
double pp; protein percentage
```
|Type | Parameter |Description
|---|---|---
|double| bmi| Body mass index
|double| bfr| body fat rate
|double| sfr| Subcutaneous fat rate
|int |uvi| Visceral fat index
|double| rom| Rate of muscle
|int| bmr| basal metabolic rate
|double| bm| Bone Mass
|double |vwc| Water content
|int| bodyAge| physical bodyAge
|double |pp| protein percentage




- MoreFatData
|Type | Parameter |Description
|---|---|---
|double| standardWeight| Standard weight
|double| controlWeight| Weight control
|double| fat| Fat mass
|double| removeFatWeight| Fat-free weight
|double| muscleMass| Muscle mass
|double| protein| Protein amount
|MoreFatData.FatLevel fatLevel| Obesity grade
```
Type Parameter name Description
double standardWeight; Standard weight
double controlWeight; Weight control
double fat; Fat mass
double removeFatWeight; Fat-free weight
double muscleMass; Muscle mass
double protein; Protein amount
MoreFatData.FatLevel fatLevel; Obesity grade
public static enum FatLevel {
UNDER, Underweight
THIN, Thin
NORMAL, standard
OVER, Favor
UNDER, // Underweight
THIN, // Thin
NORMAL, // standard
OVER, // Favor
FAT; overweight
}
```
@@ -556,41 +568,41 @@ public static final int STATE_TIME_OUT = 5; // connection timed out
```
- AicareBleConfig.SettingStatus Status information returned by the device
```
        int NORMAL = 0; // Normal
        int LOW_POWER = 1; // Low power
        int LOW_VOLTAGE = 2; // Low voltage
        int ERROR = 3; // overload
        int TIME_OUT = 4; // timeout
        int UNSTABLE = 5; // Unstable
        int SET_UNIT_SUCCESS = 6; // Set unit success
        int SET_UNIT_FAILED = 7; // Set unit failed
        int SET_TIME_SUCCESS = 8; // Successfully set time
        int SET_TIME_FAILED = 9; // Failed to set time
        int SET_USER_SUCCESS = 10; // Set user successfully
        int SET_USER_FAILED = 11; // Failed to set user
        int UPDATE_USER_LIST_SUCCESS = 12; // Update user list successfully
        int UPDATE_USER_LIST_FAILED = 13; // Update user list failed
        int UPDATE_USER_SUCCESS = 14; // Update user successfully
        int UPDATE_USER_FAILED = 15; // Update user failed
        int NO_HISTORY = 16; // There is no historical data
        int HISTORY_START_SEND = 17; // historical data starts to be sent
        int HISTORY_SEND_OVER = 18; // historical data transmission is complete
        int NO_MATCH_USER = 19; // No matching users
        int ADC_MEASURED_ING = 20; // Impedance measurement
        int ADC_ERROR = 21; // Impedance measurement failed
        int REQUEST_DISCONNECT = 22; // The device requested to disconnect
        int SET_DID_SUCCESS = 23; // DID set successfully
        int SET_DID_FAILED = 24; // Set DID failed
        int DATA_SEND_END = 25; // Measured data transmission is complete
        int UNKNOWN = -1; // unknown
int NORMAL = 0; // Normal
int LOW_POWER = 1; // Low power
int LOW_VOLTAGE = 2; // Low voltage
int ERROR = 3; // overload
int TIME_OUT = 4; // timeout
int UNSTABLE = 5; // Unstable
int SET_UNIT_SUCCESS = 6; // Set unit success
int SET_UNIT_FAILED = 7; // Set unit failed
int SET_TIME_SUCCESS = 8; // Successfully set time
int SET_TIME_FAILED = 9; // Failed to set time
int SET_USER_SUCCESS = 10; // Set user successfully
int SET_USER_FAILED = 11; // Failed to set user
int UPDATE_USER_LIST_SUCCESS = 12; // Update user list successfully
int UPDATE_USER_LIST_FAILED = 13; // Update user list failed
int UPDATE_USER_SUCCESS = 14; // Update user successfully
int UPDATE_USER_FAILED = 15; // Update user failed
int NO_HISTORY = 16; // There is no historical data
int HISTORY_START_SEND = 17; // historical data starts to be sent
int HISTORY_SEND_OVER = 18; // historical data transmission is complete
int NO_MATCH_USER = 19; // No matching users
int ADC_MEASURED_ING = 20; // Impedance measurement
int ADC_ERROR = 21; // Impedance measurement failed
int REQUEST_DISCONNECT = 22; // The device requested to disconnect
int SET_DID_SUCCESS = 23; // DID set successfully
int SET_DID_FAILED = 24; // Set DID failed
int DATA_SEND_END = 25; // Measured data transmission is complete
int UNKNOWN = -1; // unknown
```
- WBYService Bluetooth information returned by the device
```
    public final static int BLE_VERSION = 0; // Bluetooth version
    public final static int MCU_DATE = 1; // mcu date
    public final static int MCU_TIME = 2; // mcu time
    public final static int USER_ID = 3; // user number
    public final static int ADC = 4; // impedance value
public final static int BLE_VERSION = 0; // Bluetooth version
public final static int MCU_DATE = 1; // mcu date
public final static int MCU_TIME = 2; // mcu time
public final static int USER_ID = 3; // user number
public final static int ADC = 4; // impedance value
```

## Version History
@@ -634,7 +646,7 @@ deviceType == AicareBleConfig.TYPE_WEI_TEMP is a connected scale with temperatur
- Which units does the Bluetooth protocol support?
1. Units only support up to 4 types (kg, lb, st, kg), please refer to the factory settings of the scale for specific units supported.

-Can't scan the Bluetooth device?
- Can't scan the Bluetooth device?
1. Check whether the permissions of the App are normal. The 6.0 and above systems must locate the permissions and need to manually obtain the permissions
2. Check whether the location service of the mobile phone is turned on, some mobile phones may need to turn on the GPS
3. Unplug the battery and restart the scale
@@ -649,7 +661,7 @@ deviceType == AicareBleConfig.TYPE_WEI_TEMP is a connected scale with temperatur
- How do broadcast scales determine the end of measurement?
1. All the data of the broadcast scale is returned from getAicareDevice and parsed to get the WeightData object. GetCmdType () == 3 in WeightData means the measurement is completed, please refer to the demo for details

-The data displayed by the scale is inconsistent with the data received by the app
- The data displayed by the scale is inconsistent with the data received by the app
1. The SDK will request decimals by default, and you can use getDecimalInfo () in WBYBinder to actively obtain decimals
2. When the app calculates the weight, it needs to pass in DecimalInfo (decimal object) for calculation
```

+ 160
- 151
README_CN.md Ver fichero

@@ -4,12 +4,9 @@
[![](https://jitpack.io/v/elinkthings/BodyFatScaleSDKRepositoryAndroid.svg)](https://jitpack.io/#elinkthings/BodyFatScaleSDKRepositoryAndroid)

[aar包下载地址](https://github.com/elinkthings/BodyFatScaleSDKRepositoryAndroid/releases)

[key申请地址](http://sdk.aicare.net.cn)

[English documentation](README.md)


## 目录
- 概述
- 使用条件
@@ -408,136 +405,146 @@ double bfr, double rom, double pp)
## 类说明

- aicare.net.cn.iweightlibrary.entity.AlgorithmInfo(算法序列信息)
```
类型 参数名 说明
double weight 体重
int algorithmId 算法ID
int adc 阻抗值
DecimalInfo decimalInfo 小数点位数
```
|类型| 参数名| 说明
|---|---|---
|double | weight |体重
|int | algorithmId |算法ID
|int | adc |阻抗值
|DecimalInfo | decimalInfo |小数点位数



- BM09Data(BM09数据)
```
类型 参数名 说明
int agreementType 协议类型
int unitType 单位类型
DecimalInfo decimalInfp 小数点位数
double weight 体重
int adc 阻抗值
double temp 温度
int algorithmId 算法ID
int did (目前无用)
String bleVersion 蓝牙版本
int bleType 蓝牙类型(0x09)
String address 设备地址
long timeMillis 测量时间戳
boolean isStable 是否稳定
```
|类型| 参数名| 说明
|---|---|---
|int | agreementType |协议类型
|int | unitType |单位类型
|DecimalInfo | decimalInfp| 小数点位数
|double | weight |体重
|int | adc |阻抗值
|double | temp |温度
|int | algorithmId| 算法ID
|int | did |(目前无用)
|String | bleVersion |蓝牙版本
|int | bleType |蓝牙类型(0x09)
|String | address |设备地址
|long | timeMillis |测量时间戳
|boolean | isStable |是否稳定


- BM15Data(BM15数据)
```
类型 参数名 说明
String version 蓝牙版本
int agreementType 协议类型
int unitType 单位类型
double weight 体重
int adc 阻抗值
double temp 温度(若temp=6553.5,则表示秤不支持温度)
int algorithmId 算法ID
int did (目前无用)
int bleType 蓝牙类型(0x15)
String address 设备地址
```
|类型| 参数名| 说明
|---|---|---
|String | version |蓝牙版本
|int | agreementType |协议类型
|int | unitType |单位类型
|double | weight |体重
|int | adc |阻抗值
|double | temp |温度(若temp=6553.5,则表示秤不支持温度)
|int | algorithmId |算法ID
|int | did |(目前无用)
|int | bleType |蓝牙类型(0x15)
|String | address |设备地址

- BodyFatData(体脂数据)
```
类型 参数名 说明
String date 测量日期
String time 测量时间
double weight 体重
double bmi 身体质量指数
double bfr 体脂率
double sfr 皮下脂肪率
int uvi 内脏脂肪指数
double rom 肌肉率
double bmr 基础代谢率
double bm 骨量
double vwc 水分率
double bodyAge 身体年龄
double pp 蛋白率
int number 编号
int sex 性别
int age 年龄(1、男;2、女)
int height 身高
int adc 阻抗值
```
|类型| 参数名| 说明
|---|---|---
|String |date |测量日期
|String |time |测量时间
|double |weight |体重
|double |bmi |身体质量指数
|double |bfr |体脂率
|double |sfr |皮下脂肪率
|int |uvi |内脏脂肪指数
|double |rom |肌肉率
|double |bmr |基础代谢率
|double |bm |骨量
|double |vwc |水分率
|double |bodyAge| 身体年龄
|double |pp |蛋白率
|int |number |编号
|int |sex |性别
|int |age |年龄(1、男;2、女)
|int |height |身高
|int |adc |阻抗值



- BroadData(广播数据)
```
类型 参数名 说明
String name 设备名
String address 设备地址
boolean isBright 是否亮屏
int rssi 信号值
byte[] specificData 广播数据
int deviceType 设备类型
```
|类型| 参数名| 说明
|---|---|---
|String |name |设备名
|String |address |设备地址
|boolean |isBright |是否亮屏
|int |rssi |信号值
|byte[] |specificData |广播数据
|int |deviceType |设备类型


- DecimalInfo(小数点位数信息)
```
类型 参数名 说明
int sourceDecimal 源数据小数点位数
int kgDecimal kg小数点位数
int lbDecimal lb小数点位数
int stDecimal st小数点位数
int kgGraduation kg分度
int lbGraduation lb分度
```
|类型| 参数名| 说明
|---|---|---
|int| sourceDecimal |源数据小数点位数
|int| kgDecimal |kg小数点位数
|int| lbDecimal |lb小数点位数
|int| stDecimal |st小数点位数
|int| kgGraduation |kg分度
|int| lbGraduation |lb分度


- User(用户信息)
```
类型 参数名 说明
int id 编号
int sex 性别
int age 年龄(1、男;2、女)
int height 身高
int weight 体重
int adc 阻抗值(弃用)
```
|类型| 参数名| 说明
|---|---|---
|int|id |编号
|int|sex |性别
|int|age |年龄(1、男;2、女)
|int|height |身高
|int|weight |体重
|int|adc |阻抗值(弃用)


- WeightData(体重数据)
```
类型 参数名 说明
int cmdType 命令类型(1、变化;2、稳定;3、阻抗测量中)
double weight 体重
double temp 温度(若温度为Double.MAX_VALUE则表示秤不支持温度)
DecimalInfo decimalInfo 小数点位数信息
int adc 阻抗值
int algorithmType 算法ID
int unitType 单位类型
int deviceType 设备类型
```
|类型| 参数名| 说明
|---|---|---
|int| cmdType| 命令类型(1、变化;2、稳定;3、阻抗测量中)
|double| weight| 体重
|double| temp |温度(若温度为Double.MAX_VALUE则表示秤不支持温度)
|DecimalInfo| decimalInfo| 小数点位数信息
|int| adc |阻抗值
|int| algorithmType| 算法ID
|int| unitType |单位类型
|int| deviceType |设备类型


- cn.net.aicare.algorithmutil.BodyFatData(计算得到的体脂数据)
```
类型 参数名 说明
double bmi; 身体质量指数
double bfr; 体脂率 body fat rate
double sfr; 皮下脂肪率 Subcutaneous fat rate
int uvi; 内脏脂肪指数
double rom; 肌肉率 Rate of muscle
int bmr; 基础代谢率 basal metabolic rate
double bm; 骨骼质量 Bone Mass
double vwc; 水含量
int bodyAge; 身体年龄 physical bodyAge
double pp; 蛋白率 protein percentage
```
|类型| 参数名| 说明
|---|---|---
|double| bmi|身体质量指数
|double| bfr|体脂率 body fat rate
|double| sfr|皮下脂肪率 Subcutaneous fat rate
|int| uvi| 内脏脂肪指数
|double |rom| 肌肉率 Rate of muscle
|int |bmr| 基础代谢率 basal metabolic rate
|double |bm| 骨骼质量 Bone Mass
|double| vwc| 水含量
|int| bodyAge| 身体年龄 physical bodyAge
|double |pp| 蛋白率 protein percentage



- MoreFatData
|类型| 参数名| 说明
|---|---|---
|double| standardWeight| 标准体重
|double| controlWeight| 体重控制量
|double| fat| 脂肪量
|double| removeFatWeight| 去脂体重
|double| muscleMass| 肌肉量
|double| protein| 蛋白量
|MoreFatData.FatLevel| fatLevel| 肥胖等级

```
类型 参数名 说明
double standardWeight; 标准体重
double controlWeight; 体重控制量
double fat; 脂肪量
double removeFatWeight; 去脂体重
double muscleMass; 肌肉量
double protein; 蛋白量
MoreFatData.FatLevel fatLevel; 肥胖等级
public static enum FatLevel {
UNDER, 体重不足
THIN, 偏瘦
@@ -546,6 +553,8 @@ public static enum FatLevel {
FAT; 超重
}
```


- BleProfileService 连接状态
```
public static final int STATE_CONNECTING = 4; //连接中
@@ -557,41 +566,41 @@ public static final int STATE_TIME_OUT = 5;//连接超时
```
- AicareBleConfig.SettingStatus 设备返回的状态信息
```
int NORMAL = 0;//正常
int LOW_POWER = 1;//低功耗
int LOW_VOLTAGE = 2;//低电压
int ERROR = 3;//超载
int TIME_OUT = 4;//超时
int UNSTABLE = 5;//称不稳定
int SET_UNIT_SUCCESS = 6;//设置单位成功
int SET_UNIT_FAILED = 7;//设置单位失败
int SET_TIME_SUCCESS = 8;//设置时间成功
int SET_TIME_FAILED = 9;//设置时间失败
int SET_USER_SUCCESS = 10;//设置用户成功
int SET_USER_FAILED = 11;//设置用户失败
int UPDATE_USER_LIST_SUCCESS = 12;//更新用户列表成功
int UPDATE_USER_LIST_FAILED = 13;//更新用户列表失败
int UPDATE_USER_SUCCESS = 14;//更新用户成功
int UPDATE_USER_FAILED = 15;//更新用户失败
int NO_HISTORY = 16;//没有历史数据
int HISTORY_START_SEND = 17;//历史数据开始发送
int HISTORY_SEND_OVER = 18;//历史数据发送完成
int NO_MATCH_USER = 19;//没有匹配的用户
int ADC_MEASURED_ING = 20;//阻抗测量中
int ADC_ERROR = 21;//阻抗测量失败
int REQUEST_DISCONNECT = 22;//设备请求断开
int SET_DID_SUCCESS = 23;//设置DID成功
int SET_DID_FAILED = 24;//设置DID失败
int DATA_SEND_END = 25;//测量数据发送完成
int UNKNOWN = -1;//未知
int NORMAL = 0;//正常
int LOW_POWER = 1;//低功耗
int LOW_VOLTAGE = 2;//低电压
int ERROR = 3;//超载
int TIME_OUT = 4;//超时
int UNSTABLE = 5;//称不稳定
int SET_UNIT_SUCCESS = 6;//设置单位成功
int SET_UNIT_FAILED = 7;//设置单位失败
int SET_TIME_SUCCESS = 8;//设置时间成功
int SET_TIME_FAILED = 9;//设置时间失败
int SET_USER_SUCCESS = 10;//设置用户成功
int SET_USER_FAILED = 11;//设置用户失败
int UPDATE_USER_LIST_SUCCESS = 12;//更新用户列表成功
int UPDATE_USER_LIST_FAILED = 13;//更新用户列表失败
int UPDATE_USER_SUCCESS = 14;//更新用户成功
int UPDATE_USER_FAILED = 15;//更新用户失败
int NO_HISTORY = 16;//没有历史数据
int HISTORY_START_SEND = 17;//历史数据开始发送
int HISTORY_SEND_OVER = 18;//历史数据发送完成
int NO_MATCH_USER = 19;//没有匹配的用户
int ADC_MEASURED_ING = 20;//阻抗测量中
int ADC_ERROR = 21;//阻抗测量失败
int REQUEST_DISCONNECT = 22;//设备请求断开
int SET_DID_SUCCESS = 23;//设置DID成功
int SET_DID_FAILED = 24;//设置DID失败
int DATA_SEND_END = 25;//测量数据发送完成
int UNKNOWN = -1;//未知
```
- WBYService 设备返回的蓝牙信息
```
public final static int BLE_VERSION = 0; //蓝牙版本
public final static int MCU_DATE = 1; //mcu日期
public final static int MCU_TIME = 2; //mcu 时间
public final static int USER_ID = 3; //用户编号
public final static int ADC = 4; //阻抗值
public final static int BLE_VERSION = 0; //蓝牙版本
public final static int MCU_DATE = 1; //mcu日期
public final static int MCU_TIME = 2; //mcu 时间
public final static int USER_ID = 3; //用户编号
public final static int ADC = 4; //阻抗值
```
## 版本历史
|版本号|更新时间|作者|更新信息|

Cargando…
Cancelar
Guardar