Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
K
kuri
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
3
Snippets
Groups
Projects
Show more breadcrumbs
Mathias »Bob« Kraus
kuri
Merge requests
!14
Draft: Pebble timeline support
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Draft: Pebble timeline support
rubdos/kuri:pebble-timeline
into
master
Overview
16
Commits
8
Pipelines
5
Changes
1
Open
Ruben De Smet
requested to merge
rubdos/kuri:pebble-timeline
into
master
8 months ago
Overview
16
Commits
8
Pipelines
5
Changes
1
Expand
Currently untested, because my
sfdk
is apparently broken. Will update!
0
0
Merge request reports
Viewing commit
969ac481
Prev
Next
Show latest version
1 file
+
19
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Verified
969ac481
More elaborate pin
· 969ac481
Ruben De Smet
authored
8 months ago
qml/components/PebbleManager.qml
+
19
−
4
Options
@@ -36,17 +36,32 @@ DBusInterface {
// Generate the pin JSON for the current activity.
function
createPin
()
{
var
distance
=
ActivityRecorder
.
distance
;
var
duration_formatted
=
ActivityRecorder
.
durationAsHoursMinutesSeconds
;
var
duration_formatted
=
ActivityRecorder
.
durationAsHoursMinutesSeconds
.
substring
(
0
,
ActivityRecorder
.
durationAsHoursMinutesSeconds
.
length
-
3
);
var
elevationUp
=
ActivityRecorder
.
elevationUp
;
var
elevationDown
=
ActivityRecorder
.
elevationDown
;
var
activityType
=
SharedResources
.
arrayLookupWorkoutTableByName
[
ActivityRecorder
.
activityType
];
var
pace
=
ActivityRecorder
.
paceAverage
;
var
activityName
=
SharedResources
.
arrayLookupWorkoutTableByName
[
ActivityRecorder
.
activityType
].
labeltext
;
var
body
=
qsTr
(
"
Pace
"
)
+
"
:
"
+
pace
+
"
"
+
qsTr
(
"
min/km
"
)
+
"
\n
"
;
if
(
elevationUp
>
5
||
elevationDown
>
5
)
{
body
+=
qsTr
(
"
Elevation 🠝
"
)
+
"
:
"
+
(
elevationUp
/
1000
).
toFixed
(
1
)
+
"
m
\n
"
;
body
+=
qsTr
(
"
Elevation 🠟
"
)
+
"
:
"
+
(
elevationDown
/
1000
).
toFixed
(
1
)
+
"
m
\n
"
;
}
body
+=
duration_formatted
;
var
layout
=
{
"
type
"
:
"
genericPin
"
,
"
title
"
:
activityName
,
"
subtitle
"
:
d
uration_formatted
,
"
body
"
:
distance
+
"
km
"
,
"
subtitle
"
:
d
istance
+
"
km
"
,
"
body
"
:
body
,
"
last_updated
"
:
new
Date
().
toISOString
(),
"
tiny_icon
"
:
"
system://images/TIMELINE_SPORTS
"
,
"
primaryColor
"
:
"
#FFFFFF
"
,
"
secondaryColor
"
:
"
#666666
"
,
"
backgroundColor
"
:
"
#5556FF
"
,
};
var
pin
=
{
"
id
"
:
activityId
,
Loading