Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
fwatch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
fwatch
Commits
3ea39e9b
Commit
3ea39e9b
authored
Jan 20, 2015
by
Theodor-Adrian Stana
Committed by
Theodor-Adrian Stana
Feb 09, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added turn off of GPS prior to reset
parent
9f6a57a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
reset.c
sw/freewatch/src/apps/reset.c
+15
-5
No files found.
sw/freewatch/src/apps/reset.c
View file @
3ea39e9b
...
...
@@ -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
;
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment