Fixing some typos

This commit is contained in:
Adam Greenwood-Byrne 2020-08-06 10:53:58 +01:00
parent 1bb90b004a
commit 78c9eaa64c
2 changed files with 11 additions and 8 deletions

View file

@ -239,8 +239,8 @@ void startActiveScanning() {
} }
void startActiveAdvertising() { void startActiveAdvertising() {
float advertMinFreq = 100; // every 48ms float advertMinFreq = 100; // every 100ms
float advertMaxFreq = 100; // every 48ms float advertMaxFreq = 100; // every 100ms
float bleGranularity = 0.625; float bleGranularity = 0.625;
unsigned int min_interval = advertMinFreq / bleGranularity; unsigned int min_interval = advertMinFreq / bleGranularity;

View file

@ -127,12 +127,7 @@ void main()
uart_writeText("bt_setbdaddr()\n"); uart_writeText("bt_setbdaddr()\n");
bt_setbdaddr(); bt_setbdaddr();
/* // Check we set the BD_ADDR correctly
uart_writeText("startActiveScanning()\n");
setLEeventmask(0xff);
startActiveScanning();
*/
unsigned char local_addr[6]; unsigned char local_addr[6];
uart_writeText("bt_getbdaddr()\n"); uart_writeText("bt_getbdaddr()\n");
bt_getbdaddr(local_addr); bt_getbdaddr(local_addr);
@ -140,6 +135,14 @@ void main()
for (int c=5;c>=0;c--) uart_byte(local_addr[c]); for (int c=5;c>=0;c--) uart_byte(local_addr[c]);
uart_writeText("\n"); 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"); uart_writeText("startActiveAdvertising()\n");
startActiveAdvertising(); startActiveAdvertising();