more devices

This commit is contained in:
Gyuri Horák 2023-10-01 15:51:34 +02:00
parent 6f73f37eaa
commit 30d43d1fde
Signed by: dyuri
GPG Key ID: 4993F07B3EAE8D38
6 changed files with 61 additions and 3 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
/gen
/mir
/internal-mir
/export
RepaField.prg
RepaField.prg.debug.xml
RepaField-settings.json

53
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,53 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "monkeyc",
"request": "launch",
"name": "Run App - epix2",
"stopAtLaunch": false,
"device": "epix2"
},
{
"type": "monkeyc",
"request": "launch",
"name": "Run App - venu2",
"stopAtLaunch": false,
"device": "venu2"
},
{
"type": "monkeyc",
"request": "launch",
"name": "Run App - venu2plus",
"stopAtLaunch": false,
"device": "venu2plus"
},
{
"type": "monkeyc",
"request": "launch",
"name": "Run App - fr265",
"stopAtLaunch": false,
"device": "fr265"
},
{
"type": "monkeyc",
"request": "launch",
"name": "Run Tests",
"runTests": true,
"device": "${command:GetTargetDevice}"
},
{
"type": "monkeyc",
"request": "launch",
"name": "Run Complication Apps",
"stopAtLaunch": false,
"complicationSubscriberFolder": "${command:GetComplicationSubscriberFolder}",
"complicationPublisherFolder": "${command:GetComplicationPublisherFolder}",
"device": "${command:GetTargetDevice}"
}
]
}

View File

@ -4,6 +4,10 @@
<iq:application id="d0f125e7-b43a-46ab-927e-87396eda74a0" type="datafield" name="@Strings.AppName" entry="RepaFieldApp" launcherIcon="@Drawables.LauncherIcon" minApiLevel="4.2.0">
<iq:products>
<iq:product id="epix2"/>
<iq:product id="epix2pro47mm"/>
<!-- iq:product id="fr265"/ TODO resolution is OK, font sizes are big -->
<iq:product id="venu2"/>
<iq:product id="venu2plus"/>
</iq:products>
<iq:permissions>
<iq:uses-permission id="UserProfile"/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 KiB

After

Width:  |  Height:  |  Size: 310 KiB

View File

@ -1,5 +1,5 @@
<properties>
<property id="appVersion" type="string">0.8.0</property>
<property id="appVersion" type="string">1.0.0</property>
<property id="themeColor" type="string">0088FF</property>
<property id="themeColor2" type="string">0088FF</property>
<property id="themeColor3" type="string">FFFF00</property>

View File

@ -214,12 +214,12 @@ class RepaFieldView extends WatchUi.DataField {
} else {
timerState = Activity.TIMER_STATE_OFF;
}
if (info.distanceToDestination != null) {
if (info has :distanceToDestination && info.distanceToDestination != null) {
toDestination = info.distanceToDestination as Float;
} else {
toDestination = 0.0f;
}
if (info.offCourseDistance != null) {
if (info has :offCourseDistance && info.offCourseDistance != null) {
offCourse = info.offCourseDistance as Float;
} else {
offCourse = 0.0f;