Commit 3ea39e9b authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana Committed by Theodor-Adrian Stana

Added turn off of GPS prior to reset

parent 9f6a57a4
...@@ -25,9 +25,11 @@ ...@@ -25,9 +25,11 @@
#include <event.h> #include <event.h>
#include <drivers/lcd.h> #include <drivers/lcd.h>
#include <drivers/gps.h>
#include <gfx/graphics.h> #include <gfx/graphics.h>
#include <gfx/ui.h> #include <gfx/ui.h>
#include "widgets/status_bar.h" #include "widgets/status_bar.h"
#include "settings/settings.h"
#include "application.h" #include "application.h"
...@@ -66,11 +68,19 @@ void reset_main(void *params) ...@@ -66,11 +68,19 @@ void reset_main(void *params)
if (evt.data.button == BUT_TR || if (evt.data.button == BUT_TR ||
evt.data.button == BUT_TL) evt.data.button == BUT_TL)
return; return;
/* Reset on bottom right and bottom left buttons /* Reset on bottom right and bottom left buttons
* pressed */ * pressed */
if (evt.data.button == BUT_BR) if (evt.data.button == BUT_BR)
SCB->AIRCR = 0x05FA0004; SCB->AIRCR = 0x05FA0004;
break; // Turn GPS off if setting is ON, to prepare it for
// the turn-on pulse on reset
if (setting_get(&setting_gps_on)) {
int i;
gps_on_off_pulse();
for (i = 0; i < 1000000; i++)
;
}
break;
} }
} }
} }
......
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