Просмотр исходного кода

1,更新依赖库

2,微调双频八电极界面
master
陈福行 23 часов назад
Родитель
Сommit
df2e88d082

+ 3
- 3
app/build.gradle Просмотреть файл

@@ -9,7 +9,7 @@ android {
applicationId "aicare.net.cn.sdk.ailinksdkdemoandroid"
minSdkVersion app_minSdk
targetSdkVersion app_targetSdk
versionName "1.16.21"
versionName "1.16.22"
versionCode getVersionCodeNumber(versionName)
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@@ -79,10 +79,10 @@ dependencies {
testImplementation 'junit:junit:4.12'
implementation 'androidx.cardview:cardview:1.0.0'
//https://jitpack.io/#elinkthings/AILinkSDKRepositoryAndroid
implementation 'com.github.elinkthings:AILinkSDKRepositoryAndroid:1.15.04'//蓝牙核心库
implementation 'com.github.elinkthings:AILinkSDKRepositoryAndroid:1.15.11'//蓝牙核心库

//https://jitpack.io/#elinkthings/AILinkSDKParsingLibraryAndroid
implementation 'com.github.elinkthings:AILinkSDKParsingLibraryAndroid:1.9.13'//蓝牙解析库,需要依赖核心库
implementation 'com.github.elinkthings:AILinkSDKParsingLibraryAndroid:1.9.20'//蓝牙解析库,需要依赖核心库
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
// implementation project(path: ':otalibrary')

+ 1
- 1
app/src/main/java/aicare/net/cn/sdk/ailinksdkdemoandroid/BleCmdActivity.java Просмотреть файл

@@ -307,7 +307,7 @@ public class BleCmdActivity extends BleBaseActivity implements OnCallbackBle, On
}
byte[] data = BleStrUtils.stringToByte(setDevice);
sendBleBean = new SendBleBean();
sendBleBean.setHex(mBleSendCmdUtil.setDeviceInfo(data));
sendBleBean.setHex(mBleSendCmdUtil.setDeviceSaveCustomData(data));
sendData(sendBleBean);
addShowData("设置设备信息:" + BleStrUtils.byte2HexStr(data));
} else if (id == R.id.btn_get_device) {// 获取设备信息

+ 2
- 1
app/src/main/java/aicare/net/cn/sdk/ailinksdkdemoandroid/modules/coffee_scale/CoffeeScaleActivity.java Просмотреть файл

@@ -505,9 +505,10 @@ public class CoffeeScaleActivity extends BleBaseActivity implements View.OnClick
private void appBrewMode() {
Log.i(TAG, "设置冲煮模式");
int status = rb_brew_mode_enter.isChecked() ? 1 : 0;
int btn = 1;
if (mCoffeeScaleData != null) {
addText("APP设置冲煮模式:" + status + ";" + getBrewMode(status));
mCoffeeScaleData.brewMode(status);
mCoffeeScaleData.brewMode(status,btn);
}
}


+ 57
- 25
app/src/main/java/aicare/net/cn/sdk/ailinksdkdemoandroid/modules/eight_bodyfat/dual_band/EightDoubleBodyfatActivity.java Просмотреть файл

@@ -101,31 +101,61 @@ public class EightDoubleBodyfatActivity extends BleBaseActivity implements View.
test_bodyfit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
List<EightDoubleBodyFatAdcBean> list = new ArrayList<>();
EightDoubleBodyFatAdcBean adcBean = new EightDoubleBodyFatAdcBean();
adcBean.setAdcRightHand(0x70CE5D91L);
adcBean.setAdcLeftHand(0x61A2D714L);
adcBean.setAdcBody(0x3013EEE0L);
adcBean.setAdcRightFoot(0x50A93C9FL);
adcBean.setAdcLeftFoot(0x10071D0CL);
adcBean.setFrequencyId(0x01);
adcBean.setAlgorithmsId(0x01);
list.add(adcBean);

EightDoubleBodyFatAdcBean adcBean100 = new EightDoubleBodyFatAdcBean();
adcBean100.setAdcRightHand(0x509A9A5FL);
adcBean100.setAdcLeftHand(0x7037B559L);
adcBean100.setAdcBody(0x3022CEC6L);
adcBean100.setAdcRightFoot(0x60AA8F98L);
adcBean100.setAdcLeftFoot(0x40F72698L);
adcBean100.setFrequencyId(0x02);
adcBean100.setAlgorithmsId(0x01);
list.add(adcBean100);
mCid = EightDoubleBodyFatBleConfig.CID_APP;
onTestCompleted(list);
testAdc2();

}
});

}

