新增JS-B68T设备
This commit is contained in:
parent
dcdb145cb1
commit
4034e3be6e
|
|
@ -89,7 +89,7 @@
|
|||
ageRange: [],
|
||||
ageIndex: 30,
|
||||
send_err_count: 0,
|
||||
info: {
|
||||
BLEResult: {
|
||||
bmi: 0,
|
||||
weight: 0,
|
||||
fatRate: 0, //脂肪率
|
||||
|
|
@ -105,6 +105,9 @@
|
|||
},
|
||||
computed: {
|
||||
...mapState(["user", "isConnected", "isBluetoothTyle", "appTheme"]),
|
||||
info() {
|
||||
return this.user
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let that = this
|
||||
|
|
@ -308,33 +311,34 @@
|
|||
|
||||
if(raw[0] == 0x5A) {
|
||||
// 体重(高低位组合, 实际值的100倍)
|
||||
that.info.weight = ((raw[2] << 8) | raw[3]) / 100.0
|
||||
if (that.info.weight < 1) {
|
||||
that.info.weight = ((raw[2] << 8) | raw[3])
|
||||
that.BLEResult.weight = ((raw[2] << 8) | raw[3]) / 100.0
|
||||
if (that.BLEResult.weight < 1) {
|
||||
that.BLEResult.weight = ((raw[2] << 8) | raw[3])
|
||||
}
|
||||
|
||||
// 脂肪率(高低位组合, 实际值的10倍)
|
||||
that.info.fatRate = ((raw[4] << 8) | raw[5]) / 10.0
|
||||
that.BLEResult.fatRate = ((raw[4] << 8) | raw[5]) / 10.0
|
||||
|
||||
// 水分率(高低位组合, 实际值的10倍)
|
||||
that.info.waterRate = ((raw[6] << 8) | raw[7]) / 10.0
|
||||
that.BLEResult.waterRate = ((raw[6] << 8) | raw[7]) / 10.0
|
||||
|
||||
// 肌肉率(高低位组合, 实际值的10倍)
|
||||
that.info.muscleRate = ((raw[8] << 8) | raw[9]) / 10.0
|
||||
that.BLEResult.muscleRate = ((raw[8] << 8) | raw[9]) / 10.0
|
||||
|
||||
// 骨量(高低位组合, 实际值的10倍)
|
||||
that.info.boneMass = ((raw[10] << 8) | raw[11]) / 10.0
|
||||
that.BLEResult.boneMass = ((raw[10] << 8) | raw[11]) / 10.0
|
||||
|
||||
// 阻抗(高位和低位组合)
|
||||
that.info.impedance = (raw[12] << 8) | raw[13]
|
||||
that.BLEResult.impedance = (raw[12] << 8) | raw[13]
|
||||
|
||||
//BMI
|
||||
that.info.bmi = ((raw[14] << 8) | raw[16]) / 10.0;
|
||||
that.BLEResult.bmi = ((raw[14] << 8) | raw[16]) / 10.0;
|
||||
|
||||
// 身高(高低位组合, 厘米)
|
||||
that.info.height = raw[15]
|
||||
that.BLEResult.height = raw[15]
|
||||
|
||||
if (raw.length == 18 && raw[17] == 0xA5) {
|
||||
that.BLEResult.familyid = that.info.id
|
||||
that.handleGetMeasure()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue