New devices and SDK demanded code updates

The SDK upgrade called for more careful specification of "or Null" on some fields in classes. The new devices have been added with their resource needs. Need to check if there's an issue with Edge 850 device.
This commit is contained in:
Philip Abbey
2025-09-29 21:00:13 +01:00
parent 28dc5a163c
commit ac97a8af0d
15 changed files with 93 additions and 13 deletions

View File

@@ -50,3 +50,4 @@
| 3.2 | Only enable or disable sensors on HomeAssistant when the background service options is changed, i.e. do not call the API to enable on start up every time. | | 3.2 | Only enable or disable sensors on HomeAssistant when the background service options is changed, i.e. do not call the API to enable on start up every time. |
| 3.3 | Providing automatic detection for menu definition updates, but still requires an application restart. | | 3.3 | Providing automatic detection for menu definition updates, but still requires an application restart. |
| 3.4 | Fixed a bug where templates failed to display in toggle menu items (at least on some devices). Fixed a bug where a menu item requesting to exit on completion appeared to indicate failure when using Wi-Fi or LTE. The fix uses a delay in exiting the application modelled as sufficient for a Venu 2 device, so this might need tweaking for other devices. Attempt to fixed an "Out of Memory" bug caused by v3.3 by making automatic checking for menu updates both optional and automatically turned off when insufficient memory is available. This last bug is device dependent and may require another attempt. Internationalisation improvements with thanks to @krzys_h for a new automated translations script. | | 3.4 | Fixed a bug where templates failed to display in toggle menu items (at least on some devices). Fixed a bug where a menu item requesting to exit on completion appeared to indicate failure when using Wi-Fi or LTE. The fix uses a delay in exiting the application modelled as sufficient for a Venu 2 device, so this might need tweaking for other devices. Attempt to fixed an "Out of Memory" bug caused by v3.3 by making automatic checking for menu updates both optional and automatically turned off when insufficient memory is available. This last bug is device dependent and may require another attempt. Internationalisation improvements with thanks to @krzys_h for a new automated translations script. |
| 3.5 | Added support for Edge 550, 850 & MTB, Fenix 8 Pro 47mm, GPSMAP H1, Instinct Crossover AMOLED, Venu 4 41mm & 45mm, & Venu X1 devices which also required an SDK update to 8.3.0. |

View File

@@ -57,11 +57,14 @@
<iq:product id="edge520plus"/> <iq:product id="edge520plus"/>
<iq:product id="edge530"/> <iq:product id="edge530"/>
<iq:product id="edge540"/> <iq:product id="edge540"/>
<iq:product id="edge550"/>
<iq:product id="edge820"/> <iq:product id="edge820"/>
<iq:product id="edge830"/> <iq:product id="edge830"/>
<iq:product id="edge840"/> <iq:product id="edge840"/>
<iq:product id="edge850"/>
<iq:product id="edgeexplore"/> <iq:product id="edgeexplore"/>
<iq:product id="edgeexplore2"/> <iq:product id="edgeexplore2"/>
<iq:product id="edgemtb"/>
<iq:product id="enduro"/> <iq:product id="enduro"/>
<iq:product id="enduro3"/> <iq:product id="enduro3"/>
<iq:product id="epix2"/> <iq:product id="epix2"/>
@@ -89,6 +92,7 @@
<iq:product id="fenix7xpronowifi"/> <iq:product id="fenix7xpronowifi"/>
<iq:product id="fenix843mm"/> <iq:product id="fenix843mm"/>
<iq:product id="fenix847mm"/> <iq:product id="fenix847mm"/>
<iq:product id="fenix8pro47mm"/>
<iq:product id="fenix8solar47mm"/> <iq:product id="fenix8solar47mm"/>
<iq:product id="fenix8solar51mm"/> <iq:product id="fenix8solar51mm"/>
<iq:product id="fenixchronos"/> <iq:product id="fenixchronos"/>
@@ -117,6 +121,7 @@
<iq:product id="fr970"/> <iq:product id="fr970"/>
<iq:product id="gpsmap66"/> <iq:product id="gpsmap66"/>
<iq:product id="gpsmap67"/> <iq:product id="gpsmap67"/>
<iq:product id="gpsmaph1"/>
<iq:product id="instinct2"/> <iq:product id="instinct2"/>
<iq:product id="instinct2s"/> <iq:product id="instinct2s"/>
<iq:product id="instinct2x"/> <iq:product id="instinct2x"/>
@@ -124,6 +129,7 @@
<iq:product id="instinct3amoled50mm"/> <iq:product id="instinct3amoled50mm"/>
<iq:product id="instinct3solar45mm"/> <iq:product id="instinct3solar45mm"/>
<iq:product id="instinctcrossover"/> <iq:product id="instinctcrossover"/>
<iq:product id="instinctcrossoveramoled"/>
<iq:product id="instincte40mm"/> <iq:product id="instincte40mm"/>
<iq:product id="instincte45mm"/> <iq:product id="instincte45mm"/>
<iq:product id="legacyherocaptainmarvel"/> <iq:product id="legacyherocaptainmarvel"/>
@@ -147,11 +153,14 @@
<iq:product id="venu2s"/> <iq:product id="venu2s"/>
<iq:product id="venu3"/> <iq:product id="venu3"/>
<iq:product id="venu3s"/> <iq:product id="venu3s"/>
<iq:product id="venu441mm"/>
<iq:product id="venu445mm"/>
<iq:product id="venud"/> <iq:product id="venud"/>
<iq:product id="venusq"/> <iq:product id="venusq"/>
<iq:product id="venusq2"/> <iq:product id="venusq2"/>
<iq:product id="venusq2m"/> <iq:product id="venusq2m"/>
<iq:product id="venusqm"/> <iq:product id="venusqm"/>
<iq:product id="venux1"/>
<iq:product id="vivoactive3"/> <iq:product id="vivoactive3"/>
<iq:product id="vivoactive3m"/> <iq:product id="vivoactive3m"/>
<iq:product id="vivoactive3mlte"/> <iq:product id="vivoactive3mlte"/>

View File

@@ -20,7 +20,7 @@ project.manifest = manifest.xml
# Device References # Device References
# * https://developer.garmin.com/connect-iq/compatible-devices/ # * https://developer.garmin.com/connect-iq/compatible-devices/
# * https://developer.garmin.com/connect-iq/reference-guides/devices-reference/ # * https://developer.garmin.com/connect-iq/device-reference/
# #
# Widget launcher icon, multiple resolutions # Widget launcher icon, multiple resolutions
# https://forums.garmin.com/developer/connect-iq/f/discussion/255433/widget-launcher-icon-multiple-resolutions/1563305 # https://forums.garmin.com/developer/connect-iq/f/discussion/255433/widget-launcher-icon-multiple-resolutions/1563305
@@ -77,14 +77,20 @@ edge520plus.resourcePath = $(edge520plus.resourcePath);resources-launcher-35-35;
# Screen Size 246x322 launcher icon size 35x35 # Screen Size 246x322 launcher icon size 35x35
edge530.resourcePath = $(edge530.resourcePath);resources-launcher-35-35;resources-icons-28 edge530.resourcePath = $(edge530.resourcePath);resources-launcher-35-35;resources-icons-28
edge540.resourcePath = $(edge540.resourcePath);resources-launcher-35-35;resources-icons-28 edge540.resourcePath = $(edge540.resourcePath);resources-launcher-35-35;resources-icons-28
# Screen Size 420x600 launcher icon size 56x56
edge550.resourcePath = $(edge550.resourcePath);resources-launcher-56-56;resources-icons-55
# Screen Size 200x265 launcher icon size 35x35 # Screen Size 200x265 launcher icon size 35x35
edge820.resourcePath = $(edge820.resourcePath);resources-launcher-35-35;resources-icons-24 edge820.resourcePath = $(edge820.resourcePath);resources-launcher-35-35;resources-icons-24
# Screen Size 246x322 launcher icon size 35x35 # Screen Size 246x322 launcher icon size 35x35
edge830.resourcePath = $(edge830.resourcePath);resources-launcher-35-35;resources-icons-28 edge830.resourcePath = $(edge830.resourcePath);resources-launcher-35-35;resources-icons-28
edge840.resourcePath = $(edge840.resourcePath);resources-launcher-35-35;resources-icons-28 edge840.resourcePath = $(edge840.resourcePath);resources-launcher-35-35;resources-icons-28
# Screen Size 420x600 launcher icon size 56x56
edge850.resourcePath = $(edge850.resourcePath);resources-launcher-56-56;resources-icons-55
# Screen Size 240x400 launcher icon size 36x36 # Screen Size 240x400 launcher icon size 36x36
edgeexplore.resourcePath = $(edgeexplore.resourcePath);resources-launcher-36-36;resources-icons-28 edgeexplore.resourcePath = $(edgeexplore.resourcePath);resources-launcher-36-36;resources-icons-28
edgeexplore2.resourcePath = $(edgeexplore2.resourcePath);resources-launcher-36-36;resources-icons-28 edgeexplore2.resourcePath = $(edgeexplore2.resourcePath);resources-launcher-36-36;resources-icons-28
# Screen Size 240x320 launcher icon size 36x36
edgemtb.resourcePath = $(edgemtb.resourcePath);resources-launcher-36-36;resources-icons-32
# Screen Size 280x280 launcher icon size 40x40 # Screen Size 280x280 launcher icon size 40x40
enduro.resourcePath = $(enduro.resourcePath);resources-launcher-40-40;resources-icons-32 enduro.resourcePath = $(enduro.resourcePath);resources-launcher-40-40;resources-icons-32
enduro3.resourcePath = $(enduro3.resourcePath);resources-launcher-40-40;resources-icons-32 enduro3.resourcePath = $(enduro3.resourcePath);resources-launcher-40-40;resources-icons-32
@@ -128,6 +134,7 @@ fenix7xpronowifi.resourcePath = $(fenix7xpronowifi.resourcePath);resources-launc
fenix843mm.resourcePath = $(fenix843mm.resourcePath);resources-launcher-60-60;resources-icons-48 fenix843mm.resourcePath = $(fenix843mm.resourcePath);resources-launcher-60-60;resources-icons-48
# Screen Size 454x454 launcher icon size 65x65 # Screen Size 454x454 launcher icon size 65x65
fenix847mm.resourcePath = $(fenix847mm.resourcePath);resources-launcher-65-65;resources-icons-53 fenix847mm.resourcePath = $(fenix847mm.resourcePath);resources-launcher-65-65;resources-icons-53
fenix8pro47mm.resourcePath = $(fenix8pro47mm.resourcePath);resources-launcher-65-65;resources-icons-53
# Screen Size 260x260 launcher icon size 40x40 # Screen Size 260x260 launcher icon size 40x40
fenix8solar47mm.resourcePath = $(fenix8solar47mm.resourcePath);resources-launcher-40-40;resources-icons-30 fenix8solar47mm.resourcePath = $(fenix8solar47mm.resourcePath);resources-launcher-40-40;resources-icons-30
# Screen Size 280x280 launcher icon size 40x40 # Screen Size 280x280 launcher icon size 40x40
@@ -173,6 +180,7 @@ fr970.resourcePath = $(fr970.resourcePath);resources-launcher-65-65;resources-ic
# Screen Size 240x400 launcher icon size 38x33 # Screen Size 240x400 launcher icon size 38x33
gpsmap66.resourcePath = $(gpsmap66.resourcePath);resources-launcher-33-33;resources-icons-28 gpsmap66.resourcePath = $(gpsmap66.resourcePath);resources-launcher-33-33;resources-icons-28
gpsmap67.resourcePath = $(gpsmap67.resourcePath);resources-launcher-33-33;resources-icons-28 gpsmap67.resourcePath = $(gpsmap67.resourcePath);resources-launcher-33-33;resources-icons-28
gpsmaph1.resourcePath = $(gpsmaph1.resourcePath);resources-launcher-33-33;resources-icons-28
# Screen Size 176x176 launcher icon size 62x62 # Screen Size 176x176 launcher icon size 62x62
instinct2.resourcePath = $(instinct2.resourcePath);resources-launcher-62-62;resources-icons-21-w instinct2.resourcePath = $(instinct2.resourcePath);resources-launcher-62-62;resources-icons-21-w
# Screen Size 163x156 launcher icon size 54x54 # Screen Size 163x156 launcher icon size 54x54
@@ -187,6 +195,8 @@ instinct3amoled50mm.resourcePath = $(instinct3amoled50mm.resourcePath);resources
instinct3solar45mm.resourcePath = $(instinct3solar45mm.resourcePath);resources-launcher-62-62;resources-icons-18-w instinct3solar45mm.resourcePath = $(instinct3solar45mm.resourcePath);resources-launcher-62-62;resources-icons-18-w
# Screen Size 176x176 launcher icon size 26x26 # Screen Size 176x176 launcher icon size 26x26
instinctcrossover.resourcePath = $(instinctcrossover.resourcePath);resources-launcher-26-26;resources-icons-21-w instinctcrossover.resourcePath = $(instinctcrossover.resourcePath);resources-launcher-26-26;resources-icons-21-w
# Screen Size 390x390 launcher icon size 38x38
instinctcrossoveramoled.resourcePath = $(instinctcrossoveramoled.resourcePath);resources-launcher-38-38;resources-icons-46
# Screen Size 166x166 launcher icon size 52x52, but the icon size used here is reduced as the menu items were clipped. # Screen Size 166x166 launcher icon size 52x52, but the icon size used here is reduced as the menu items were clipped.
instincte40mm.resourcePath = $(instincte40mm.resourcePath);resources-launcher-52-52;resources-icons-18-w instincte40mm.resourcePath = $(instincte40mm.resourcePath);resources-launcher-52-52;resources-icons-18-w
# Screen Size 176x176 launcher icon size 62x62, but the icon size used here is reduced as the menu items were clipped. # Screen Size 176x176 launcher icon size 62x62, but the icon size used here is reduced as the menu items were clipped.
@@ -223,6 +233,10 @@ venu2s.resourcePath = $(venu2s.resourcePath);resources-launcher-61-61;resources-
venu3.resourcePath = $(venu3.resourcePath);resources-launcher-70-70;resources-icons-53 venu3.resourcePath = $(venu3.resourcePath);resources-launcher-70-70;resources-icons-53
# Screen Size 390x390 launcher icon size 70x70 # Screen Size 390x390 launcher icon size 70x70
venu3s.resourcePath = $(venu3s.resourcePath);resources-launcher-70-70;resources-icons-46 venu3s.resourcePath = $(venu3s.resourcePath);resources-launcher-70-70;resources-icons-46
# Screen Size 390x390 launcher icon size 54x54
venu441mm.resourcePath = $(venu441mm.resourcePath);resources-launcher-54-54;resources-icons-46
# Screen Size 454x454 launcher icon size 65x65
venu445mm.resourcePath = $(venu445mm.resourcePath);resources-launcher-65-65;resources-icons-53
# Screen Size 390x390 launcher icon size 60x60 # Screen Size 390x390 launcher icon size 60x60
venud.resourcePath = $(venud.resourcePath);resources-launcher-60-60;resources-icons-46 venud.resourcePath = $(venud.resourcePath);resources-launcher-60-60;resources-icons-46
# Screen Size 240x240 launcher icon size 36x36 # Screen Size 240x240 launcher icon size 36x36
@@ -232,6 +246,8 @@ venusq2.resourcePath = $(venusq2.resourcePath);resources-launcher-40-40;resource
venusq2m.resourcePath = $(venusq2m.resourcePath);resources-launcher-40-40;resources-icons-38 venusq2m.resourcePath = $(venusq2m.resourcePath);resources-launcher-40-40;resources-icons-38
# Screen Size 240x240 launcher icon size 36x36 # Screen Size 240x240 launcher icon size 36x36
venusqm.resourcePath = $(venusqm.resourcePath);resources-launcher-36-36;resources-icons-28 venusqm.resourcePath = $(venusqm.resourcePath);resources-launcher-36-36;resources-icons-28
# Screen Size 448x486 launcher icon size 65x65
venux1.resourcePath = $(venux1.resourcePath);resources-launcher-65-65;resources-icons-53
# Screen Size 240x240 launcher icon size 40x33 # Screen Size 240x240 launcher icon size 40x33
vivoactive3.resourcePath = $(vivoactive3.resourcePath);resources-launcher-33-33;resources-icons-28 vivoactive3.resourcePath = $(vivoactive3.resourcePath);resources-launcher-33-33;resources-icons-28
vivoactive3m.resourcePath = $(vivoactive3m.resourcePath);resources-launcher-33-33;resources-icons-28 vivoactive3m.resourcePath = $(vivoactive3m.resourcePath);resources-launcher-33-33;resources-icons-28

View File

@@ -0,0 +1,23 @@
<!--
Distributed under MIT Licence
See https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/LICENSE.
GarminHomeAssistant is a Garmin IQ application written in Monkey C and routinely
tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant.
J D Abbey & P A Abbey, 28 December 2022
References:
* https://fonts.google.com/icons
-->
<drawables>
<bitmap id="ErrorIcon" filename="error.svg"/>
<bitmap id="GroupTypeIcon" filename="group_type.svg"/>
<bitmap id="TapTypeIcon" filename="tap_type.svg"/>
<bitmap id="InfoTypeIcon" filename="info_type.svg"/>
</drawables>

View File

@@ -0,0 +1 @@
<svg height="56" viewBox="0 0 48 48" width="56" xmlns="http://www.w3.org/2000/svg"><path d="M24 34q.7 0 1.175-.475.475-.475.475-1.175 0-.7-.475-1.175Q24.7 30.7 24 30.7q-.7 0-1.175.475-.475.475-.475 1.175 0 .7.475 1.175Q23.3 34 24 34Zm-1.35-7.65h3V13.7h-3ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 23.95q0-4.1 1.575-7.75 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24.05 4q4.1 0 7.75 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm.05-3q7.05 0 12-4.975T41 23.95q0-7.05-4.95-12T24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24.05 41ZM24 24Z" fill="red" stroke="red"/></svg>