private void testAdc1(){
List<EightDoubleBodyFatAdcBean> list = new ArrayList<>();
EightDoubleBodyFatAdcBean adcBean = new EightDoubleBodyFatAdcBean();
adcBean.setAdcRightHand(0x70CE5D91L);
adcBean.setAdcLeftHand(0x61A2D714L);
adcBean.setAdcBody(0x3013EEE0L);
adcBean.setAdcRightFoot(0x50A93C9FL);
adcBean.setAdcLeftFoot(0x10071D0CL);
adcBean.setFrequencyId(0x01);
adcBean.setAlgorithmsId(0x01);
list.add(adcBean);

EightDoubleBodyFatAdcBean adcBean100 = new EightDoubleBodyFatAdcBean();
adcBean100.setAdcRightHand(0x509A9A5FL);
adcBean100.setAdcLeftHand(0x7037B559L);
adcBean100.setAdcBody(0x3022CEC6L);
adcBean100.setAdcRightFoot(0x60AA8F98L);
adcBean100.setAdcLeftFoot(0x40F72698L);
adcBean100.setFrequencyId(0x02);
adcBean100.setAlgorithmsId(0x01);
list.add(adcBean100);
onTestCompleted(list);
}
private void testAdc2(){
List<EightDoubleBodyFatAdcBean> list = new ArrayList<>();
EightDoubleBodyFatAdcBean adcBean = new EightDoubleBodyFatAdcBean();
adcBean.setAdcRightHand(1635046219);
adcBean.setAdcLeftHand(31463021);
adcBean.setAdcBody(540087696);
adcBean.setAdcRightFoot(8196483);
adcBean.setAdcLeftFoot(4182139);
adcBean.setFrequencyId(0x01);
adcBean.setAlgorithmsId(0x01);
list.add(adcBean);

EightDoubleBodyFatAdcBean adcBean100 = new EightDoubleBodyFatAdcBean();
adcBean100.setAdcRightHand(1343010255);
adcBean100.setAdcLeftHand(11339343);
adcBean100.setAdcBody(536975770);
adcBean100.setAdcRightFoot(816731059);
adcBean100.setAdcLeftFoot(1884060387);
adcBean100.setFrequencyId(0x02);
adcBean100.setAlgorithmsId(0x01);
list.add(adcBean100);
onTestCompleted(list);
}



private void initUserInfo() {
mWeightKg = et_weight.getText().toString().trim();
@@ -291,11 +321,13 @@ public class EightDoubleBodyfatActivity extends BleBaseActivity implements View.


private void getBodyFatData(List<EightDoubleBodyFatAdcBean> adcBeanList) {
if (mCid != EightDoubleBodyFatBleConfig.CID_APP || adcBeanList == null || adcBeanList.isEmpty()) {
if ((mCid != EightDoubleBodyFatBleConfig.CID_APP && mCid != EightDoubleBodyFatBleConfig.CID_MCU) || adcBeanList == null || adcBeanList.isEmpty()) {
return;
}
mEightDoubleBodyFatData.getDualEightBodyData(mUserInfoBean.getSex(), mUserInfoBean.getAge(), mUserInfoBean.getWeightKg(),
mUserInfoBean.getHeightCm(), adcBeanList);
if (mEightDoubleBodyFatData!=null) {
mEightDoubleBodyFatData.getDualEightBodyData(mUserInfoBean.getSex(), mUserInfoBean.getAge(), mUserInfoBean.getWeightKg(),
mUserInfoBean.getHeightCm(), adcBeanList);
}
}

@Override

+ 1
- 1
app/src/main/res/layout/activity_eight_double_body_fata.xml Просмотреть файл

@@ -139,7 +139,7 @@
android:id="@+id/test_bodyfit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="计算体脂数据" />
android:text="计算体脂数据(测试用)" />

<ListView
android:id="@+id/log_list"

Загрузка…
Отмена
Сохранить