From 78c9eaa64c34935f836fc9a0153bb75989bed25f Mon Sep 17 00:00:00 2001 From: Adam Greenwood-Byrne Date: Thu, 6 Aug 2020 10:53:58 +0100 Subject: [PATCH] Fixing some typos --- part7-bluetooth/bt.c | 4 ++-- part7-bluetooth/kernel.c | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/part7-bluetooth/bt.c b/part7-bluetooth/bt.c index 31cf5a8..960eb24 100644 --- a/part7-bluetooth/bt.c +++ b/part7-bluetooth/bt.c @@ -239,8 +239,8 @@ void startActiveScanning() { } void startActiveAdvertising() { - float advertMinFreq = 100; // every 48ms - float advertMaxFreq = 100; // every 48ms + float advertMinFreq = 100; // every 100ms + float advertMaxFreq = 100; // every 100ms float bleGranularity = 0.625; unsigned int min_interval = advertMinFreq / bleGranularity; diff --git a/part7-bluetooth/kernel.c b/part7-bluetooth/kernel.c index 9a0e88a..05b0301 100644 --- a/part7-bluetooth/kernel.c +++ b/part7-bluetooth/kernel.c @@ -127,12 +127,7 @@ void main() uart_writeText("bt_setbdaddr()\n"); bt_setbdaddr(); - /* - uart_writeText("startActiveScanning()\n"); - setLEeventmask(0xff); - startActiveScanning(); - */ - + // Check we set the BD_ADDR correctly unsigned char local_addr[6]; uart_writeText("bt_getbdaddr()\n"); bt_getbdaddr(local_addr); @@ -140,6 +135,14 @@ void main() for (int c=5;c>=0;c--) uart_byte(local_addr[c]); uart_writeText("\n"); + // Start scanning for devices around us + /* + uart_writeText("startActiveScanning()\n"); + setLEeventmask(0xff); + startActiveScanning(); + */ + + // Get the Eddystone beacon going uart_writeText("startActiveAdvertising()\n"); startActiveAdvertising();