Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GPN_BadgeLasertag
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian
GPN_BadgeLasertag
Commits
fcb0c113
Commit
fcb0c113
authored
7 years ago
by
OleL
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://gitlab.warpzone.ms/HoelShare/GPN_BadgeLasertag
parents
64513d12
1031a16d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GPN_BadgeLasertag.ino
+0
-33
0 additions, 33 deletions
GPN_BadgeLasertag.ino
with
0 additions
and
33 deletions
GPN_BadgeLasertag.ino
+
0
−
33
View file @
fcb0c113
...
...
@@ -81,39 +81,6 @@ void hostGame() {
#endif
}
bool
isNumber
(
char
number
){
return
number
>=
0x30
&&
number
<=
0x39
;
}
bool
isValidIp
(
String
ip
){
unsigned
short
pos0
=
ip
.
indexOf
(
'.'
);
unsigned
short
pos1
=
ip
.
indexOf
(
'.'
,
pos0
+
1
);
unsigned
short
pos2
=
ip
.
indexOf
(
'.'
,
pos1
+
1
);
String
tuple0
=
ip
.
substring
(
0
,
pos0
);
String
tuple1
=
ip
.
substring
(
pos0
+
1
,
pos1
);
String
tuple2
=
ip
.
substring
(
pos1
+
1
,
pos2
);
String
tuple3
=
ip
.
substring
(
pos2
+
1
,
ip
.
length
()
-
1
);
bool
isValid
=
true
;
for
(
int
i
=
0
;
i
<
tuple0
.
length
();
i
++
){
Serial
.
printf
(
"tuple0: %d -> %c
\n
"
,
i
,
tuple0
[
i
]);
isValid
&=
isNumber
(
tuple0
[
i
]);
}
for
(
int
i
=
0
;
i
<
tuple1
.
length
();
i
++
){
Serial
.
printf
(
"tuple1: %d -> %c
\n
"
,
i
,
tuple1
[
i
]);
}
for
(
int
i
=
0
;
i
<
tuple2
.
length
();
i
++
){
Serial
.
printf
(
"tuple2: %d -> %c
\n
"
,
i
,
tuple2
[
i
]);
}
for
(
int
i
=
0
;
i
<
tuple3
.
length
();
i
++
){
Serial
.
printf
(
"tuple3: %d -> %c
\n
"
,
i
,
tuple3
[
i
]);
}
}
String
recv_ir
()
{
badge
.
setGPIO
(
IR_EN
,
HIGH
);
Serial
.
println
(
"Entering receive mode"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment