Compare commits

...

12 Commits
1.0.4 ... main

Author SHA1 Message Date
Savely Savianok
5db5edcee3
Update README.md 2024-12-21 16:20:19 +03:00
Saveliy Savenok
2a92f8f752 chore: update version 2024-11-23 16:05:33 +03:00
Saveliy Savenok
4ff13c61f4 fix: fixed logos 2024-11-23 16:03:39 +03:00
Savely Savianok
1d764cbb94
Update README.md 2024-11-23 15:49:43 +03:00
Saveliy Savenok
6419e21387 feat: added week day support for english and russian language 2024-11-23 15:48:05 +03:00
Saveliy Savenok
36ac898508 feat: fixed distance render, added "km" mark 2024-11-23 14:52:15 +03:00
Савелий Савенок
32feab4483 refactor: removed dublicate type defenition 2024-10-27 19:09:13 +03:00
Савелий Савенок
8c3305685f fix(release): fixed info update on battery, heartrate and distance widget 2024-10-27 19:08:24 +03:00
Savely Savianok
8dccc528ba
Update README.md 2024-10-20 21:45:16 +03:00
Савелий Савенок
5167ecd8b4 Merge branch 'main' of https://github.com/Lisoveliy/VHS-watch 2024-10-20 21:42:00 +03:00
Савелий Савенок
2a620d7bb8 feat(release): v1.0.5 moved date under battery indicator 2024-10-20 21:41:58 +03:00
Savely Savianok
82a6eff1c5
chore: Update README.md 2024-10-20 03:46:02 +03:00
31 changed files with 101 additions and 81 deletions

View File

@ -3,14 +3,16 @@
Watchface with simple and useful design without any diverting factors
## Features
- AOD (Always on display)
- Heartbeat
- Date with current month and day
- Clocks with hours, minutes and **seconds**
- Battery percentage
- Distance
- Week days on english and russian (v1.1.0)
## How it looks like
![icon](https://github.com/user-attachments/assets/d4dc14c4-ddb9-4b09-b463-9fd47a19d637)
![image](https://github.com/user-attachments/assets/56231f4f-1002-4fb6-9ac3-c1f1ca5dc823)
<img src="https://github.com/user-attachments/assets/9158e9f6-2234-40ca-b5cf-727f86ff8767" height=200>
<img src="https://github.com/user-attachments/assets/2c77cb6f-9639-4c7f-8ef2-38d1e17ae81b" height=200>
<img src="https://github.com/user-attachments/assets/001d922b-54f2-489f-bd56-c071bdb9012a" height=200>

View File

@ -1,12 +1,12 @@
{
"configVersion": "v2",
"app": {
"appId": 24808,
"appId": 1065764,
"appName": "VHS Watch",
"appType": "watchface",
"version": {
"code": 1,
"name": "1.0.4"
"name": "1.1.1"
},
"icon": "icon.png",
"vender": "zepp",
@ -51,6 +51,9 @@
"i18n": {
"en-US": {
"appName": "VHS Watch"
},
"ru-RU": {
"appName": "VHS Watch"
}
},
"defaultLanguage": "en-US"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 801 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 889 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,6 +1,6 @@
{
"name": "vhs-watch",
"version": "1.0.4",
"version": "1.1.1",
"description": "vhs watch for Zepp OS 3.0 (GTS 4)",
"main": "app.js",
"scripts": {
@ -14,4 +14,4 @@
"dependencies": {
"@zeppos/zml": "^0.0.9"
}
}
}

View File

@ -9,4 +9,4 @@ export default [
'clk/7.PNG',
'clk/8.PNG',
'clk/9.PNG'
];
]

View File

@ -9,4 +9,4 @@ export default [
'date/7.PNG',
'date/8.PNG',
'date/9.PNG'
];
]

View File

@ -0,0 +1,19 @@
export const en = [
'week/WeekEn/Monday.PNG',
'week/WeekEn/Tuesday.PNG',
'week/WeekEn/Wednesday.PNG',
'week/WeekEn/Thursday.PNG',
'week/WeekEn/Friday.PNG',
'week/WeekEn/Saturday.PNG',
'week/WeekEn/Sunday.PNG'
]
export const ru = [
'week/WeekRu/Понедельник.PNG',
'week/WeekRu/Вторник.PNG',
'week/WeekRu/Среда.PNG',
'week/WeekRu/Четверг.PNG',
'week/WeekRu/Пятница.PNG',
'week/WeekRu/Суббота.PNG',
'week/WeekRu/Воскресенье.PNG'
]

View File

@ -3,6 +3,7 @@ import clockModule from "./modules/clock"
import dateModule from "./modules/date"
import distanceModule from "./modules/distance"
import heartRateModule from "./modules/heartRate"
import weekModule from "./modules/week"
WatchFace({
onInit() {
@ -11,6 +12,7 @@ WatchFace({
batteryModule()
heartRateModule()
distanceModule()
weekModule()
},
build() {

View File

@ -1,36 +1,24 @@
import { getScene, SCENE_AOD } from '@zos/app'
import * as hmSensor from '@zos/sensor'
import * as hmUI from '@zos/ui'
import fontArray from '../fontData/secondaryFont'
let batteryWg;
const moduleX = 310
const moduleY = 10
export default function () {
console.log("[modules]: battery module init")
let battery = new hmSensor.Battery()
updateBatteryWidget(battery.getCurrent())
battery.onChange(() => updateBatteryWidget(battery.getCurrent()))
if (getScene() != SCENE_AOD)
hmUI.createWidget(hmUI.widget.IMG, {
x: moduleX,
y: moduleY,
src: 'date/perc.PNG'
})
}
function updateBatteryWidget(batteryPercentage) {
if (batteryWg)
hmUI.deleteWidget(batteryWg)
if (getScene() != SCENE_AOD) {
batteryWg = hmUI.createWidget(hmUI.widget.TEXT_IMG, {
x: moduleX - 85,
y: moduleY,
type: hmUI.data_type.BATTERY,
font_array: fontArray,
h_space: 1,
align_h: hmUI.align.RIGHT,
text: batteryPercentage
})
}
console.log("[modules]: battery module init")
if (getScene() != SCENE_AOD) {
hmUI.createWidget(hmUI.widget.IMG, {
x: moduleX,
y: moduleY,
src: 'date/perc.PNG'
})
hmUI.createWidget(hmUI.widget.TEXT_IMG, {
x: moduleX - 85,
y: moduleY,
font_array: fontArray,
h_space: 1,
align_h: hmUI.align.RIGHT,
type: hmUI.data_type.BATTERY
})
}
}

View File

@ -1,7 +1,7 @@
import * as hmUI from '@zos/ui'
import fontArray from '../fontData/secondaryFont'
const moduleX = 50
const moduleY = 10
const moduleX = 225
const moduleY = 50
export default function () {
console.log("[modules]: date module init")

View File

@ -1,41 +1,30 @@
import { getScene, SCENE_AOD } from '@zos/app'
import * as hmSensor from '@zos/sensor'
import * as hmUI from '@zos/ui';
import secondaryFont from '../fontData/secondaryFont';
import * as hmUI from '@zos/ui'
import secondaryFont from '../fontData/secondaryFont'
let distWg;
const moduleX = 50
const moduleY = 405
export default function () {
console.log("[modules]: distance module init")
let distance = new hmSensor.Distance();
updateDistance(distance.getCurrent())
distance.onChange(() => updateDistance(distance.getCurrent()))
if (getScene() != SCENE_AOD) {
hmUI.createWidget(hmUI.widget.IMG, {
x: moduleX,
y: moduleY,
src: 'misc/dist.PNG'
})
}
}
function updateDistance(dist) {
if (!dist)
dist = 0
if (distWg)
hmUI.deleteWidget(distWg)
if (getScene() != SCENE_AOD) {
distWg = hmUI.createWidget(hmUI.widget.TEXT_IMG, {
x: moduleX + 150,
hmUI.createWidget(hmUI.widget.TEXT_IMG, {
x: moduleX + 145,
y: moduleY,
type: hmUI.data_type.DISTANCE,
font_array: secondaryFont,
h_space: 1,
align_h: hmUI.align.LEFT,
text: dist
type: hmUI.data_type.DISTANCE,
dot_image: "misc/altDot.PNG"
})
hmUI.createWidget(hmUI.widget.IMG, {
x: moduleX + 243,
y: moduleY,
src: "misc/km.PNG"
})
}
}

View File

@ -1,39 +1,22 @@
import { getScene, SCENE_AOD } from '@zos/app'
import * as hmSensor from '@zos/sensor'
import * as hmUI from '@zos/ui';
import secondaryFont from '../fontData/secondaryFont';
let heartRateWg;
export default function () {
console.log("[modules]: heartrate module init")
if (getScene() != SCENE_AOD) {
let heart = new hmSensor.HeartRate();
updateHeartWidget(heart.getLast())
heart.onCurrentChange(() => updateHeartWidget(heart.getCurrent()))
hmUI.createWidget(hmUI.widget.IMG, {
x: 10,
x: 20,
y: 365,
src: 'misc/hb.PNG'
})
}
}
function updateHeartWidget(hbpm) {
if (!hbpm) {
hbpm = 0
}
if (heartRateWg) {
hmUI.deleteWidget(heartRateWg)
}
if (getScene() != SCENE_AOD) {
heartRateWg = hmUI.createWidget(hmUI.widget.TEXT_IMG, {
x: 100,
hmUI.createWidget(hmUI.widget.TEXT_IMG, {
x: 105,
y: 365,
type: hmUI.data_type.BATTERY,
font_array: secondaryFont,
h_space: 1,
align_h: hmUI.align.LEFT,
text: hbpm
type: hmUI.data_type.HEART
})
}
}

34
watchface/modules/week.js Normal file
View File

@ -0,0 +1,34 @@
import { getScene, SCENE_AOD } from '@zos/app'
import * as hmSetting from '@zos/settings'
import * as hmUI from '@zos/ui'
import { ru, en } from '../fontData/weekData'
const moduleX = 225
const moduleY = 90
export default function () {
console.log("[modules]: week module init")
const language = hmSetting.getLanguage()
if (getScene() != SCENE_AOD) {
switch (language) {
case 4: //ru-RU
hmUI.createWidget(hmUI.widget.IMG_WEEK, {
x: moduleX,
y: moduleY,
week_en: ru,
week_tc: ru,
week_sc: ru
})
break;
default:
hmUI.createWidget(hmUI.widget.IMG_WEEK, {
x: moduleX,
y: moduleY,
week_en: en,
week_tc: en,
week_sc: en
})
break;
}
}
}