From 441cd0b11186d66493798551e1102eb246f1af9f Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 30 Jun 2015 14:37:06 +0200 Subject: Getting started on a port to OSX. --- apps/ble-scan.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'apps/ble-scan.h') diff --git a/apps/ble-scan.h b/apps/ble-scan.h index 9a72388..cd1d979 100644 --- a/apps/ble-scan.h +++ b/apps/ble-scan.h @@ -28,9 +28,8 @@ public: ~ble_scan() = default; - void add_options(po::options_description_easy_init &options) override { - options - ("adapter", po::value()->default_value(0), "Which adapter to use."); + void add_extra_options(po::options_description & options) { + add_ble_options(options); } int main(app_execution &execution) override { @@ -50,13 +49,11 @@ public: sigaction(SIGINT, &sigIntHandler, NULL); try { - auto adapter_index = execution.vm["adapter"].as(); - - adapter = getAdapter(adapter_index); + adapter = bluetoothSystem.getAdapter(ble_adapter_name()); set seen_devices; - cout << "Scanning with adapter #" << adapter_index << ", mac=" << adapter->getMac().str() << endl; + cout << "Scanning with adapter " << adapter->getName() << ", mac=" << adapter->getMac().str() << endl; adapter->runScan([&](BluetoothDevice &device) { auto mac = device.getMac(); -- cgit v1.2.3