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 @@
#include <event.h>
#include <drivers/lcd.h>
#include <drivers/gps.h>
#include <gfx/graphics.h>
#include <gfx/ui.h>
#include "widgets/status_bar.h"
#include "settings/settings.h"
#include "application.h"
......@@ -66,11 +68,19 @@ void reset_main(void *params)
if (evt.data.button == BUT_TR ||
evt.data.button == BUT_TL)
return;
/* Reset on bottom right and bottom left buttons
* pressed */
if (evt.data.button == BUT_BR)
SCB->AIRCR = 0x05FA0004;
break;
/* Reset on bottom right and bottom left buttons
* pressed */
if (evt.data.button == BUT_BR)
SCB->AIRCR = 0x05FA0004;
// 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