Skip to content

Commit

Permalink
Merge pull request #223 from RuffaloLavoisier/DualAnalogOverlays
Browse files Browse the repository at this point in the history
Update OSW-APP resolve #23, #206, #207, #215, #220
  • Loading branch information
simonmicro authored May 29, 2022
2 parents 5bf9b17 + 405b49e commit 9ff4d91
Show file tree
Hide file tree
Showing 37 changed files with 1,160 additions and 353 deletions.
22 changes: 22 additions & 0 deletions include/apps/tools/OswAppFitnessStats.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#ifndef OSW_APP_FITNESS_STATS_H
#define OSW_APP_FITNESS_STATS_H

#include <osw_hal.h>
#include <osw_ui.h>

#include "osw_app.h"

class OswAppFitnessStats : public OswApp {
public:
OswAppFitnessStats(void) { ui = OswUI::getInstance(); };
virtual void setup() override;
virtual void loop() override;
virtual void stop() override;
~OswAppFitnessStats(){};
void showFitnessTracking();

private:
OswUI* ui;
};

#endif
26 changes: 26 additions & 0 deletions include/apps/tools/OswAppKcalStats.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#ifndef OSW_APP_KCAL_STATS_H
#define OSW_APP_KCAL_STATS_H

#include <osw_hal.h>
#include <osw_ui.h>

#include "osw_app.h"

class OswAppKcalStats : public OswApp {
public:
OswAppKcalStats(void) { ui = OswUI::getInstance(); };
virtual void setup() override;
virtual void loop() override;
virtual void stop() override;
~OswAppKcalStats(){};

private:
uint8_t cursorPos = 6; // WeekDay position
void drawCurvedChart();
void showCurvedChart();
void readyValue();
uint16_t weekValue[7] = {};
OswUI* ui;
};

#endif
23 changes: 23 additions & 0 deletions include/apps/tools/OswAppStepStats.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#ifndef OSW_APP_STEP_STATS_H
#define OSW_APP_STEP_STATS_H

#include <osw_hal.h>
#include <osw_ui.h>

#include "osw_app.h"

class OswAppStepStats : public OswApp {
public:
OswAppStepStats(void) { ui = OswUI::getInstance(); };
virtual void setup() override;
virtual void loop() override;
virtual void stop() override;
~OswAppStepStats(){};

private:
void showStickChart();
void drawChart();
OswUI* ui;
};

#endif
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef OSW_APP_WATCHFACEBINARYA_H
#define OSW_APP_WATCHFACEBINARYA_H
#ifndef OSW_APP_WATCHFACE_BINARY_H
#define OSW_APP_WATCHFACE_BINARY_H

#include <osw_hal.h>
#include <osw_ui.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ class OswAppWatchfaceDigital : public OswApp {
virtual void loop() override;
virtual void stop() override;
~OswAppWatchfaceDigital(){};
inline static uint8_t getDateFormat(); // Return 0 : mm/dd/yyyy 1 : dd.mm.yyyy 2 : yy.mm/dd
static void drawSteps();
static void digitalWatch(short timeZone, uint8_t fontSize, uint8_t dateCoordY, uint8_t timeCoordY);
static void timeOutput(uint32_t hour, uint32_t minute, uint32_t second, bool showSecond = true);
static void dateOutput(uint32_t yearInt, uint32_t monthInt, uint32_t dayInt);

private:
uint8_t showDateFormat = 0; // 0 : mm/dd/yyyy 1 : dd.mm.yyyy 2 : yy.mm/dd
OswUI* ui;
};

Expand Down
26 changes: 26 additions & 0 deletions include/apps/watchfaces/OswAppWatchfaceDual.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#ifndef OSW_APP_WATCHFACE_DUAL_H
#define OSW_APP_WATCHFACE_DUAL_H

#include <osw_hal.h>
#include <osw_ui.h>

#include "osw_app.h"

class OswAppWatchfaceDual : public OswApp {
public:
OswAppWatchfaceDual(void) { ui = OswUI::getInstance(); };
virtual void setup() override;
virtual void loop() override;
virtual void stop() override;
~OswAppWatchfaceDual(){};
//for dual-time

static void drawProgressBar(OswUI* ui,uint8_t cx, uint8_t cy, uint8_t jump, uint8_t length, uint8_t value,float angle, uint8_t radius, uint16_t color, int* goal=nullptr);
void drawAnim();

private:
OswUI* ui;
// Blank to make the 2 clocks easier to recognize
};

#endif
24 changes: 24 additions & 0 deletions include/apps/watchfaces/OswAppWatchfaceFitness.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#ifndef OSW_APP_WATCHFACE_FITNESS_H
#define OSW_APP_WATCHFACE_FITNESS_H

#include <osw_hal.h>
#include <osw_ui.h>

#include "osw_app.h"

class OswAppWatchfaceFitness : public OswApp {
public:
OswAppWatchfaceFitness(void) { ui = OswUI::getInstance(); };
virtual void setup() override;
virtual void loop() override;
virtual void stop() override;
~OswAppWatchfaceFitness(){};
static float calculateDistance(uint32_t steps);
static uint32_t calculateKcalorie(uint32_t steps);

private:
void showFitnessTracking();
OswUI* ui;
};

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ class OswAppWatchfaceMix : public OswApp {
virtual void stop() override;
~OswAppWatchfaceMix(){};

void dateDisplay();
void digitalWatchDisplay();

private:
uint8_t showDateFormat = 0; // 0 : mm/dd/yyyy 1 : dd.mm.yyyy 2 : yy.mm/dd
void analogWatchDisplay(); //thin
OswUI* ui;
};

Expand Down
22 changes: 22 additions & 0 deletions include/locales/cs-CZ.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,28 @@
// App: Watchface Binary
#define LANG_WATCHFACE_BINARY_STEPS "steps"

// App: Watchface Fitness
#define LANG_WATCHFACE_FITNESS_DISTANCE "Dist"
#define LANG_WATCHFACE_FITNESS_STEP "Step"

// App: Step Statistics
#define LANG_STEPSTATS_TITLE "Steps stats"
#define LANG_STEPSTATS_TODAY "Today"
#define LANG_STEPSTATS_TOTAL "Total"
#define LANG_STEPSTATS_STEP "Step"

// App: Fitness Statistics
#define LANG_FITNESS_TITLE "Fitness stats"
#define LANG_FITNESS_STEP "Step"
#define LANG_FITNESS_DISTANCE "Distance"
#define LANG_FITNESS_TOTAL "Total"

// App: Kcal Statistics
#define LANG_KCAL_TITLE "Kcal stats"
#define LANG_KCAL_AVG "Avg"
#define LANG_KCAL_TODAY "Today"
#define LANG_KCAL_STEP "Step"

// Weekdays
#define LANG_MONDAY "Pondeli"
#define LANG_TUESDAY "Utery"
Expand Down
22 changes: 22 additions & 0 deletions include/locales/de-DE.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,28 @@
// App: Watchface Binary
#define LANG_WATCHFACE_BINARY_STEPS "Schritte"

// App: Watchface Fitness
#define LANG_WATCHFACE_FITNESS_DISTANCE "Distanz"
#define LANG_WATCHFACE_FITNESS_STEP "Schritte"

// App: Step Statistics
#define LANG_STEPSTATS_TITLE "Schritt-Statistik"
#define LANG_STEPSTATS_TODAY "Heute"
#define LANG_STEPSTATS_TOTAL "Insgesamt"
#define LANG_STEPSTATS_STEP "Schritte"

// App: Fitness Statistics
#define LANG_FITNESS_TITLE "Fitness-Statistik"
#define LANG_FITNESS_STEP "Schritte"
#define LANG_FITNESS_DISTANCE "Distanz"
#define LANG_FITNESS_TOTAL "Insgesamt"

// App: Kcal Statistics
#define LANG_KCAL_TITLE "Kcal-Statistik"
#define LANG_KCAL_AVG "AVG"
#define LANG_KCAL_TODAY "Heute"
#define LANG_KCAL_STEP "Schritte"

// Weekdays
#define LANG_MONDAY "Montag"
#define LANG_TUESDAY "Dienstag"
Expand Down
22 changes: 22 additions & 0 deletions include/locales/en-US.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,28 @@
// App: Watchface Binary
#define LANG_WATCHFACE_BINARY_STEPS "steps"

// App: Watchface Fitness
#define LANG_WATCHFACE_FITNESS_DISTANCE "Dist"
#define LANG_WATCHFACE_FITNESS_STEP "Step"

// App: Step Statistics
#define LANG_STEPSTATS_TITLE "Steps stats"
#define LANG_STEPSTATS_TODAY "Today"
#define LANG_STEPSTATS_TOTAL "Total"
#define LANG_STEPSTATS_STEP "Step"

// App: Fitness Statistics
#define LANG_FITNESS_TITLE "Fitness stats"
#define LANG_FITNESS_STEP "Step"
#define LANG_FITNESS_DISTANCE "Distance"
#define LANG_FITNESS_TOTAL "Total"

// App: Kcal Statistics
#define LANG_KCAL_TITLE "Kcal stats"
#define LANG_KCAL_AVG "Avg"
#define LANG_KCAL_TODAY "Today"
#define LANG_KCAL_STEP "Step"

// Weekdays
#define LANG_MONDAY "Monday"
#define LANG_TUESDAY "Tuesday"
Expand Down
22 changes: 22 additions & 0 deletions include/locales/fr-FR.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,28 @@
// App: Watchface Binary
#define LANG_WATCHFACE_BINARY_STEPS "steps"

// App: Watchface Fitness
#define LANG_WATCHFACE_FITNESS_DISTANCE "Dist"
#define LANG_WATCHFACE_FITNESS_STEP "Step"

// App: Step Statistics
#define LANG_STEPSTATS_TITLE "Steps stats"
#define LANG_STEPSTATS_TODAY "Today"
#define LANG_STEPSTATS_TOTAL "Total"
#define LANG_STEPSTATS_STEP "Step"

// App: Fitness Statistics
#define LANG_FITNESS_TITLE "Fitness stats"
#define LANG_FITNESS_STEP "Step"
#define LANG_FITNESS_DISTANCE "Distance"
#define LANG_FITNESS_TOTAL "Total"

// App: Kcal Statistics
#define LANG_KCAL_TITLE "Kcal stats"
#define LANG_KCAL_AVG "Avg"
#define LANG_KCAL_TODAY "Today"
#define LANG_KCAL_STEP "Step"

// Weekdays
#define LANG_MONDAY "Lundi"
#define LANG_TUESDAY "Mardi"
Expand Down
22 changes: 22 additions & 0 deletions include/locales/hu-HU.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,28 @@
// App: Watchface Binary
#define LANG_WATCHFACE_BINARY_STEPS "steps"

// App: Watchface Fitness
#define LANG_WATCHFACE_FITNESS_DISTANCE "Dist"
#define LANG_WATCHFACE_FITNESS_STEP "Step"

// App: Step Statistics
#define LANG_STEPSTATS_TITLE "Steps stats"
#define LANG_STEPSTATS_TODAY "Today"
#define LANG_STEPSTATS_TOTAL "Total"
#define LANG_STEPSTATS_STEP "Step"

// App: Fitness Statistics
#define LANG_FITNESS_TITLE "Fitness stats"
#define LANG_FITNESS_STEP "Step"
#define LANG_FITNESS_DISTANCE "Distance"
#define LANG_FITNESS_TOTAL "Total"

// App: Kcal Statistics
#define LANG_KCAL_TITLE "Kcal stats"
#define LANG_KCAL_AVG "Avg"
#define LANG_KCAL_TODAY "Today"
#define LANG_KCAL_STEP "Step"

