mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Huawei: Add calories support
These devices provide calories instead of kcal, which are rounded per-sample, resulting in a slight difference from what is shown on the device itself.
This commit is contained in:
@@ -1363,7 +1363,7 @@ public class GBDaoGenerator {
|
||||
activitySample.addIntProperty("calories").notNull().codeBeforeGetter(
|
||||
"@Override\n" +
|
||||
" public int getActiveCalories() {\n" +
|
||||
" return getCalories();\n" +
|
||||
" return getCalories() == HuaweiActivitySample.NOT_MEASURED ? HuaweiActivitySample.NOT_MEASURED : Math.round(getCalories() / 1000f);\n" +
|
||||
" }\n"
|
||||
);
|
||||
activitySample.addIntProperty("distance").notNull().codeBeforeGetter(
|
||||
|
||||
Reference in New Issue
Block a user