diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2018-11-23 09:40:48 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2018-11-23 09:40:48 +0100 |
commit | 2034b1bb10720a2f0e6cc97427346f2320c115bc (patch) | |
tree | c382c6e404d48078aac71e2fd3f7f34587b99e7b /apps/SoilMoisture.h | |
parent | 0e2228fae626ec617a6a1f042ceb6dbdbd774558 (diff) | |
download | ble-toys-2034b1bb10720a2f0e6cc97427346f2320c115bc.tar.gz ble-toys-2034b1bb10720a2f0e6cc97427346f2320c115bc.tar.bz2 ble-toys-2034b1bb10720a2f0e6cc97427346f2320c115bc.tar.xz ble-toys-2034b1bb10720a2f0e6cc97427346f2320c115bc.zip |
o Starting to handle notifications and indications
Cleaning up:
o Using more of the shared_ptr typedefs.
o Adding code styles used by CLion.
Diffstat (limited to 'apps/SoilMoisture.h')
-rw-r--r-- | apps/SoilMoisture.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/SoilMoisture.h b/apps/SoilMoisture.h index 4e6ae17..a46afeb 100644 --- a/apps/SoilMoisture.h +++ b/apps/SoilMoisture.h @@ -29,7 +29,7 @@ extern const Uuid soil_moisture_characteristic; class SoilMoisture { public: - static SoilMoisture create(shared_ptr<BluetoothGatt> gatt); + static SoilMoisture create(BluetoothGattPtr gatt); uint8_t getSensorCount(); @@ -44,16 +44,16 @@ public: void setLight(uint8_t light, uint8_t value); private: - SoilMoisture(const shared_ptr<BluetoothGatt> &gatt, - const shared_ptr<BluetoothGattService> &s, - const shared_ptr<BluetoothGattCharacteristic> &soilMoistureCharacteristic, + SoilMoisture(const BluetoothGattPtr &gatt, + const BluetoothGattServicePtr &s, + const BluetoothGattCharacteristicPtr &soilMoistureCharacteristic, const o<BluetoothGattCharacteristicPtr> temperatureCharacteristic, const o<BluetoothGattCharacteristicPtr> lightCharacteristic); void writeAndRead(const BluetoothGattCharacteristicPtr &c, ByteBuffer &requestBytes); - shared_ptr<BluetoothGatt> gatt; - shared_ptr<BluetoothGattService> s; + BluetoothGattPtr gatt; + BluetoothGattServicePtr s; const BluetoothGattCharacteristicPtr soilMoistureCharacteristic; const o<BluetoothGattCharacteristicPtr> temperatureCharacteristic; const o<BluetoothGattCharacteristicPtr> lightCharacteristic; |