// Weekdays
#define LANG_MONDAY "Hétfő"
#define LANG_TUESDAY "Kedd"
Expand Down
22 changes: 22 additions & 0 deletions include/locales/it-IT.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,28 @@
// App: Watchface Binary
#define LANG_WATCHFACE_BINARY_STEPS "steps"

// App: Watchface Fitness
#define LANG_WATCHFACE_FITNESS_DISTANCE "Dist"
#define LANG_WATCHFACE_FITNESS_STEP "Step"

// App: Step Statistics
#define LANG_STEPSTATS_TITLE "Steps stats"
#define LANG_STEPSTATS_TODAY "Today"
#define LANG_STEPSTATS_TOTAL "Total"
#define LANG_STEPSTATS_STEP "Step"

// App: Fitness Statistics
#define LANG_FITNESS_TITLE "Fitness stats"
#define LANG_FITNESS_STEP "Step"
#define LANG_FITNESS_DISTANCE "Distance"
#define LANG_FITNESS_TOTAL "Total"

// App: Kcal Statistics
#define LANG_KCAL_TITLE "Kcal stats"
#define LANG_KCAL_AVG "Avg"
#define LANG_KCAL_TODAY "Today"
#define LANG_KCAL_STEP "Step"

// Weekdays
#define LANG_MONDAY "Lunedì"
#define LANG_TUESDAY "Martedì"
Expand Down
22 changes: 22 additions & 0 deletions include/locales/ko-KR.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,28 @@
#define LANG_WATCHFACE_BINARY_STEPS "걸음"
#endif

// App: Watchface Fitness
#define LANG_WATCHFACE_FITNESS_DISTANCE "Dist"
#define LANG_WATCHFACE_FITNESS_STEP "Step"

// App: Step Statistics
#define LANG_STEPSTATS_TITLE "Steps stats"
#define LANG_STEPSTATS_TODAY "Today"
#define LANG_STEPSTATS_TOTAL "Total"
#define LANG_STEPSTATS_STEP "Step"

// App: Fitness Statistics
#define LANG_FITNESS_TITLE "Fitness stats"
#define LANG_FITNESS_STEP "Step"
#define LANG_FITNESS_DISTANCE "Distance"
#define LANG_FITNESS_TOTAL "Total"

// App: Kcal Statistics
#define LANG_KCAL_TITLE "Kcal stats"
#define LANG_KCAL_AVG "Avg"
#define LANG_KCAL_TODAY "Today"
#define LANG_KCAL_STEP "Step"

// Weekdays
#define LANG_MONDAY "월요일"
#define LANG_TUESDAY "화요일"
Expand Down
6 changes: 6 additions & 0 deletions include/osw_config_keys.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ extern OswConfigKeyShort settingDisplayTimeout;
extern OswConfigKeyShort settingDisplayBrightness;
extern OswConfigKeyBool settingDisplayOverlays;
extern OswConfigKeyBool settingDisplayOverlaysOnWatchScreen;
extern OswConfigKeyBool settingDisplayDualHourTick;
extern OswConfigKeyBool raiseToWakeEnabled;
extern OswConfigKeyShort raiseToWakeSensitivity;
extern OswConfigKeyBool tapToWakeEnabled;
Expand All @@ -54,9 +55,14 @@ extern OswConfigKeyDropDown dateFormat;
extern OswConfigKeyFloat daylightOffset;
extern OswConfigKeyBool timeFormat;
extern OswConfigKeyShort timeZone;
extern OswConfigKeyShort dualTimeZone;
extern OswConfigKeyShort resetDay;
#if OSW_PLATFORM_ENVIRONMENT_ACCELEROMETER == 1
extern OswConfigKeyShort configHeight;
extern OswConfigKeyShort configWeight;
extern OswConfigKeyInt stepsPerDay;
extern OswConfigKeyInt distPerDay;
extern OswConfigKeyInt kcalPerDay;
extern OswConfigKeyBool stepsHistoryClear;
extern OswConfigKeyBool settingDisplayStepsGoal;
#endif
Expand Down
Loading

0 comments on commit 9ff4d91

Please sign in to comment.