Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/pebble-mario.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <ClusterM@users.noreply.github.com>2018-06-01 13:51:26 +0300
committerAlexey 'Cluster' Avdyukhin <ClusterM@users.noreply.github.com>2018-06-01 13:51:26 +0300
commit1c7cd026770e3cd2e76bf825fcab3d56398247db (patch)
treea4296543cfd909cb7300bbb7b472531ce116340c
parent076cb61d30e85c65306288f0979f8cfeeac46efb (diff)
-rw-r--r--package.json5
-rw-r--r--src/c/pebble-mario.c12
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)