diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-06-21 12:27:48 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-06-21 12:27:48 +0200 |
commit | f4afc04ee7a085a89ad84ba89344bb50ca9e6e04 (patch) | |
tree | 404058c5ffd4773dfe13ddcd7a1cafc39864ae21 /apps/SoilMoisture.h | |
parent | 7e2fb834d8ba2eb3fd6453f135d3e8ef30c852c6 (diff) | |
download | ble-toys-f4afc04ee7a085a89ad84ba89344bb50ca9e6e04.tar.gz ble-toys-f4afc04ee7a085a89ad84ba89344bb50ca9e6e04.tar.bz2 ble-toys-f4afc04ee7a085a89ad84ba89344bb50ca9e6e04.tar.xz ble-toys-f4afc04ee7a085a89ad84ba89344bb50ca9e6e04.zip |
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.
Diffstat (limited to 'apps/SoilMoisture.h')
-rw-r--r-- | apps/SoilMoisture.h | 6 |
1 files changed, 3 insertions, 3 deletions
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<BluetoothGatt> gatt); uint8_t getSensorCount(); uint16_t getValue(uint8_t sensor); private: - SoilMoisture(BluetoothGatt &gatt, BluetoothGattService &s, BluetoothGattCharacteristic &c); + SoilMoisture(shared_ptr<BluetoothGatt> gatt, BluetoothGattService &s, BluetoothGattCharacteristic &c); ByteBuffer writeAndRead(ByteBuffer &requestBytes); - BluetoothGatt &gatt; + shared_ptr<BluetoothGatt> gatt; BluetoothGattService &s; BluetoothGattCharacteristic &c; }; |