Skip to content

Commit

Permalink
Fixed minimal (non-acceleration-sensor) build
Browse files Browse the repository at this point in the history
Signed-off-by: simonmicro <[email protected]>
  • Loading branch information
simonmicro committed Aug 11, 2024
1 parent a505f85 commit b88d2f8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions include/apps/watchfaces/OswAppWatchfaceFitnessAnalog.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#include <osw_ui.h>
#include <OswAppV2.h>

#if OSW_PLATFORM_ENVIRONMENT_ACCELEROMETER == 1

// if you want a cool background image, enable the following define
//#define GIF_BG

Expand Down Expand Up @@ -43,3 +45,4 @@ class OswAppWatchfaceFitnessAnalog : public OswAppV2 {
OswAppGifPlayer* bgGif = nullptr;
#endif
};
#endif
3 changes: 3 additions & 0 deletions src/apps/watchfaces/OswAppWatchfaceFitnessAnalog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#include "apps/watchfaces/OswAppWatchfaceDigital.h"
#include "apps/watchfaces/OswAppWatchface.h"

#if OSW_PLATFORM_ENVIRONMENT_ACCELEROMETER == 1

#ifdef GIF_BG
#include "./apps/_experiments/gif_player.h"
#endif
Expand Down Expand Up @@ -271,3 +273,4 @@ void OswAppWatchfaceFitnessAnalog::onStop() {
}
#endif
}
#endif
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ void setup() {
main_mainDrawer.registerAppLazy<OswAppWatchfaceDual>(LANG_WATCHFACES);
#if OSW_PLATFORM_ENVIRONMENT_ACCELEROMETER == 1
main_mainDrawer.registerAppLazy<OswAppWatchfaceFitness>(LANG_WATCHFACES);
main_mainDrawer.registerAppLazy<OswAppWatchfaceFitnessAnalog>(LANG_WATCHFACES);
#endif
main_mainDrawer.registerAppLazy<OswAppWatchfaceBinary>(LANG_WATCHFACES);
main_mainDrawer.registerAppLazy<OswAppWatchfaceMonotimer>(LANG_WATCHFACES);
main_mainDrawer.registerAppLazy<OswAppWatchfaceNumerals>(LANG_WATCHFACES);
main_mainDrawer.registerAppLazy<OswAppWatchfaceFitnessAnalog>(LANG_WATCHFACES);
try {
main_mainDrawer.startApp(OswConfigAllKeys::settingDisplayDefaultWatchface.get().c_str()); // if this id is invalid, the drawer will fall back to alternatives automatically
} catch(const std::runtime_error& e) {
Expand Down
4 changes: 2 additions & 2 deletions src/osw_config_keys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ OswConfigKeyDropDown settingDisplayDefaultWatchface("n", "Display", "Default Wat
OswAppWatchfaceDual::APP_ID,
#if OSW_PLATFORM_ENVIRONMENT_ACCELEROMETER == 1
OswAppWatchfaceFitness::APP_ID,
OswAppWatchfaceFitnessAnalog::APP_ID,
#endif
OswAppWatchfaceBinary::APP_ID,
OswAppWatchfaceMonotimer::APP_ID,
OswAppWatchfaceNumerals::APP_ID,
OswAppWatchfaceFitnessAnalog::APP_ID
OswAppWatchfaceNumerals::APP_ID
}, CONFIG_DEFAULT_WATCHFACE_ID);
OswConfigKeyBool settingDisplayDualHourTick("h2", "Display", "Display Dual-Time Hour Tick", "Show dual time hour tick", false);
#if OSW_PLATFORM_ENVIRONMENT_ACCELEROMETER == 1
Expand Down

0 comments on commit b88d2f8

Please sign in to comment.