Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jannis Rieger
firmware
Commits
f189fff0
Commit
f189fff0
authored
Aug 21, 2019
by
danukeru
Committed by
schneider
Aug 21, 2019
Browse files
I hate embedded string manipulation.
parent
2766e2f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
epicardium/ble/ble.c
View file @
f189fff0
...
...
@@ -120,7 +120,7 @@ static void setAddress(void)
bdAddr
[
4
]
=
b
;
bdAddr
[
5
]
=
a
;
}
LOG_INFO
(
"ble"
,
"Setting MAC address to %02X:%02X:%02X:%02X:%02X:%02X"
,
...
...
epicardium/ble/ble_main.c
View file @
f189fff0
...
...
@@ -326,11 +326,11 @@ static void bleClose(bleMsg_t *pMsg)
static
void
bleSetup
(
bleMsg_t
*
pMsg
)
{
char
buf
[
32
];
char
a
,
b
,
c
,
d
,
e
,
f
;
char
a
,
b
,
c
,
d
,
e
,
f
,
K
;
if
(
fs_read_text_file
(
"mac.txt"
,
buf
,
sizeof
(
buf
)))
{
if
(
sscanf
(
buf
,
"
**:**:**
:%c%c:%c%c:%c%c"
,
&
a
,
&
b
,
&
c
,
&
d
,
&
e
,
&
f
)
==
6
)
if
(
sscanf
(
buf
,
"
%c%c:%c%c:%c%c
:%c%c:%c%c:%c%c"
,
&
K
,
&
K
,
&
K
,
&
K
,
&
K
,
&
K
,
&
a
,
&
b
,
&
c
,
&
d
,
&
e
,
&
f
)
==
12
)
{
bleScanDataDisc
[
9
]
=
a
;
bleScanDataDisc
[
10
]
=
b
;
...
...
Write
Preview
Supports
Markdown
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