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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user