Skip to content

Commit 056c247

Browse files
committed
Showing last four digits of mac address on display at boot-up
Capitalized mac address lua command
1 parent 9c2704d commit 056c247

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

source/application/lua_libraries/bluetooth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static int lua_bluetooth_address(lua_State *L)
4343
check_error(sd_ble_gap_addr_get(&addr));
4444

4545
char mac_addr_string[18];
46-
sprintf(mac_addr_string, "%02x:%02x:%02x:%02x:%02x:%02x",
46+
sprintf(mac_addr_string, "%02X:%02X:%02X:%02X:%02X:%02X",
4747
addr.addr[0], addr.addr[1], addr.addr[2],
4848
addr.addr[3], addr.addr[4], addr.addr[5]);
4949

source/application/luaport.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ void run_lua(bool factory_reset)
121121
}
122122

123123
// Show splash screen
124-
status = luaL_dostring(L, "frame.display.text('FRAME', 280, 176);"
124+
status = luaL_dostring(L, "frame.display.text('Frame Ready to Pair', 125, 140);"
125+
"frame.display.text('ID: '..frame.bluetooth.address():sub(-5, -4)..frame.bluetooth.address():sub(-2, -1), 250, 210, { color = 'ORANGE' });"
125126
"frame.display.show();");
126127

127128
if (status != LUA_OK)

0 commit comments

Comments
 (0)