Commit 35205273 authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

Check for GPS on in status bar handler

parent 21c04678
......@@ -34,6 +34,8 @@
#include <drivers/gps.h>
#include "../settings/settings.h"
static const unsigned int BATTERY_POS = 111;
static const unsigned int BATTERY_BARS = 10;
......@@ -47,6 +49,7 @@ static void status_bar_event(struct ui_widget *w, const struct event *evt)
{
switch(evt->type) {
case RTC_TICK:
if (setting_gps_on.val) {
if (gps_fixed()) {
memcpy(&gps_ico, &gps_receiving,
sizeof(struct rle_bitmap));
......@@ -60,7 +63,10 @@ static void status_bar_event(struct ui_widget *w, const struct event *evt)
}
}
w->flags |= WF_DIRTY;
break;
}
// fall-through
case BATTERY_STATUS:
if(abs(percentage - evt->data.battery.percentage) > 5 ||
charging != evt->data.battery.charging) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment