mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-10-16 01:28:13 +00:00
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:
@@ -46,27 +46,27 @@ class Alert extends WatchUi.View {
|
||||
function initialize(params as Lang.Dictionary) {
|
||||
View.initialize();
|
||||
|
||||
mText = params[:text] as Lang.String;
|
||||
mText = params[:text] as Lang.String?;
|
||||
if (mText == null) {
|
||||
mText = "Alert";
|
||||
}
|
||||
|
||||
mFont = params[:font] as Graphics.FontType;
|
||||
mFont = params[:font] as Graphics.FontType?;
|
||||
if (mFont == null) {
|
||||
mFont = Graphics.FONT_MEDIUM;
|
||||
}
|
||||
|
||||
mFgcolor = params[:fgcolor] as Graphics.ColorType;
|
||||
mFgcolor = params[:fgcolor] as Graphics.ColorType?;
|
||||
if (mFgcolor == null) {
|
||||
mFgcolor = Graphics.COLOR_BLACK;
|
||||
}
|
||||
|
||||
mBgcolor = params[:bgcolor] as Graphics.ColorType;
|
||||
mBgcolor = params[:bgcolor] as Graphics.ColorType?;
|
||||
if (mBgcolor == null) {
|
||||
mBgcolor = Graphics.COLOR_WHITE;
|
||||
}
|
||||
|
||||
mTimeout = params[:timeout] as Lang.Number;
|
||||
mTimeout = params[:timeout] as Lang.Number?;
|
||||
if (mTimeout == null) {
|
||||
mTimeout = 2000;
|
||||
}
|
||||
|
@@ -769,7 +769,7 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
break;
|
||||
|
||||
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) {
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String);
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@ using Toybox.Timer;
|
||||
//
|
||||
class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
|
||||
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 mConfirm as Lang.Boolean;
|
||||
private var mPin as Lang.Boolean;
|
||||
|
@@ -29,10 +29,10 @@ using Toybox.Time;
|
||||
//
|
||||
(:glance, :background)
|
||||
class Settings {
|
||||
private static var mApiKey as Lang.String = "";
|
||||
private static var mWebhookId as Lang.String = "";
|
||||
private static var mApiUrl as Lang.String = "";
|
||||
private static var mConfigUrl as Lang.String = "";
|
||||
private static var mApiKey as Lang.String? = "";
|
||||
private static var mWebhookId as Lang.String? = "";
|
||||
private static var mApiUrl as Lang.String? = "";
|
||||
private static var mConfigUrl as Lang.String? = "";
|
||||
private static var mCacheConfig as Lang.Boolean = false;
|
||||
private static var mClearCache as Lang.Boolean = false;
|
||||
private static var mMenuCheck as Lang.Boolean = false;
|
||||
|
@@ -30,7 +30,7 @@ class WifiLteExecutionConfirmDelegate extends WatchUi.ConfirmationDelegate {
|
||||
:url as Lang.String?,
|
||||
:id as Lang.Number?,
|
||||
:exit as Lang.Boolean
|
||||
};
|
||||
}?;
|
||||
|
||||
private static var mTimer as Timer.Timer?;
|
||||
private var mHasToast as Lang.Boolean = false;
|
||||
|
Reference in New Issue
Block a user