From e668acd2871a2777e1002be3df502d3ced145586 Mon Sep 17 00:00:00 2001 From: Ruffalo-sunghwan Date: Wed, 15 Jun 2022 22:46:37 +0900 Subject: [PATCH 1/3] Modules : add Sunset and Sunrise libraries -See : https://github.com/buelowp/sunset -About issue : #207 --- .gitmodules | 3 +++ lib/sunset | 1 + 2 files changed, 4 insertions(+) create mode 160000 lib/sunset diff --git a/.gitmodules b/.gitmodules index 8f4161bd4..3102c4210 100644 --- a/.gitmodules +++ b/.gitmodules @@ -23,3 +23,6 @@ path = lib/LUA url = https://github.com/lua/lua.git branch = v5.3 +[submodule "lib/sunset"] + path = lib/sunset + url = https://github.com/buelowp/sunset diff --git a/lib/sunset b/lib/sunset new file mode 160000 index 000000000..653fe8889 --- /dev/null +++ b/lib/sunset @@ -0,0 +1 @@ +Subproject commit 653fe8889340f09c9e2d453abda80eecd7d5f1a6 From afc7686c1071d039ef9babb5832b20ec3c78480a Mon Sep 17 00:00:00 2001 From: Ruffalo-sunghwan Date: Wed, 15 Jun 2022 23:50:54 +0900 Subject: [PATCH 2/3] OSW-CONFIG : add lat, long coord key --- include/osw_config_keys.h | 2 ++ src/osw_config_keys.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/include/osw_config_keys.h b/include/osw_config_keys.h index 89e795dab..29a699b3c 100644 --- a/include/osw_config_keys.h +++ b/include/osw_config_keys.h @@ -57,6 +57,8 @@ extern OswConfigKeyBool timeFormat; extern OswConfigKeyShort timeZone; extern OswConfigKeyShort dualTimeZone; extern OswConfigKeyShort resetDay; +extern OswConfigKeyDouble latitudeCoord; +extern OswConfigKeyDouble longtitudeCoord; #if OSW_PLATFORM_ENVIRONMENT_ACCELEROMETER == 1 extern OswConfigKeyShort configHeight; extern OswConfigKeyShort configWeight; diff --git a/src/osw_config_keys.cpp b/src/osw_config_keys.cpp index 58b8150fd..4a0789930 100644 --- a/src/osw_config_keys.cpp +++ b/src/osw_config_keys.cpp @@ -66,6 +66,8 @@ OswConfigKeyShort timeZone("h", "Date & Time", "Timezone", "Number of offset hou OswConfigKeyShort dualTimeZone("h1", "Date & Time", "Dual-Timezone", "Number of offset Dual-hours (e.g. 9 = Seoul).", 0); OswConfigKeyShort resetDay("r", "Date & Time", "Day of the week", "Choose the day of the week to reset the number of steps (e.g. 1-7 are days, 0 is disabled).", 0); +OswConfigKeyDouble latitudeCoord("t1", "Date & Time", "Latitude for Sunset", "The coordinates of your location (e.g. 37.32103)", 37.78243); +OswConfigKeyDouble longtitudeCoord("t2", "Date & Time", "Longtitude for Sunset", "The coordinates of your location (e.g. 127.10901)", -122.39122); #if OSW_PLATFORM_ENVIRONMENT_ACCELEROMETER == 1 OswConfigKeyShort configHeight("f4", "Fitness", "User Height", "E.g 175.7 cm -> 175 (Rounds off)", 175); OswConfigKeyShort configWeight("f5", "Fitness", "User Weight", "E.g 70.3 kg -> 70 (Rounds off)", 70); @@ -100,6 +102,7 @@ OswConfigKey* oswConfigKeys[] = { // date + time &OswConfigAllKeys::dateFormat, &OswConfigAllKeys::daylightOffset, &OswConfigAllKeys::timeZone, &OswConfigAllKeys::dualTimeZone, &OswConfigAllKeys::timeFormat, &OswConfigAllKeys::resetDay, + &OswConfigAllKeys::latitudeCoord,&OswConfigAllKeys::longtitudeCoord, // colors &OswConfigAllKeys::themeBackgroundColor, &OswConfigAllKeys::themeBackgroundDimmedColor, &OswConfigAllKeys::themeForegroundColor, &OswConfigAllKeys::themeForegroundDimmedColor, From 4d9125883781aafa60f9b9ac46334209f02291e3 Mon Sep 17 00:00:00 2001 From: Ruffalo-sunghwan Date: Thu, 16 Jun 2022 00:00:19 +0900 Subject: [PATCH 3/3] OSW-CONFIG : update description --- src/osw_config_keys.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osw_config_keys.cpp b/src/osw_config_keys.cpp index 4a0789930..09980954a 100644 --- a/src/osw_config_keys.cpp +++ b/src/osw_config_keys.cpp @@ -66,8 +66,8 @@ OswConfigKeyShort timeZone("h", "Date & Time", "Timezone", "Number of offset hou OswConfigKeyShort dualTimeZone("h1", "Date & Time", "Dual-Timezone", "Number of offset Dual-hours (e.g. 9 = Seoul).", 0); OswConfigKeyShort resetDay("r", "Date & Time", "Day of the week", "Choose the day of the week to reset the number of steps (e.g. 1-7 are days, 0 is disabled).", 0); -OswConfigKeyDouble latitudeCoord("t1", "Date & Time", "Latitude for Sunset", "The coordinates of your location (e.g. 37.32103)", 37.78243); -OswConfigKeyDouble longtitudeCoord("t2", "Date & Time", "Longtitude for Sunset", "The coordinates of your location (e.g. 127.10901)", -122.39122); +OswConfigKeyDouble latitudeCoord("t1", "Date & Time", "Latitude for Sunset", "latitude of your location - to the 5th decimal place (e.g. 37.32103)", 37.78243); +OswConfigKeyDouble longtitudeCoord("t2", "Date & Time", "Longtitude for Sunset", "longtitude of your location - to the 5th decimal place (e.g. 127.10901)", -122.39122); #if OSW_PLATFORM_ENVIRONMENT_ACCELEROMETER == 1 OswConfigKeyShort configHeight("f4", "Fitness", "User Height", "E.g 175.7 cm -> 175 (Rounds off)", 175); OswConfigKeyShort configWeight("f5", "Fitness", "User Weight", "E.g 70.3 kg -> 70 (Rounds off)", 70);