After

Width:  |  Height:  |  Size: 713 B

View File

@@ -0,0 +1,7 @@
<svg height="56" viewBox="0 0 200 500" width="56" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1, 0, 0, 1, 0, 0)">
<rect fill="blue" height="100" rx="40" ry="40" width="200" x="0" y="0"/>
<rect fill="blue" height="100" rx="40" ry="40" width="200" x="0" y="200"/>
<rect fill="blue" height="100" rx="40" ry="40" width="200" x="0" y="400"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 362 B

View File

@@ -0,0 +1 @@
<svg height="56" viewBox="0 -960 960 960" width="56" xmlns="http://www.w3.org/2000/svg"><path d="M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z" fill="blue" stroke="blue"/></svg>

After

Width:  |  Height:  |  Size: 543 B

View File

@@ -0,0 +1 @@
<svg height="56" viewBox="0 -960 960 960" width="56" xmlns="http://www.w3.org/2000/svg"><path d="M445-80q-29 0-56-12t-45-35L127-403l21-23q14-15 34.5-18.5T221-438l99 53v-365q0-12.75 8.675-21.375 8.676-8.625 21.5-8.625 12.825 0 21.325 8.625T380-750v465l-144-77 156 198q10 12 23.76 18 13.76 6 29.24 6h205q38 0 64-26t26-64v-170q0-25.5-17.25-42.75T680-460H460v-60h219.646q50.148 0 85.251 35T800-400v170q0 63-43.5 106.5T650-80H445ZM203-665q-11.074-18.754-17.037-40.492Q180-727.229 180-750.246 180-821 229.725-870.5T350-920q70.55 0 120.275 49.738Q520-820.524 520-749.956q0 22.956-5.963 44.614Q508.074-683.685 497-665l-52-30q7-12 11-26t4-29.478Q460-796 427.882-828q-32.117-32-78-32Q304-860 272-827.917 240-795.833 240-750q0 15 4 29t11 26l-52 30Zm285 335Z" fill="blue" stroke="blue"/></svg>

After

Width:  |  Height:  |  Size: 782 B

View File

@@ -0,0 +1,17 @@
<!--
Distributed under MIT Licence
See https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/LICENSE.
GarminHomeAssistant is a Garmin IQ application written in Monkey C and routinely
tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023
-->
<drawables>
<bitmap id="LauncherIcon" filename="launcher.svg" />
</drawables>

View File

@@ -0,0 +1,4 @@
<svg fill="none" height="38" viewBox="0 0 400 400" width="38" xmlns="http://www.w3.org/2000/svg">
<path d="M320 301.762C320 310.012 313.25 316.762 305 316.762H95C86.75 316.762 80 310.012 80 301.762V211.762C80 203.512 84.77 191.993 90.61 186.153L189.39 87.3725C195.22 81.5425 204.77 81.5425 210.6 87.3725L309.39 186.162C315.22 191.992 320 203.522 320 211.772V301.772V301.762Z" fill="#F2F4F9"/>
<path d="M309.39 186.153L210.61 87.3725C204.78 81.5425 195.23 81.5425 189.4 87.3725L90.61 186.153C84.78 191.983 80 203.512 80 211.762V301.762C80 310.012 86.75 316.762 95 316.762H187.27L146.64 276.132C144.55 276.852 142.32 277.262 140 277.262C128.7 277.262 119.5 268.062 119.5 256.762C119.5 245.462 128.7 236.262 140 236.262C151.3 236.262 160.5 245.462 160.5 256.762C160.5 259.092 160.09 261.322 159.37 263.412L191 295.042V179.162C184.2 175.822 179.5 168.842 179.5 160.772C179.5 149.472 188.7 140.272 200 140.272C211.3 140.272 220.5 149.472 220.5 160.772C220.5 168.842 215.8 175.822 209 179.162V260.432L240.46 228.972C239.84 227.012 239.5 224.932 239.5 222.772C239.5 211.472 248.7 202.272 260 202.272C271.3 202.272 280.5 211.472 280.5 222.772C280.5 234.072 271.3 243.272 260 243.272C257.5 243.272 255.12 242.802 252.91 241.982L209 285.892V316.772H305C313.25 316.772 320 310.022 320 301.772V211.772C320 203.522 315.23 192.002 309.39 186.162V186.153Z" fill="#18BCF2"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -46,27 +46,27 @@ class Alert extends WatchUi.View {
function initialize(params as Lang.Dictionary) { function initialize(params as Lang.Dictionary) {
View.initialize(); View.initialize();
mText = params[:text] as Lang.String; mText = params[:text] as Lang.String?;
if (mText == null) { if (mText == null) {
mText = "Alert"; mText = "Alert";
} }
mFont = params[:font] as Graphics.FontType; mFont = params[:font] as Graphics.FontType?;
if (mFont == null) { if (mFont == null) {
mFont = Graphics.FONT_MEDIUM; mFont = Graphics.FONT_MEDIUM;
} }
mFgcolor = params[:fgcolor] as Graphics.ColorType; mFgcolor = params[:fgcolor] as Graphics.ColorType?;
if (mFgcolor == null) { if (mFgcolor == null) {
mFgcolor = Graphics.COLOR_BLACK; mFgcolor = Graphics.COLOR_BLACK;
} }
mBgcolor = params[:bgcolor] as Graphics.ColorType; mBgcolor = params[:bgcolor] as Graphics.ColorType?;
if (mBgcolor == null) { if (mBgcolor == null) {
mBgcolor = Graphics.COLOR_WHITE; mBgcolor = Graphics.COLOR_WHITE;
} }
mTimeout = params[:timeout] as Lang.Number; mTimeout = params[:timeout] as Lang.Number?;
if (mTimeout == null) { if (mTimeout == null) {
mTimeout = 2000; mTimeout = 2000;
} }

View File

@@ -769,7 +769,7 @@ class HomeAssistantApp extends Application.AppBase {
break; break;
case Communications.BLE_QUEUE_FULL: case Communications.BLE_QUEUE_FULL:
// System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: BLE_QUEUE_FULL, API calls too rapid."); System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
if (mIsApp) { if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String);
} }

View File

@@ -23,7 +23,7 @@ using Toybox.Timer;
// //
class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem { class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
private var mData as Lang.Dictionary; private var mData as Lang.Dictionary;
private var mTemplate as Lang.String; private var mTemplate as Lang.String?;
private var mExit as Lang.Boolean; private var mExit as Lang.Boolean;
private var mConfirm as Lang.Boolean; private var mConfirm as Lang.Boolean;
private var mPin as Lang.Boolean; private var mPin as Lang.Boolean;

View File

@@ -29,10 +29,10 @@ using Toybox.Time;
// //
(:glance, :background) (:glance, :background)
class Settings { class Settings {
private static var mApiKey as Lang.String = ""; private static var mApiKey as Lang.String? = "";
private static var mWebhookId as Lang.String = ""; private static var mWebhookId as Lang.String? = "";
private static var mApiUrl as Lang.String = ""; private static var mApiUrl as Lang.String? = "";
private static var mConfigUrl as Lang.String = ""; private static var mConfigUrl as Lang.String? = "";
private static var mCacheConfig as Lang.Boolean = false; private static var mCacheConfig as Lang.Boolean = false;
private static var mClearCache as Lang.Boolean = false; private static var mClearCache as Lang.Boolean = false;
private static var mMenuCheck as Lang.Boolean = false; private static var mMenuCheck as Lang.Boolean = false;

View File

@@ -30,7 +30,7 @@ class WifiLteExecutionConfirmDelegate extends WatchUi.ConfirmationDelegate {
:url as Lang.String?, :url as Lang.String?,
:id as Lang.Number?, :id as Lang.Number?,
:exit as Lang.Boolean :exit as Lang.Boolean
}; }?;
private static var mTimer as Timer.Timer?; private static var mTimer as Timer.Timer?;
private var mHasToast as Lang.Boolean = false; private var mHasToast as Lang.Boolean = false;