新增JS-B68T设备

This commit is contained in:
subing008 2025-09-04 17:35:59 +08:00
parent dcdb145cb1
commit 4034e3be6e
1 changed files with 15 additions and 11 deletions

View File

@ -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()
}
}