Update Xiaomi_Scale.py

This commit is contained in:
5high 2021-01-11 10:52:43 +08:00 committed by GitHub
parent 5e3988699c
commit e230de9a41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -290,24 +290,24 @@ class ScanProcessor():
message += ',"肌肉量":' + "{:.2f}".format(lib.getMuscleMass())
message += ',"蛋白质":' + "{:.2f}".format(lib.getProteinPercentage())
if str(bodyscale[lib.getBodyType()]) == "Overweight":
type = "超重型"
bodytype = "超重型"
elif str(bodyscale[lib.getBodyType()]) == "Obese":
type = "肥胖型"
bodytype = "肥胖型"
elif str(bodyscale[lib.getBodyType()]) == "Thick-set":
type = "壮实型"
bodytype = "壮实型"
elif str(bodyscale[lib.getBodyType()]) == "Lack-exerscise":
type = "缺乏运动型"
bodytype = "缺乏运动型"
elif str(bodyscale[lib.getBodyType()]) == "Balanced":
type = "平衡型"
bodytype = "平衡型"
elif str(bodyscale[lib.getBodyType()]) == "Balanced-muscular":
type = "平衡肌肉型"
bodytype = "平衡肌肉型"
elif str(bodyscale[lib.getBodyType()]) == "Skinny":
type = "偏瘦型"
bodytype = "偏瘦型"
elif str(bodyscale[lib.getBodyType()]) == "Balanced-skinny":
type = "平衡瘦型"
bodytype = "平衡瘦型"
elif str(bodyscale[lib.getBodyType()]) == "Skinny-muscular":
type = "瘦肌肉型"
message += ',"身体类型":"' + type + '"'
bodytype = "瘦肌肉型"
message += ',"身体类型":"' + bodytype + '"'
message += ',"代谢年龄":' + "{:.0f}".format(lib.getMetabolicAge())
message += ',"测量时间":"' + mitdatetime + '"'