mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-04-30 20:52:27 +00:00
Review comments
This commit is contained in:
@ -261,7 +261,7 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
// Start the continuous update process that continues for as long as the application is running.
|
||||
// The chain of functions from 'updateNextMenuItem()' calls 'updateNextMenuItem()' on completion.
|
||||
if (mItemsToUpdate.size() > 0) {
|
||||
updateNextMenuItemInt();
|
||||
updateNextMenuItemInternal();
|
||||
}
|
||||
}
|
||||
|
||||
@ -397,21 +397,21 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
function updateNextMenuItem() as Void {
|
||||
var delay = Settings.getPollDelay();
|
||||
if ((delay > 0) and (mNextItemToUpdate == 0)) {
|
||||
mUpdateTimer.start(method(:updateNextMenuItemInt), delay, false);
|
||||
mUpdateTimer.start(method(:updateNextMenuItemInternal), delay, false);
|
||||
} else {
|
||||
updateNextMenuItemInt();
|
||||
updateNextMenuItemInternal();
|
||||
}
|
||||
}
|
||||
|
||||
// We need to spread out the API calls so as not to overload the results queue and cause Communications.BLE_QUEUE_FULL
|
||||
// (-101) error. This function is called by a timer every Globals.menuItemUpdateInterval ms.
|
||||
function updateNextMenuItemInt() as Void {
|
||||
function updateNextMenuItemInternal() as Void {
|
||||
var itu = mItemsToUpdate as Lang.Array<HomeAssistantToggleMenuItem>;
|
||||
if (itu != null) {
|
||||
itu[mNextItemToUpdate].getState();
|
||||
mNextItemToUpdate = (mNextItemToUpdate + 1) % itu.size();
|
||||
// } else {
|
||||
// System.println("HomeAssistantApp updateNextMenuItemInt(): No menu items to update");
|
||||
// System.println("HomeAssistantApp updateNextMenuItemInternal(): No menu items to update");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ class Settings {
|
||||
private static var mClearCache as Lang.Boolean = false;
|
||||
private static var mVibrate as Lang.Boolean = false;
|
||||
private static var mAppTimeout as Lang.Number = 0; // seconds
|
||||
private static var mPollDelay as Lang.Number = 0; // milliseconds
|
||||
private static var mPollDelay as Lang.Number = 0; // seconds
|
||||
private static var mConfirmTimeout as Lang.Number = 3; // seconds
|
||||
private static var mMenuAlignment as Lang.Number = WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT;
|
||||
private static var mIsBatteryLevelEnabled as Lang.Boolean = false;
|
||||
|
Reference in New Issue
Block a user