Commit f189fff0 authored by danukeru's avatar danukeru Committed by schneider
Browse files

I hate embedded string manipulation.

parent 2766e2f1
...@@ -120,7 +120,7 @@ static void setAddress(void) ...@@ -120,7 +120,7 @@ static void setAddress(void)
bdAddr[4] = b; bdAddr[4] = b;
bdAddr[5] = a; bdAddr[5] = a;
} }
LOG_INFO( LOG_INFO(
"ble", "ble",
"Setting MAC address to %02X:%02X:%02X:%02X:%02X:%02X", "Setting MAC address to %02X:%02X:%02X:%02X:%02X:%02X",
......
...@@ -326,11 +326,11 @@ static void bleClose(bleMsg_t *pMsg) ...@@ -326,11 +326,11 @@ static void bleClose(bleMsg_t *pMsg)
static void bleSetup(bleMsg_t *pMsg) static void bleSetup(bleMsg_t *pMsg)
{ {
char buf[32]; 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 (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[9] = a;
bleScanDataDisc[10] = b; bleScanDataDisc[10] = b;
......
Supports Markdown
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