aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/SoilMoisture.cpp3
-rw-r--r--apps/ble-bts.cpp2
-rw-r--r--apps/ble-inspect-device.cpp1
3 files changed, 4 insertions, 2 deletions
diff --git a/apps/SoilMoisture.cpp b/apps/SoilMoisture.cpp
index d92752d..03aeb00 100644
--- a/apps/SoilMoisture.cpp
+++ b/apps/SoilMoisture.cpp
@@ -19,6 +19,7 @@ const Uuid temperature_characteristic = makeUuid(bluetooth_base_uuid, 0x2a, 0x1e
const Uuid light_characteristic = makeUuid(trygvis_io_base_uuid, 0x00, 0x12);
using namespace trygvis::bluetooth;
+using std::to_string;
static
ByteBuffer createGetSensorCount() {
@@ -97,7 +98,7 @@ SoilMoisture::SoilMoisture(const shared_ptr<BluetoothGatt> &gatt,
ByteBuffer SoilMoisture::writeAndRead(const BluetoothGattCharacteristicPtr &c, ByteBuffer &requestBytes) {
requestBytes.setCursor(0);
- uint8_t expectedCode = requestBytes.get8(0);
+ uint8_t expectedCode = requestBytes.peek8(0);
gatt->writeValue(c, requestBytes);
diff --git a/apps/ble-bts.cpp b/apps/ble-bts.cpp
index 1e76f60..82d6d43 100644
--- a/apps/ble-bts.cpp
+++ b/apps/ble-bts.cpp
@@ -94,7 +94,7 @@ public:
cout << "bytes " << buf.getSize() << endl;
for (int i = 0; i < buf.getSize(); i++) {
- cout << "byte " << i << " = " << hex << buf.get8(i) << endl;
+ cout << "byte " << i << " = " << hex << buf.peek8(i) << endl;
}
}
};
diff --git a/apps/ble-inspect-device.cpp b/apps/ble-inspect-device.cpp
index 8f85e5c..883faed 100644
--- a/apps/ble-inspect-device.cpp
+++ b/apps/ble-inspect-device.cpp
@@ -26,6 +26,7 @@ public:
cout << "Inspecting device: " << device->getMac().str() << endl;
auto gatt = device->connectGatt();
+ cout << "Connected, discovering services" << endl;
gatt->discoverServices();