From f4afc04ee7a085a89ad84ba89344bb50ca9e6e04 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 21 Jun 2015 12:27:48 +0200 Subject: o Trying to make the Bluetooth API more C++ idiomatic, a GATT connection has the same lifecycle as a BluetoothGatt. sm-get-value: o Better error handling. --- apps/SoilMoisture.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apps/SoilMoisture.h') diff --git a/apps/SoilMoisture.h b/apps/SoilMoisture.h index 2016c9a..938da07 100644 --- a/apps/SoilMoisture.h +++ b/apps/SoilMoisture.h @@ -24,18 +24,18 @@ extern const boost::uuids::uuid soil_moisture_characteristic; class SoilMoisture { public: - static SoilMoisture create(BluetoothGatt &gatt); + static SoilMoisture create(shared_ptr gatt); uint8_t getSensorCount(); uint16_t getValue(uint8_t sensor); private: - SoilMoisture(BluetoothGatt &gatt, BluetoothGattService &s, BluetoothGattCharacteristic &c); + SoilMoisture(shared_ptr gatt, BluetoothGattService &s, BluetoothGattCharacteristic &c); ByteBuffer writeAndRead(ByteBuffer &requestBytes); - BluetoothGatt &gatt; + shared_ptr gatt; BluetoothGattService &s; BluetoothGattCharacteristic &c; }; -- cgit v1.2.3