Indoor positioning. Central unit.

Dependencies:   aconno_SEGGER_RTT

Committer:
dbartolovic
Date:
Tue Mar 06 15:45:34 2018 +0000
Revision:
1:2bdc506d8baa
Parent:
0:07a75b2fae14
Child:
2:1b85a28b1e68
Added advertisement of peripheral modules MACs and RSSI values

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jurica238814 0:07a75b2fae14 1 /*
jurica238814 0:07a75b2fae14 2 *
jurica238814 0:07a75b2fae14 3 *
jurica238814 0:07a75b2fae14 4 */
jurica238814 0:07a75b2fae14 5
jurica238814 0:07a75b2fae14 6 #include "main.h"
jurica238814 0:07a75b2fae14 7
jurica238814 0:07a75b2fae14 8 int main()
jurica238814 0:07a75b2fae14 9 {
jurica238814 0:07a75b2fae14 10 printf("Main program started.\r\n");
jurica238814 0:07a75b2fae14 11
jurica238814 0:07a75b2fae14 12 BLE &ble = BLE::Instance();
jurica238814 0:07a75b2fae14 13 ble.init(bleInitComplete);
jurica238814 0:07a75b2fae14 14 printf("BLE initialised.\r\n");
jurica238814 0:07a75b2fae14 15
jurica238814 0:07a75b2fae14 16 #if DEBUG_LED
jurica238814 0:07a75b2fae14 17 // Turn the leds off
jurica238814 0:07a75b2fae14 18 advLed = 1;
jurica238814 0:07a75b2fae14 19 scanLed = 1;
jurica238814 0:07a75b2fae14 20 periodicLed = 1;
jurica238814 0:07a75b2fae14 21 #endif
jurica238814 0:07a75b2fae14 22
dbartolovic 1:2bdc506d8baa 23 tBleStartAdvertising.start(callback(bleStartAdvertising, &ble));
jurica238814 0:07a75b2fae14 24 tBleStartScanning.start(callback(bleStartScanning, &ble));
jurica238814 0:07a75b2fae14 25 tPeriodicCallback.start(callback(periodicCallback, &ble));
jurica238814 0:07a75b2fae14 26
jurica238814 0:07a75b2fae14 27 while(true)
jurica238814 0:07a75b2fae14 28 {
jurica238814 0:07a75b2fae14 29 // Do nothing
jurica238814 0:07a75b2fae14 30
jurica238814 0:07a75b2fae14 31 }
jurica238814 0:07a75b2fae14 32 }
jurica238814 0:07a75b2fae14 33