diff --git a/pebble/LibPebblesCommand.py b/pebble/LibPebblesCommand.py index c8b3a41..27d89db 100644 --- a/pebble/LibPebblesCommand.py +++ b/pebble/LibPebblesCommand.py @@ -73,13 +73,16 @@ def configure_subparser(self, parser): def run(self, args): LibPebbleCommand.run(self, args) - apps = self.pebble.get_appbank_status() - if apps is not False and len(apps['apps']) > 0: - for app in apps['apps']: + try: + response = self.pebble.get_appbank_status() + apps = response['apps'] + if len(apps) == 0: + logging.info("No apps installed.") + for app in apps: logging.info('[{}] {}'.format(app['index'], app['name'])) - else: - logging.info("No apps.") - + except: + logging.error("Error getting apps list.") + return 1 class PblRemoveCommand(LibPebbleCommand): name = 'rm' diff --git a/pebble/PblProjectCreator.py b/pebble/PblProjectCreator.py index 60b26df..2baba99 100644 --- a/pebble/PblProjectCreator.py +++ b/pebble/PblProjectCreator.py @@ -139,9 +139,8 @@ def build(ctx): void handle_init(void) { window = window_create(); - window_stack_push(window, true /* Animated */); - window_set_click_config_provider(window, (ClickConfigProvider) config_provider); + window_stack_push(window, true /* Animated */); text_layer = text_layer_create(GRect(/* x: */ 0, /* y: */ 74, /* width: */ 144, /* height: */ 20)); @@ -157,6 +156,9 @@ def build(ctx): int main(void) { handle_init(); + + APP_LOG(APP_LOG_LEVEL_DEBUG, "Done initializing, pushed window: %p", window); + app_event_loop(); handle_deinit(); } diff --git a/requirements.txt b/requirements.txt index 726a0d6..cfc2780 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ twisted autobahn websocket-client -sh==1.04 +sh==1.08 pyserial>=2.6 # Only if using bluetooth connection to Pebble: # git+http://github.com/pebble/lightblue-0.4.git#egg=lightblue-0.4