From 1c7cd026770e3cd2e76bf825fcab3d56398247db Mon Sep 17 00:00:00 2001 From: Alexey 'Cluster' Avdyukhin Date: Fri, 1 Jun 2018 13:51:26 +0300 Subject: Fixes --- package.json | 5 +++-- src/c/pebble-mario.c | 12 +++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index a50c8bc..ed55f0b 100644 --- a/package.json +++ b/package.json @@ -168,7 +168,8 @@ "targetPlatforms": [ "aplite", "basalt", - "chalk" + "chalk", + "emery" ], "type": "bitmap" }, @@ -261,5 +262,5 @@ "watchface": true } }, - "version": "3.34.0" + "version": "3.41.0" } diff --git a/src/c/pebble-mario.c b/src/c/pebble-mario.c index a34c950..d8fe60e 100644 --- a/src/c/pebble-mario.c +++ b/src/c/pebble-mario.c @@ -1007,14 +1007,16 @@ void handle_tick(struct tm *tick_time, TimeUnits units_changed) int weather_age = time(NULL)-weather_last_update; if (units_changed & MINUTE_UNIT) { - if ((tick_time->tm_min % 30 == 0) || ((tick_time->tm_min % 5 == 0) && (weather_age > WEATHER_UPDATE_INTERVAL))) - request_all(); + if ( + (config_show_phone_battery && ((phone_battery_level < 0) || (tick_time->tm_min % 30 == 0))) + || (config_show_weather && (tick_time->tm_min % 5 == 0) && (weather_age > WEATHER_UPDATE_INTERVAL)) + ) + request_all(); } - if ((weather_age > WEATHER_MAX_AGE) && (weather_icon_id >= 0)) + if (config_show_weather && (weather_age > WEATHER_MAX_AGE) && (weather_icon_id >= 0)) { load_weather_icon(); - if (config_show_weather) - layer_mark_dirty(phone_battery_layer); + layer_mark_dirty(phone_battery_layer); } if (units_changed & HOUR_UNIT) -- cgit v1.2.3