From e3d0b523447cb088d7fcb09b2d4ea9c593cf0d31 Mon Sep 17 00:00:00 2001 From: 5high <5high.net@gmail.com> Date: Sun, 10 Jan 2021 19:19:29 +0800 Subject: [PATCH] Update Xiaomi_Scale.py --- mi-scale/src/Xiaomi_Scale.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mi-scale/src/Xiaomi_Scale.py b/mi-scale/src/Xiaomi_Scale.py index f56b662..5597c2d 100644 --- a/mi-scale/src/Xiaomi_Scale.py +++ b/mi-scale/src/Xiaomi_Scale.py @@ -289,7 +289,13 @@ class ScanProcessor(): message += ',"骨量":' + "{:.2f}".format(lib.getBoneMass()) message += ',"肌肉量":' + "{:.2f}".format(lib.getMuscleMass()) message += ',"蛋白质":' + "{:.2f}".format(lib.getProteinPercentage()) - message += ',"身体类型":"' + str(bodyscale[lib.getBodyType()]) + '"' + if str(bodyscale[lib.getBodyType()]) == "Overweight": + type = "超重" + elif str(bodyscale[lib.getBodyType()]) == "Obese": + type = "肥胖" + elif str(bodyscale[lib.getBodyType()]) == "Thick-set": + type = "壮实" + message += ',"身体类型":"' + type + '"' message += ',"代谢年龄":' + "{:.0f}".format(lib.getMetabolicAge()) message += ',"测量时间":"' + mitdatetime + '"'