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
38e0cf16
Commit
38e0cf16
authored
Oct 08, 2014
by
Projects
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Time settings fix.
parent
06d30f35
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
set_time.c
sw/freertos/src/apps/settings/set_time.c
+3
-1
spinbox.c
sw/freertos/src/apps/widgets/spinbox.c
+2
-2
No files found.
sw/freertos/src/apps/settings/set_time.c
View file @
38e0cf16
...
...
@@ -76,7 +76,9 @@ static inline char sb_digit(int idx)
// Checks if spinboxes contain correct values
static
bool
is_valid
(
void
)
{
return
(
sb_digit
(
H1
)
<
3
&&
sb_digit
(
H2
)
<
5
&&
sb_digit
(
M1
)
<
6
);
int
hour
=
sb_digit
(
H1
)
*
10
+
sb_digit
(
H2
);
int
min
=
sb_digit
(
M1
)
*
10
+
sb_digit
(
M2
);
return
(
hour
>=
0
&&
hour
<=
23
&&
min
>=
0
&&
min
<=
59
);
}
// Sets the hour from spinboxes to clock
...
...
sw/freertos/src/apps/widgets/spinbox.c
View file @
38e0cf16
...
...
@@ -29,8 +29,8 @@
#include <string.h>
// Default character sets.
const
char
*
char_digits
=
"0123456789
\x0
"
;
const
char
*
char_letters
=
"abcdefghijklmnopqrstuvwxyz
\0
"
;
const
char
*
char_digits
=
"0123456789"
;
const
char
*
char_letters
=
"abcdefghijklmnopqrstuvwxyz"
;
static
void
spinbox_event
(
struct
ui_widget
*
w
,
const
struct
event
*
evt
)
{
...
...
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