mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-10-22 15:11:51 +02:00
Compare commits
110 commits
65d2da7918
...
5c94702160
Author | SHA1 | Date | |
---|---|---|---|
5c94702160 | |||
de119b569e | |||
c71d64393b | |||
6f9df084d9 | |||
cdf86dab6a | |||
e16c8f8bab | |||
8598142c27 | |||
39241889be | |||
e2ca5393a6 | |||
a18190e37f | |||
9ff835bb89 | |||
b7b68f6362 | |||
e940593803 | |||
b7263ed795 | |||
5e19e042c0 | |||
6ce316dc06 | |||
59f9a5eaff | |||
2a762f62ad | |||
e4d6014d88 | |||
164a21218f | |||
8ed1d22a48 | |||
f42ef49a40 | |||
d78e60329e | |||
3133adaba9 | |||
3f214a2f84 | |||
6602a1d7c0 | |||
acbcd531b5 | |||
e2056f6420 | |||
5d261f579d | |||
f7333c66bd | |||
9437a8d125 | |||
5dfdec4ee2 | |||
7bab4a66aa | |||
055b9a93c4 | |||
e8b1b94507 | |||
dbc1dcfbdf | |||
d1c00370d1 | |||
99d223b4d1 | |||
ad19b9e798 | |||
bbbc9d9910 | |||
6cb3b6060e | |||
ee99e554f0 | |||
ad5a472b4b | |||
8929563950 | |||
d6a6bda6ba | |||
ecea195533 | |||
55866d4470 | |||
91fb716ea3 | |||
6494faa249 | |||
5cd1bcf460 | |||
b588241207 | |||
e8a1b12e17 | |||
194b061e19 | |||
8ca3888540 | |||
f366354e28 | |||
feb7631f45 | |||
b55c9d256c | |||
1246d77781 | |||
5c93cbd552 | |||
b8fe20b71a | |||
32dfaa82d6 | |||
cad3de46b0 | |||
7c8e5c2144 | |||
7e8a4d32ee | |||
1a379c80bf | |||
0d77cf9189 | |||
7739ecf900 | |||
e579b83201 | |||
2c9444d67a | |||
80b4da8197 | |||
c7a74adb13 | |||
db947fa97c | |||
cbc16cd683 | |||
a0c9b4d5fc | |||
d81356c8f7 | |||
13773a9b25 | |||
961c51083e | |||
48f182c25f | |||
10c470ef71 | |||
25e81b159b | |||
896f2011b2 | |||
3cfe46ec8f | |||
a6b932e608 | |||
a250fa45ec | |||
6475d6e624 | |||
ce13c721be | |||
5ac1e90040 | |||
9a377f6baf | |||
0ecfbee4b7 | |||
055b75d55d | |||
b8f7b65d84 | |||
b7a353cfb6 | |||
a4389f63fa | |||
ef59bed954 | |||
d2fab8d99a | |||
82e96cf8d7 | |||
1ec43e27de | |||
d7de641b8d | |||
b16e13f471 | |||
a5246941b0 | |||
edb61e7658 | |||
48cfd48e39 | |||
735083a042 | |||
1af813a2ef | |||
ab901b890b | |||
1162fdbf14 | |||
577dfd5b87 | |||
0535e93848 | |||
780e68f456 | |||
d0f776b44c |
13
.gitconfig
13
.gitconfig
|
@ -3,3 +3,16 @@
|
|||
autocrlf = input
|
||||
[apply]
|
||||
whitespace = fix
|
||||
|
||||
[diff]
|
||||
tool = meld
|
||||
[difftool]
|
||||
prompt = false
|
||||
[difftool "meld"]
|
||||
cmd = meld "$LOCAL" "$REMOTE"
|
||||
[merge]
|
||||
tool = meld
|
||||
[mergetool "meld"]
|
||||
# Choose one of these two lines (not both!) explained below.
|
||||
cmd = meld "$LOCAL" "$MERGED" "$REMOTE" --output "$MERGED"
|
||||
cmd = meld "$LOCAL" "$BASE" "$REMOTE" --output "$MERGED"
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -11,7 +11,7 @@ cmake_install.cmake
|
|||
Makefile
|
||||
build
|
||||
tools
|
||||
node_modules
|
||||
|
||||
|
||||
# Resulting binary files
|
||||
*.a
|
||||
|
|
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -4,9 +4,6 @@
|
|||
[submodule "src/libs/littlefs"]
|
||||
path = src/libs/littlefs
|
||||
url = https://github.com/littlefs-project/littlefs.git
|
||||
[submodule "src/libs/QCBOR"]
|
||||
path = src/libs/QCBOR
|
||||
url = https://github.com/laurencelundblade/QCBOR.git
|
||||
[submodule "src/libs/arduinoFFT"]
|
||||
path = src/libs/arduinoFFT
|
||||
url = https://github.com/kosme/arduinoFFT.git
|
||||
|
|
35
README.md
35
README.md
|
@ -1,9 +1,41 @@
|
|||
# [InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime)
|
||||
# [InfiniTime](https://github.com/Eve1374/InfiniTime)
|
||||
|
||||
![InfiniTime logo](doc/logo/infinitime-logo-small.jpg "InfiniTime Logo")
|
||||
|
||||
Fast open-source firmware for the [PineTime smartwatch](https://pine64.org/devices/pinetime/) with many features, written in modern C++.
|
||||
|
||||
## Quick notes on this InfiniTime version
|
||||
|
||||
- I copied the source code from this git repo : [InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime)
|
||||
- I added a watch face "WatchFaceMeow" whose main features are to be pink and have info about the alarm status
|
||||
- I stored the compile commands in scripts compile.sh to run from InfiniTime/ folder, and make_pine_mcu.sh to build the image must be run from InfiniTime/build/ (compile.sh copies make_pine_mcu.sh to build/
|
||||
- The file to flash to the pinetime is InfiniTime/build/pinetime-mcuboot-app-dfu-1.14.0.zip : I didn't change the version compared to the one I downloaded from [InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime) so make sure not to keep keep a copy of it
|
||||
|
||||
Here are pictures with and without alarm set :
|
||||
|
||||
|
||||
Original repo : [InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime)
|
||||
|
||||
- [Getting started with InfiniTime](doc/gettingStarted/gettingStarted-1.0.md)
|
||||
- [Updating the software](doc/gettingStarted/updating-software.md)
|
||||
- [About the firmware and bootloader](doc/gettingStarted/about-software.md)
|
||||
- [Available apps](doc/gettingStarted/Applications.md)
|
||||
- [Available watch faces](/doc/gettingStarted/Watchfaces.md)
|
||||
- [PineTimeStyle Watch face](https://pine64.org/documentation/PineTime/Watchfaces/PineTimeStyle)
|
||||
- [Weather integration](https://pine64.org/documentation/PineTime/Software/InfiniTime_weather/)
|
||||
|
||||
## Welcome to my InfiniTime fork ?!
|
||||
|
||||
Branches :
|
||||
|
||||
- main : shows this doc
|
||||
- alarm-status-on-infineat : shows the alarm status on infineat, can be enabled or disabled from the settigns menu that is updated accordingly :
|
||||
|
||||
![Infineat settings](doc/ui/infineat_settings.png "Infineat settings")
|
||||
|
||||
- my-custom-infinitime : branch were I put things that I want for myself, like a watchface with paw instead of shoe icon for steps counter :
|
||||
|
||||
|
||||
## New to InfiniTime?
|
||||
|
||||
- [Getting started with InfiniTime](doc/gettingStarted/gettingStarted-1.0.md)
|
||||
|
@ -88,3 +120,4 @@ Here are some people I would like to highlight:
|
|||
- [Atc1441](https://github.com/atc1441/): He works on an Arduino based firmware for the Pinetime and many other smartwatches based on similar hardware. He was of great help when I was implementing support for the BMA421 motion sensor and I²C driver.
|
||||
- [Koen](https://github.com/bosmoment): He’s working on a firmware based on RiotOS. He integrated similar libs as me: NimBLE, LittleVGL,… His help was invaluable too!
|
||||
- [Lup Yuen Lee](https://github.com/lupyuen): He is everywhere: he works on a Rust firmware, builds a MCUBoot based bootloader for the Pinetime, designs a Flutter based companion app for smartphones and writes a lot of articles about the Pinetime!
|
||||
>>>>>>>>> Temporary merge branch 2
|
||||
|
|
8
compile.sh
Executable file
8
compile.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
rm -r build
|
||||
|
||||
cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=/home/eve/Work/gcc-arm-none-eabi-10.3-2021.10 -DNRF5_SDK_PATH=/home/eve/Work/nRF5_SDK_17.1.0_ddde560 -DTARGET_DEVICE=PINETIME -DBUILD_DFU=1 -DBUILD_RESOURCES=1 -B build -DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
cp make_pine_mcu.sh build/
|
||||
|
BIN
doc/lvgl_align.png
Normal file
BIN
doc/lvgl_align.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
BIN
doc/palettes.xcf
Normal file
BIN
doc/palettes.xcf
Normal file
Binary file not shown.
BIN
doc/ui/infineat_settings.png
Normal file
BIN
doc/ui/infineat_settings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.5 KiB |
BIN
doc/ui/meow_alarmnotset.png
Normal file
BIN
doc/ui/meow_alarmnotset.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
BIN
doc/ui/meow_alarmset.png
Normal file
BIN
doc/ui/meow_alarmset.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6 KiB |
BIN
draft_pictures/cat.png
Normal file
BIN
draft_pictures/cat.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.8 KiB |
BIN
draft_pictures/cat.xcf
Normal file
BIN
draft_pictures/cat.xcf
Normal file
Binary file not shown.
BIN
draft_pictures/cat_clean.xcf
Normal file
BIN
draft_pictures/cat_clean.xcf
Normal file
Binary file not shown.
BIN
draft_pictures/cat_small.xcf
Normal file
BIN
draft_pictures/cat_small.xcf
Normal file
Binary file not shown.
BIN
draft_pictures/coordinates.xcf
Normal file
BIN
draft_pictures/coordinates.xcf
Normal file
Binary file not shown.
6
make_pine.sh
Executable file
6
make_pine.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
#cp ./displayapp/apps/Apps.h ../src/displayapp/apps/Apps.h
|
||||
|
||||
make -j4 pinetime-app
|
||||
|
6
make_pine_mcu.sh
Executable file
6
make_pine_mcu.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
#cp ./displayapp/apps/Apps.h ../src/displayapp/apps/Apps.h
|
||||
|
||||
make clean -j4 pinetime-mcuboot-app
|
||||
|
183
package-lock.json
generated
183
package-lock.json
generated
|
@ -1,183 +0,0 @@
|
|||
{
|
||||
"name": "InfiniTime",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"lv_font_conv": "^1.5.2"
|
||||
}
|
||||
},
|
||||
"node_modules/lv_font_conv": {
|
||||
"version": "1.5.2",
|
||||
"resolved": "https://registry.npmjs.org/lv_font_conv/-/lv_font_conv-1.5.2.tgz",
|
||||
"integrity": "sha512-0UapRSTkVP/pnB8Z4r2HDHx5p2dJx/xUG1+14u/WXo59mwuC7BahR+Bnx/66jKoDrG1wFQwn9ZzoyMxRHOD9bg==",
|
||||
"bundleDependencies": [
|
||||
"argparse",
|
||||
"bit-buffer",
|
||||
"debug",
|
||||
"make-error",
|
||||
"mkdirp",
|
||||
"opentype.js",
|
||||
"pngjs"
|
||||
],
|
||||
"dependencies": {
|
||||
"argparse": "^2.0.0",
|
||||
"bit-buffer": "^0.2.5",
|
||||
"debug": "^4.1.1",
|
||||
"make-error": "^1.3.5",
|
||||
"mkdirp": "^1.0.4",
|
||||
"opentype.js": "^1.1.0",
|
||||
"pngjs": "^6.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"lv_font_conv": "lv_font_conv.js"
|
||||
}
|
||||
},
|
||||
"node_modules/lv_font_conv/node_modules/argparse": {
|
||||
"version": "2.0.1",
|
||||
"inBundle": true,
|
||||
"license": "Python-2.0"
|
||||
},
|
||||
"node_modules/lv_font_conv/node_modules/bit-buffer": {
|
||||
"version": "0.2.5",
|
||||
"inBundle": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/lv_font_conv/node_modules/debug": {
|
||||
"version": "4.3.1",
|
||||
"inBundle": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/lv_font_conv/node_modules/make-error": {
|
||||
"version": "1.3.6",
|
||||
"inBundle": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/lv_font_conv/node_modules/mkdirp": {
|
||||
"version": "1.0.4",
|
||||
"inBundle": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"mkdirp": "bin/cmd.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/lv_font_conv/node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"inBundle": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/lv_font_conv/node_modules/opentype.js": {
|
||||
"version": "1.3.3",
|
||||
"inBundle": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"string.prototype.codepointat": "^0.2.1",
|
||||
"tiny-inflate": "^1.0.3"
|
||||
},
|
||||
"bin": {
|
||||
"ot": "bin/ot"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/lv_font_conv/node_modules/pngjs": {
|
||||
"version": "6.0.0",
|
||||
"inBundle": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/lv_font_conv/node_modules/string.prototype.codepointat": {
|
||||
"version": "0.2.1",
|
||||
"inBundle": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/lv_font_conv/node_modules/tiny-inflate": {
|
||||
"version": "1.0.3",
|
||||
"inBundle": true,
|
||||
"license": "MIT"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"lv_font_conv": {
|
||||
"version": "1.5.2",
|
||||
"resolved": "https://registry.npmjs.org/lv_font_conv/-/lv_font_conv-1.5.2.tgz",
|
||||
"integrity": "sha512-0UapRSTkVP/pnB8Z4r2HDHx5p2dJx/xUG1+14u/WXo59mwuC7BahR+Bnx/66jKoDrG1wFQwn9ZzoyMxRHOD9bg==",
|
||||
"requires": {
|
||||
"argparse": "^2.0.0",
|
||||
"bit-buffer": "^0.2.5",
|
||||
"debug": "^4.1.1",
|
||||
"make-error": "^1.3.5",
|
||||
"mkdirp": "^1.0.4",
|
||||
"opentype.js": "^1.1.0",
|
||||
"pngjs": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"argparse": {
|
||||
"version": "2.0.1",
|
||||
"bundled": true
|
||||
},
|
||||
"bit-buffer": {
|
||||
"version": "0.2.5",
|
||||
"bundled": true
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.1",
|
||||
"bundled": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
}
|
||||
},
|
||||
"make-error": {
|
||||
"version": "1.3.6",
|
||||
"bundled": true
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "1.0.4",
|
||||
"bundled": true
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.2",
|
||||
"bundled": true
|
||||
},
|
||||
"opentype.js": {
|
||||
"version": "1.3.3",
|
||||
"bundled": true,
|
||||
"requires": {
|
||||
"string.prototype.codepointat": "^0.2.1",
|
||||
"tiny-inflate": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"pngjs": {
|
||||
"version": "6.0.0",
|
||||
"bundled": true
|
||||
},
|
||||
"string.prototype.codepointat": {
|
||||
"version": "0.2.1",
|
||||
"bundled": true
|
||||
},
|
||||
"tiny-inflate": {
|
||||
"version": "1.0.3",
|
||||
"bundled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"lv_font_conv": "^1.5.2"
|
||||
}
|
||||
}
|
|
@ -371,7 +371,7 @@ list(APPEND SOURCE_FILES
|
|||
displayapp/screens/StopWatch.cpp
|
||||
displayapp/screens/BatteryIcon.cpp
|
||||
displayapp/screens/BleIcon.cpp
|
||||
displayapp/screens/AlarmIcon.cpp
|
||||
displayapp/screens/AlarmIcon.cpp
|
||||
displayapp/screens/NotificationIcon.cpp
|
||||
displayapp/screens/SystemInfo.cpp
|
||||
displayapp/screens/Label.cpp
|
||||
|
|
|
@ -135,6 +135,7 @@ namespace Pinetime {
|
|||
return settings.watchFaceInfineat.showAlarmStatus;
|
||||
};
|
||||
|
||||
|
||||
void SetInfineatColorIndex(int index) {
|
||||
if (index != settings.watchFaceInfineat.colorIndex) {
|
||||
settings.watchFaceInfineat.colorIndex = index;
|
||||
|
|
|
@ -8,6 +8,7 @@ namespace Colors {
|
|||
static constexpr lv_color_t green = LV_COLOR_MAKE(0x0, 0xb0, 0x0);
|
||||
static constexpr lv_color_t blue = LV_COLOR_MAKE(0x0, 0x50, 0xff);
|
||||
static constexpr lv_color_t lightGray = LV_COLOR_MAKE(0xb0, 0xb0, 0xb0);
|
||||
static constexpr lv_color_t gray = LV_COLOR_MAKE(0x50, 0x50, 0x50);
|
||||
|
||||
static constexpr lv_color_t bg = LV_COLOR_MAKE(0x5d, 0x69, 0x7e);
|
||||
static constexpr lv_color_t bgAlt = LV_COLOR_MAKE(0x38, 0x38, 0x38);
|
||||
|
|
|
@ -23,6 +23,7 @@ namespace Pinetime {
|
|||
Twos,
|
||||
HeartRate,
|
||||
Navigation,
|
||||
Calendar,
|
||||
StopWatch,
|
||||
Metronome,
|
||||
Motion,
|
||||
|
@ -51,6 +52,7 @@ namespace Pinetime {
|
|||
PineTimeStyle,
|
||||
Terminal,
|
||||
Infineat,
|
||||
Meow,
|
||||
CasioStyleG7710,
|
||||
};
|
||||
|
||||
|
|
10
src/displayapp/screens/README.md
Normal file
10
src/displayapp/screens/README.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Add a new watchface :
|
||||
## Modify the following files with the names of your source files :
|
||||
|
||||
- /src/displayapp/apps/Apps.h.in
|
||||
- /src/components/settings/Settings.h
|
||||
- /src/displayapp/UserApps.h
|
||||
- /src/displayapp/apps/CMakeLists.txt
|
||||
- CMakelists.txt
|
||||
|
||||
|
|
@ -4,10 +4,12 @@
|
|||
#include <cstdio>
|
||||
#include "displayapp/screens/BatteryIcon.h"
|
||||
#include "displayapp/screens/BleIcon.h"
|
||||
#include "displayapp/screens/AlarmIcon.h"
|
||||
#include "displayapp/screens/NotificationIcon.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
#include "components/battery/BatteryController.h"
|
||||
#include "components/ble/BleController.h"
|
||||
#include "components/alarm/AlarmController.h"
|
||||
#include "components/ble/NotificationManager.h"
|
||||
#include "components/heartrate/HeartRateController.h"
|
||||
#include "components/motion/MotionController.h"
|
||||
|
@ -17,6 +19,7 @@ using namespace Pinetime::Applications::Screens;
|
|||
WatchFaceCasioStyleG7710::WatchFaceCasioStyleG7710(Controllers::DateTime& dateTimeController,
|
||||
const Controllers::Battery& batteryController,
|
||||
const Controllers::Ble& bleController,
|
||||
Controllers::AlarmController& alarmController,
|
||||
Controllers::NotificationManager& notificatioManager,
|
||||
Controllers::Settings& settingsController,
|
||||
Controllers::HeartRateController& heartRateController,
|
||||
|
@ -27,6 +30,7 @@ WatchFaceCasioStyleG7710::WatchFaceCasioStyleG7710(Controllers::DateTime& dateTi
|
|||
dateTimeController {dateTimeController},
|
||||
batteryController {batteryController},
|
||||
bleController {bleController},
|
||||
alarmController {alarmController},
|
||||
notificatioManager {notificatioManager},
|
||||
settingsController {settingsController},
|
||||
heartRateController {heartRateController},
|
||||
|
@ -168,6 +172,23 @@ WatchFaceCasioStyleG7710::WatchFaceCasioStyleG7710(Controllers::DateTime& dateTi
|
|||
lv_label_set_text_static(stepIcon, Symbols::shoe);
|
||||
lv_obj_align(stepIcon, stepValue, LV_ALIGN_OUT_LEFT_MID, -5, 0);
|
||||
|
||||
alarmIcon = lv_label_create(lv_scr_act(), nullptr);
|
||||
lv_obj_set_style_local_text_color(alarmIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, color_text);
|
||||
lv_label_set_text_static(alarmIcon, Symbols::notbell);
|
||||
lv_obj_align(alarmIcon, lv_scr_act(), LV_ALIGN_IN_BOTTOM_LEFT, 5, -2);
|
||||
|
||||
labelAlarm = lv_label_create(lv_scr_act(), nullptr);
|
||||
lv_obj_set_style_local_text_color(labelAlarm, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, color_text);
|
||||
// lv_obj_set_style_local_text_font(labelAlarm, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_teko);
|
||||
lv_obj_align(labelAlarm, alarmIcon, LV_ALIGN_OUT_RIGHT_MID, 3, 0);
|
||||
lv_label_set_text_static(labelAlarm, "00:00");
|
||||
|
||||
labelTimeAmPmAlarm = lv_label_create(lv_scr_act(), nullptr);
|
||||
// lv_obj_set_style_local_text_font(labelTimeAmPmAlarm, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_teko);
|
||||
lv_label_set_text_static(labelTimeAmPmAlarm, "");
|
||||
lv_obj_set_style_local_text_color(labelTimeAmPmAlarm, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, color_text);
|
||||
lv_obj_align(labelTimeAmPmAlarm, labelAlarm, LV_ALIGN_OUT_RIGHT_MID, 3, 0);
|
||||
|
||||
taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this);
|
||||
Refresh();
|
||||
}
|
||||
|
@ -310,8 +331,6 @@ void WatchFaceCasioStyleG7710::Refresh() {
|
|||
lv_obj_realign(stepValue);
|
||||
lv_obj_realign(stepIcon);
|
||||
}
|
||||
}
|
||||
|
||||
bool WatchFaceCasioStyleG7710::IsAvailable(Pinetime::Controllers::FS& filesystem) {
|
||||
lfs_file file = {};
|
||||
|
||||
|
|
|
@ -253,7 +253,7 @@ WatchFaceInfineat::WatchFaceInfineat(Controllers::DateTime& dateTimeController,
|
|||
lv_label_set_text_static(alarmIcon, Symbols::notbell);
|
||||
lv_obj_align(alarmIcon, labelAlarm, LV_ALIGN_OUT_LEFT_MID, -3, 0);
|
||||
|
||||
// don't show the icons jsut set if we don't show alarm status
|
||||
// don't show the icons just set if we don't show alarm status
|
||||
if (!settingsController.GetInfineatShowAlarmStatus()) {
|
||||
lv_obj_set_hidden(labelAlarm, true);
|
||||
lv_obj_set_hidden(alarmIcon, true);
|
||||
|
@ -509,11 +509,11 @@ void WatchFaceInfineat::Refresh() {
|
|||
}
|
||||
|
||||
if (settingsController.GetInfineatShowAlarmStatus()) {
|
||||
alarmState = alarmController.State()==Pinetime::Controllers::AlarmController::AlarmState::Set;
|
||||
isAlarmSet = alarmController.IsEnabled()==true;
|
||||
// sets the icon as bell or barred bell
|
||||
lv_label_set_text_static(alarmIcon, AlarmIcon::GetIcon(alarmState));
|
||||
lv_label_set_text_static(alarmIcon, AlarmIcon::GetIcon(isAlarmSet.Get()));
|
||||
//displays the time of the alarm or nothing if the alarm is not set
|
||||
if (alarmState) {
|
||||
if (isAlarmSet.Get()) {
|
||||
uint8_t alarmHours = alarmController.Hours();
|
||||
uint8_t alarmMinutes = alarmController.Minutes();
|
||||
//handles the am pm format.
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace Pinetime {
|
|||
Utility::DirtyValue<bool> isCharging {};
|
||||
Utility::DirtyValue<bool> bleState {};
|
||||
Utility::DirtyValue<bool> bleRadioEnabled {};
|
||||
bool alarmState {};
|
||||
Utility::DirtyValue<bool> isAlarmSet{};
|
||||
Utility::DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::minutes>> currentDateTime {};
|
||||
Utility::DirtyValue<uint32_t> stepCount {};
|
||||
Utility::DirtyValue<bool> notificationState {};
|
||||
|
@ -102,8 +102,6 @@ namespace Pinetime {
|
|||
void SetBatteryLevel(uint8_t batteryPercent);
|
||||
void ToggleBatteryIndicatorColor(bool showSideCover);
|
||||
|
||||
void ToggleShowAlarmStatus(bool showAlarmStatus);
|
||||
|
||||
lv_task_t* taskRefresh;
|
||||
lv_font_t* font_teko = nullptr;
|
||||
lv_font_t* font_bebas = nullptr;
|
||||
|
|
11
src/displayapp/screens/addWatchface.md
Normal file
11
src/displayapp/screens/addWatchface.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Add a new watchface :
|
||||
## Modify the following files with the names of your source files :
|
||||
|
||||
- /src/displayapp/apps/Apps.h.in
|
||||
- /src/components/settings/Settings.h
|
||||
- /src/displayapp/screens/settings/SettingWatchFace.h
|
||||
- /src/displayapp/UserApps.h
|
||||
- /src/displayapp/apps/CMakeLists.txt
|
||||
- CMakelists.txt
|
||||
|
||||
|
|
@ -12,6 +12,8 @@
|
|||
#include "displayapp/screens/WatchFaceInfineat.h"
|
||||
#include "displayapp/screens/WatchFaceCasioStyleG7710.h"
|
||||
|
||||
|
||||
|
||||
namespace Pinetime {
|
||||
|
||||
namespace Applications {
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 56b17bf9f74096774944bcac0829adcd887d391e
|
|
@ -589,7 +589,7 @@ typedef void* lv_obj_user_data_t;
|
|||
/*Calendar (dependencies: -)*/
|
||||
#define LV_USE_CALENDAR 1
|
||||
#if LV_USE_CALENDAR
|
||||
#define LV_CALENDAR_WEEK_STARTS_MONDAY 0
|
||||
#define LV_CALENDAR_WEEK_STARTS_MONDAY 1
|
||||
#endif
|
||||
|
||||
/*Canvas (dependencies: lv_img)*/
|
||||
|
|
|
@ -1,11 +1,18 @@
|
|||
{
|
||||
"pine_small" : {
|
||||
"pine_small" : {
|
||||
"sources": "images/pine_logo.png",
|
||||
"color_format": "CF_TRUE_COLOR_ALPHA",
|
||||
"output_format": "bin",
|
||||
"binary_format": "ARGB8565_RBSWAP",
|
||||
"target_path": "/images/"
|
||||
},
|
||||
"cat_small" : {
|
||||
"sources": "images/cat_clean.png",
|
||||
"color_format": "CF_TRUE_COLOR_ALPHA",
|
||||
"output_format": "bin",
|
||||
"binary_format": "ARGB8565_RBSWAP",
|
||||
"target_path": "/images/"
|
||||
},
|
||||
"navigation0" : {
|
||||
"sources": "images/navigation0.png",
|
||||
"color_format": "CF_INDEXED_1_BIT",
|
||||
|
|
BIN
src/resources/images/cat_clean.png
Normal file
BIN
src/resources/images/cat_clean.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
Loading…
Reference in a new issue