1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-23 10:26:49 +01:00

Huawei: Use watch distance and calories

Thanks to Martin.JM for the patch
This commit is contained in:
José Rebelo 2024-10-05 17:32:24 +01:00
parent 9c67a30835
commit cbd6fe2145

View File

@ -1272,8 +1272,18 @@ public class GBDaoGenerator {
activitySample.addIntProperty(SAMPLE_RAW_KIND).notNull().codeBeforeGetterAndSetter(OVERRIDE);
activitySample.addIntProperty(SAMPLE_RAW_INTENSITY).notNull().codeBeforeGetterAndSetter(OVERRIDE);
activitySample.addIntProperty(SAMPLE_STEPS).notNull().codeBeforeGetterAndSetter(OVERRIDE);
activitySample.addIntProperty("calories").notNull();
activitySample.addIntProperty("distance").notNull();
activitySample.addIntProperty("calories").notNull().codeBeforeGetter(
"@Override\n" +
" public int getActiveCalories() {\n" +
" return getCalories();\n" +
" }\n"
);
activitySample.addIntProperty("distance").notNull().codeBeforeGetter(
"@Override\n" +
" public int getDistanceCm() {\n" +
" return getDistance() * 100;\n" +
" }\n"
);
activitySample.addIntProperty("spo").notNull();
activitySample.addIntProperty("heartRate").notNull();
return activitySample;