Compare commits

...

6 Commits

Author SHA1 Message Date
6b2aa3135a Added support for 3 new devices (#237) 2025-05-27 06:37:19 +01:00
907848b5fb Added support for 3 new devices 2025-05-24 15:53:19 +01:00
5f34f870d9 Support for Vivoactive 6 device (#230)
This required an update to the SDK to version 8.1.0. The new SDK found
some new code warnings for unreachable code previously known to be
reached based on stricter type checking, so fixed in this commit too.
2025-04-25 07:59:58 +01:00
ada18f8323 Update export.cmd
'--api-level' command line switch removed from SDK 8.1.0
2025-04-24 22:38:10 +01:00
f74a3168de Update manifest.xml
The App ID should not have been changed from the test app.
2025-04-24 22:30:43 +01:00
7e58e5416d Support for Vivoactive 6 device
This required an update to the SDK to version 8.1.0. The new SDK found some new code warnings for unreachable code previously known to be reached based on stricter type checking, so fixed in this commit too.
2025-04-24 22:26:18 +01:00
7 changed files with 102 additions and 91 deletions

View File

@ -40,3 +40,5 @@
| 2.25 | 2 Bug fixes. First time startup issues caused by v2.24 change and a fix for pure numbers in returned templates. |
| 2.26 | Retry responsive menu fix failed in v2.24. Cosmetic internal class changes. |
| 2.27 | Trivial bug fix for the glance view to prevent the "Unconfigured" result being erroneously displayed because the settings were not yet pulled from persistent storage. |
| 2.28 | Added support for Vivoactive 6 device which also required an SDK update to 8.1.0. |
| 2.29 | Added support for three new devices, Forerunners 570 42mm & 47mm and 970. |

View File

@ -33,44 +33,49 @@ set DEVICE=venu2
set JUNGLE=monkey.jungle
rem C:\>java -jar %SDK_PATH%\monkeybrains.jar -h
rem usage: monkeyc [-a <arg>] [-b <arg>] [--build-stats <arg>] [-c <arg>] [-d <arg>]
rem [--debug-log-level <arg>] [--debug-log-output <arg>] [-e]
rem usage: monkeyc [-a <arg>] [-b <arg>] [--build-stats <arg>] [-d <arg>]
rem [--debug-log-level <arg>] [--debug-log-output <arg>]
rem [--disable-api-has-check-removal] [--disable-v2-opcodes] [-e]
rem [--Eno-invalid-symbol] [-f <arg>] [-g] [-h] [-i <arg>] [-k] [-l <arg>]
rem [-m <arg>] [--no-gen-styles] [-o <arg>] [-O <arg>] [-p <arg>] [-r] [-s
rem <arg>] [-t] [-u <arg>] [-v] [-w] [-x <arg>] [-y <arg>] [-z <arg>]
rem -a,--apidb <arg> API import file
rem -b,--apimir <arg> API MIR file
rem --build-stats <arg> Print build stats [0=basic]
rem -c,--api-level <arg> API Level to target
rem -d,--device <arg> Target device
rem --debug-log-level <arg> Debug logging verbosity [0=errors, 1=basic,
rem 2=intermediate, 3=verbose]
rem --debug-log-output <arg>Output log zip file
rem -e,--package-app Create an application package.
rem --Eno-invalid-symbol Do not error when a symbol is found to be invalid
rem -f,--jungles <arg> Jungle files
rem -g,--debug Print debug output
rem -h,--help Prints help information
rem -i,--import-dbg <arg> Import api.debug.xml
rem -k,--profile Enable profiling support
rem -l,--typecheck <arg> Type check [0=off, 1=gradual, 2=informative,
rem 3=strict]
rem -m,--manifest <arg> Manifest file (deprecated)
rem --no-gen-styles Do not generate Rez.Styles module
rem -o,--output <arg> Output file to create
rem -O,--optimization <arg> Optimization level [0=none, 1=basic, 2=fast
rem optimizations, 3=slow optimizations] [p=optimize
rem performance, z=optimize code space]
rem -p,--project-info <arg> projectInfo.xml file to use when compiling
rem -r,--release Strip debug information
rem -s,--sdk-version <arg> SDK version to target (deprecated, use -c
rem -t,--unit-test Enables compilation of unit tests
rem -u,--devices <arg> devices.xml file to use when compiling (deprecated)
rem -v,--version Prints the compiler version
rem -w,--warn Show compiler warnings
rem -x,--excludes <arg> Add annotations to the exclude list (deprecated)
rem -y,--private-key <arg> Private key to sign builds with
rem -z,--rez <arg> Resource files (deprecated)
rem [-m <arg>] [--no-gen-styles] [-o <arg>] [-O <arg>] [-p <arg>] [-r] [-t]
rem [-u <arg>] [-v] [-w] [-x <arg>] [-y <arg>] [-z <arg>]
rem -a,--apidb <arg> API import file
rem -b,--apimir <arg> API MIR file
rem --build-stats <arg> Print build stats [0=basic]
rem -d,--device <arg> Target device
rem --debug-log-level <arg> Debug logging verbosity [0=errors, 1=basic,
rem 2=intermediate, 3=verbose]
rem --debug-log-output <arg> Output log zip file
rem --disable-api-has-check-removalDo not optimize out API has checks
rem --disable-v2-opcodes Do not use the v2 opcodes
rem -e,--package-app Create an application package.
rem --Eno-invalid-symbol Do not error when a symbol is found to be
rem invalid
rem -f,--jungles <arg> Jungle files
rem -g,--debug Print debug output
rem -h,--help Prints help information
rem -i,--import-dbg <arg> Import api.debug.xml
rem -k,--profile Enable profiling support
rem -l,--typecheck <arg> Type check [0=off, 1=gradual, 2=informative,
rem 3=strict]
rem -m,--manifest <arg> Manifest file (deprecated)
rem --no-gen-styles Do not generate Rez.Styles module
rem -o,--output <arg> Output file to create
rem -O,--optimization <arg> Optimization level [0=none, 1=basic, 2=fast
rem optimizations, 3=slow optimizations]
rem [p=optimize performance, z=optimize code
rem space]
rem -p,--project-info <arg> projectInfo.xml file to use when compiling
rem -r,--release Strip debug information
rem -t,--unit-test Enables compilation of unit tests
rem -u,--devices <arg> devices.xml file to use when compiling
rem (deprecated)
rem -v,--version Prints the compiler version
rem -w,--warn Show compiler warnings
rem -x,--excludes <arg> Add annotations to the exclude list
rem (deprecated)
rem -y,--private-key <arg> Private key to sign builds with
rem -z,--rez <arg> Resource files (deprecated)
title Compiling for %DEVICE%

View File

@ -29,45 +29,49 @@ rem Assume we can create and use this directory
set DEST=export
set IQ=HomeAssistant-app.iq
rem C:\>java -jar %SDK_PATH%\monkeybrains.jar -h
rem usage: monkeyc [-a <arg>] [-b <arg>] [--build-stats <arg>] [-c <arg>] [-d <arg>]
rem [--debug-log-level <arg>] [--debug-log-output <arg>] [-e]
rem usage: monkeyc [-a <arg>] [-b <arg>] [--build-stats <arg>] [-d <arg>]
rem [--debug-log-level <arg>] [--debug-log-output <arg>]
rem [--disable-api-has-check-removal] [--disable-v2-opcodes] [-e]
rem [--Eno-invalid-symbol] [-f <arg>] [-g] [-h] [-i <arg>] [-k] [-l <arg>]
rem [-m <arg>] [--no-gen-styles] [-o <arg>] [-O <arg>] [-p <arg>] [-r] [-s
rem <arg>] [-t] [-u <arg>] [-v] [-w] [-x <arg>] [-y <arg>] [-z <arg>]
rem -a,--apidb <arg> API import file
rem -b,--apimir <arg> API MIR file
rem --build-stats <arg> Print build stats [0=basic]
rem -c,--api-level <arg> API Level to target
rem -d,--device <arg> Target device
rem --debug-log-level <arg> Debug logging verbosity [0=errors, 1=basic,
rem 2=intermediate, 3=verbose]
rem --debug-log-output <arg>Output log zip file
rem -e,--package-app Create an application package.
rem --Eno-invalid-symbol Do not error when a symbol is found to be invalid
rem -f,--jungles <arg> Jungle files
rem -g,--debug Print debug output
rem -h,--help Prints help information
rem -i,--import-dbg <arg> Import api.debug.xml
rem -k,--profile Enable profiling support
rem -l,--typecheck <arg> Type check [0=off, 1=gradual, 2=informative,
rem 3=strict]
rem -m,--manifest <arg> Manifest file (deprecated)
rem --no-gen-styles Do not generate Rez.Styles module
rem -o,--output <arg> Output file to create
rem -O,--optimization <arg> Optimization level [0=none, 1=basic, 2=fast
rem optimizations, 3=slow optimizations] [p=optimize
rem performance, z=optimize code space]
rem -p,--project-info <arg> projectInfo.xml file to use when compiling
rem -r,--release Strip debug information
rem -s,--sdk-version <arg> SDK version to target (deprecated, use -c
rem -t,--unit-test Enables compilation of unit tests
rem -u,--devices <arg> devices.xml file to use when compiling (deprecated)
rem -v,--version Prints the compiler version
rem -w,--warn Show compiler warnings
rem -x,--excludes <arg> Add annotations to the exclude list (deprecated)
rem -y,--private-key <arg> Private key to sign builds with
rem -z,--rez <arg> Resource files (deprecated)
rem [-m <arg>] [--no-gen-styles] [-o <arg>] [-O <arg>] [-p <arg>] [-r] [-t]
rem [-u <arg>] [-v] [-w] [-x <arg>] [-y <arg>] [-z <arg>]
rem -a,--apidb <arg> API import file
rem -b,--apimir <arg> API MIR file
rem --build-stats <arg> Print build stats [0=basic]
rem -d,--device <arg> Target device
rem --debug-log-level <arg> Debug logging verbosity [0=errors, 1=basic,
rem 2=intermediate, 3=verbose]
rem --debug-log-output <arg> Output log zip file
rem --disable-api-has-check-removalDo not optimize out API has checks
rem --disable-v2-opcodes Do not use the v2 opcodes
rem -e,--package-app Create an application package.
rem --Eno-invalid-symbol Do not error when a symbol is found to be
rem invalid
rem -f,--jungles <arg> Jungle files
rem -g,--debug Print debug output
rem -h,--help Prints help information
rem -i,--import-dbg <arg> Import api.debug.xml
rem -k,--profile Enable profiling support
rem -l,--typecheck <arg> Type check [0=off, 1=gradual, 2=informative,
rem 3=strict]
rem -m,--manifest <arg> Manifest file (deprecated)
rem --no-gen-styles Do not generate Rez.Styles module
rem -o,--output <arg> Output file to create
rem -O,--optimization <arg> Optimization level [0=none, 1=basic, 2=fast
rem optimizations, 3=slow optimizations]
rem [p=optimize performance, z=optimize code
rem space]
rem -p,--project-info <arg> projectInfo.xml file to use when compiling
rem -r,--release Strip debug information
rem -t,--unit-test Enables compilation of unit tests
rem -u,--devices <arg> devices.xml file to use when compiling
rem (deprecated)
rem -v,--version Prints the compiler version
rem -w,--warn Show compiler warnings
rem -x,--excludes <arg> Add annotations to the exclude list
rem (deprecated)
rem -y,--private-key <arg> Private key to sign builds with
rem -z,--rez <arg> Resource files (deprecated)
title Exporting Garmin Home Assistant Application
@ -96,7 +100,6 @@ echo.
-Dfile.encoding=UTF-8 ^
-Dapple.awt.UIElement=true ^
-jar %SDK_PATH%\monkeybrains.jar ^
--api-level 3.1.0 ^
--output %IQ% ^
--jungles %SRC%\monkey.jungle ^
--private-key %SRC%\..\developer_key ^

View File

@ -24,10 +24,6 @@
Use "Monkey C: Edit Application" from the Visual Studio Code command palette
to update the application attributes.
-->
<!--
Testing in VSCode requires monkey.jungle, so for convenience, swap between
watch-app and widget by changing which of the next two lines are commented out
-->
<iq:application id="98c36259-498a-4458-9cef-74a273ad2bc3" type="watch-app" name="@Strings.AppName" entry="HomeAssistantApp" launcherIcon="@Drawables.LauncherIcon" minApiLevel="3.1.0">
<!--
Use the following from the Visual Studio Code command palette to edit
@ -108,6 +104,8 @@
<iq:product id="fr265"/>
<iq:product id="fr265s"/>
<iq:product id="fr55"/>
<iq:product id="fr57042mm"/>
<iq:product id="fr57047mm"/>
<iq:product id="fr645"/>
<iq:product id="fr645m"/>
<iq:product id="fr745"/>
@ -116,6 +114,7 @@
<iq:product id="fr945lte"/>
<iq:product id="fr955"/>
<iq:product id="fr965"/>
<iq:product id="fr970"/>
<iq:product id="gpsmap66"/>
<iq:product id="gpsmap67"/>
<iq:product id="instinct2"/>
@ -159,6 +158,7 @@
<iq:product id="vivoactive4"/>
<iq:product id="vivoactive4s"/>
<iq:product id="vivoactive5"/>
<iq:product id="vivoactive6"/>
</iq:products>
<!--
Use "Monkey C: Edit Permissions" from the Visual Studio Code command

View File

@ -87,8 +87,7 @@ edgeexplore.resourcePath = $(edgeexplore.resourcePath);resources-launcher-36-36;
edgeexplore2.resourcePath = $(edgeexplore2.resourcePath);resources-launcher-36-36;resources-icons-28
# Screen Size 280x280 launcher icon size 40x40
enduro.resourcePath = $(enduro.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 280x280 launcher icon size 40x40
enduro3.resourcePath = $(enduro3.resourcePath);resources-launcher-40-40;resources-icons-32
enduro3.resourcePath = $(enduro3.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 416x416 launcher icon size 60x60
epix2.resourcePath = $(epix2.resourcePath);resources-launcher-60-60;resources-icons-48
# Screen Size 390x390 launcher icon size 60x60
@ -115,7 +114,6 @@ fenix6spro.resourcePath = $(fenix6spro.resourcePath);resources-launcher-40-40;re
fenix6xpro.resourcePath = $(fenix6xpro.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 260x260 launcher icon size 40x40
fenix7.resourcePath = $(fenix7.resourcePath);resources-launcher-40-40;resources-icons-30
# Screen Size 260x260 launcher icon size 40x40
fenix7pro.resourcePath = $(fenix7pro.resourcePath);resources-launcher-40-40;resources-icons-30
fenix7pronowifi.resourcePath = $(fenix7pronowifi.resourcePath);resources-launcher-40-40;resources-icons-30
# Screen Size 240x240 launcher icon size 40x40
@ -124,7 +122,6 @@ fenix7s.resourcePath = $(fenix7s.resourcePath);resources-launcher-40-40;resource
fenix7spro.resourcePath = $(fenix7spro.resourcePath);resources-launcher-40-40;resources-icons-28
# Screen Size 280x280 launcher icon size 40x40
fenix7x.resourcePath = $(fenix7x.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 280x280 launcher icon size 40x40
fenix7xpro.resourcePath = $(fenix7xpro.resourcePath);resources-launcher-40-40;resources-icons-32
fenix7xpronowifi.resourcePath = $(fenix7xpronowifi.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 416x416 launcher icon size 60x60
@ -141,7 +138,6 @@ fenixchronos.resourcePath = $(fenixchronos.resourcePath);resources-launcher-36-3
fenixe.resourcePath = $(fenixe.resourcePath);resources-launcher-60-60;resources-icons-48
# Screen Size 390 x 390 launcher icon size 54x54
fr165.resourcePath = $(descentmk2s.resourcePath);resources-launcher-54-54;resources-icons-46
# Screen Size 390 x 390 launcher icon size 54x54
fr165m.resourcePath = $(descentmk2s.resourcePath);resources-launcher-54-54;resources-icons-46
# Screen Size 240x240 launcher icon size 40x40
fr245.resourcePath = $(fr245.resourcePath);resources-launcher-40-40;resources-icons-28
@ -157,6 +153,10 @@ fr265.resourcePath = $(fr265.resourcePath);resources-launcher-60-60;resources-ic
fr265s.resourcePath = $(fr265s.resourcePath);resources-launcher-60-60;resources-icons-48
# Screen Size 208x208 launcher icon size 35x35
fr55.resourcePath = $(fr55.resourcePath);resources-launcher-35-35;resources-icons-24
# Screen Size 390x390 launcher icon size 54x54
fr57042mm.resourcePath = $(fr57042mm.resourcePath);resources-launcher-54-54;resources-icons-46
# Screen Size 454x454 launcher icon size 65x65
fr57047mm.resourcePath = $(fr57047mm.resourcePath);resources-launcher-65-65;resources-icons-53
# Screen Size 240x240 launcher icon size 40x40
fr645.resourcePath = $(fr645.resourcePath);resources-launcher-40-40;resources-icons-28
fr645m.resourcePath = $(fr645m.resourcePath);resources-launcher-40-40;resources-icons-28
@ -169,9 +169,9 @@ fr945lte.resourcePath = $(fr945lte.resourcePath);resources-launcher-40-40;resour
fr955.resourcePath = $(fr955.resourcePath);resources-launcher-40-40;resources-icons-30
# Screen Size 454x454 launcher icon size 65x65
fr965.resourcePath = $(fr965.resourcePath);resources-launcher-65-65;resources-icons-53
fr970.resourcePath = $(fr970.resourcePath);resources-launcher-65-65;resources-icons-53
# Screen Size 240x400 launcher icon size 38x33
gpsmap66.resourcePath = $(gpsmap66.resourcePath);resources-launcher-33-33;resources-icons-28
# Screen Size 240x400 launcher icon size 38x33
gpsmap67.resourcePath = $(gpsmap67.resourcePath);resources-launcher-33-33;resources-icons-28
# Screen Size 176x176 launcher icon size 62x62
instinct2.resourcePath = $(instinct2.resourcePath);resources-launcher-62-62;resources-icons-21-w
@ -229,7 +229,6 @@ venud.resourcePath = $(venud.resourcePath);resources-launcher-60-60;resources-ic
venusq.resourcePath = $(venusq.resourcePath);resources-launcher-36-36;resources-icons-28
# Screen Size 320x360 launcher icon size 40x40
venusq2.resourcePath = $(venusq2.resourcePath);resources-launcher-40-40;resources-icons-38
# Screen Size 320x360 launcher icon size 40x40
venusq2m.resourcePath = $(venusq2m.resourcePath);resources-launcher-40-40;resources-icons-38
# Screen Size 240x240 launcher icon size 36x36
venusqm.resourcePath = $(venusqm.resourcePath);resources-launcher-36-36;resources-icons-28
@ -241,5 +240,7 @@ vivoactive3mlte.resourcePath = $(vivoactive3mlte.resourcePath);resources-launche
vivoactive4.resourcePath = $(vivoactive4.resourcePath);resources-launcher-35-35;resources-icons-30
# Screen Size 218x218 launcher icon size 30x30
vivoactive4s.resourcePath = $(vivoactive4s.resourcePath);resources-launcher-30-30;resources-icons-26
# Screen Size 390x390 launcher icon size 70x70
vivoactive5.resourcePath = $(vivoactive5.resourcePath);resources-launcher-70-70;resources-icons-46
# Screen Size 390x390 launcher icon size 56x56
vivoactive5.resourcePath = $(vivoactive5.resourcePath);resources-launcher-56-56;resources-icons-46
# Screen Size 390x390 launcher icon size 54x54
vivoactive6.resourcePath = $(vivoactive6.resourcePath);resources-launcher-54-54;resources-icons-46

View File

@ -51,7 +51,7 @@ class HomeAssistantMenuItem extends WatchUi.IconMenuItem {
return mTemplate;
}
function updateState(data as Lang.String or Lang.Dictionary or Null) as Void {
function updateState(data as Lang.String or Lang.Dictionary or Lang.Number or Lang.Float or Null) as Void {
if (data == null) {
setSubLabel($.Rez.Strings.Empty);
} else if(data instanceof Lang.String) {

View File

@ -75,7 +75,7 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
return "{{states('" + mData.get("entity_id") + "')}}";
}
function updateState(data as Lang.String or Lang.Dictionary or Null) as Void {
function updateState(data as Lang.String or Lang.Dictionary or Lang.Number or Lang.Float or Null) as Void {
if (data == null) {
setSubLabel(null);
} else if(data instanceof Lang.String) {