48 lines
1.6 KiB
C++
48 lines
1.6 KiB
C++
#ifndef TJDUI_APP_DAILYDATA_MODEL_H
|
|
#define TJDUI_APP_DAILYDATA_MODEL_H
|
|
#include "sql_fit.h"
|
|
|
|
namespace TJD {
|
|
|
|
class TjdUiAppDailyDataModel
|
|
{
|
|
public:
|
|
TjdUiAppDailyDataModel() {}
|
|
~TjdUiAppDailyDataModel() {}
|
|
static TjdUiAppDailyDataModel &GetInstance(void);
|
|
|
|
uint8_t GetStepPersent(void);
|
|
uint8_t GetKCALPersent(void);
|
|
uint8_t GetTimePersent(void);
|
|
uint8_t GetDistancePersent(void);
|
|
uint8_t RequestDaliyData(void);
|
|
|
|
void SetDefaultDailyData(void);
|
|
uint32_t GetTotalStep(void) { return totalStepValue; }
|
|
uint32_t GetTotalKCAL(void) { return totalKCALValue; }
|
|
uint32_t GetTotalTime(void) { return totalTimeValue; }
|
|
uint32_t GetTotalDistance(void) { return totalDistanceValue; }
|
|
void LoadChartData(void);
|
|
uint32_t *GetStepDayArray(void) { return stepDayArray; }
|
|
uint16_t *GetKCALDayArray(void) { return KCALDayArray; }
|
|
uint16_t *GetTimeDayArray(void) { return timeDayArray; }
|
|
uint16_t *GetDistanceDayArray(void) { return distanceDayArray; }
|
|
|
|
private:
|
|
uint32_t defaultStepValue = 0;
|
|
uint32_t totalStepValue = 0;
|
|
uint16_t defaultKCALValue = 0;
|
|
uint16_t totalKCALValue = 0;
|
|
uint16_t defaultTimeValue = 0;
|
|
uint16_t totalTimeValue = 0;
|
|
uint16_t defaultDistanceValue = 0;
|
|
uint16_t totalDistanceValue = 0;
|
|
|
|
uint32_t stepDayArray[DAILYDATA_DAY_MAX_NUM]{0};
|
|
uint16_t KCALDayArray[DAILYDATA_DAY_MAX_NUM]{0};
|
|
uint16_t timeDayArray[DAILYDATA_DAY_MAX_NUM]{0};
|
|
uint16_t distanceDayArray[DAILYDATA_DAY_MAX_NUM]{0};
|
|
};
|
|
|
|
} // namespace TJD
|
|
#endif |