From e230de9a41f40f095eece04095652333468c5c8d Mon Sep 17 00:00:00 2001 From: 5high <5high.net@gmail.com> Date: Mon, 11 Jan 2021 10:52:43 +0800 Subject: [PATCH] Update Xiaomi_Scale.py --- mi-scale/src/Xiaomi_Scale.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/mi-scale/src/Xiaomi_Scale.py b/mi-scale/src/Xiaomi_Scale.py index 2e297da..1bf7a34 100644 --- a/mi-scale/src/Xiaomi_Scale.py +++ b/mi-scale/src/Xiaomi_Scale.py @@ -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 + '"'