aboutsummaryrefslogtreecommitdiff
path: root/ble/Bluetooth.cpp
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-03-01 21:15:01 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2015-03-01 21:15:01 +0100
commite64d925b45ff4802fe924ea2e8108bb1932b4d01 (patch)
tree3f9b524c9526834b5830030562e9cb581235f2d6 /ble/Bluetooth.cpp
parent1b09c7d0547fb430e957b863bdbb3bf54c85f52a (diff)
downloadble-toys-e64d925b45ff4802fe924ea2e8108bb1932b4d01.tar.gz
ble-toys-e64d925b45ff4802fe924ea2e8108bb1932b4d01.tar.bz2
ble-toys-e64d925b45ff4802fe924ea2e8108bb1932b4d01.tar.xz
ble-toys-e64d925b45ff4802fe924ea2e8108bb1932b4d01.zip
o Replacing boost::logging with log4cplus.
Diffstat (limited to 'ble/Bluetooth.cpp')
-rw-r--r--ble/Bluetooth.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/ble/Bluetooth.cpp b/ble/Bluetooth.cpp
index 66f97b7..b672dba 100644
--- a/ble/Bluetooth.cpp
+++ b/ble/Bluetooth.cpp
@@ -97,7 +97,7 @@ void AttPdu::makeWrite(ByteBuffer &req, uint16_t handle, const ByteBuffer &bytes
}
vector<AttributeData> AttPdu::parse(ByteBuffer &bytes, AttPduType type) {
- DF << "bytes: " << bytes.toString();
+ // cout << "bytes: " << bytes.toString();
AttPduType t = (AttPduType) bytes.read8();
@@ -114,15 +114,15 @@ vector<AttributeData> AttPdu::parse(ByteBuffer &bytes, AttPduType type) {
}
uint8_t length = bytes.read8();
- D << "length=" << (int) length;
+ // cout << "length=" << (int) length;
size_t count = (bytes.getSize() - 2) / length;
- D << "count=" << count;
+ // cout << "count=" << count;
vector<AttributeData> values;
for (int i = 0; i < count; i++) {
auto data = bytes.view(length);
- D << "data, size=" << data.getSize() << ", bytes=" << data.toString();
+ // cout << "data, size=" << data.getSize() << ", bytes=" << data.toString();
bytes.skip(length);
values.push_back(AttributeData::fromByteBuffer(data));
}
@@ -233,10 +233,10 @@ void shutdown() {
}
uuid_t makeUuid(const uuid_t base, uint8_t a, uint8_t b) {
- uuid_t copy = base;
- copy.data[2] = a;
- copy.data[3] = b;
- return copy;
+ uuid_t c = base;
+ c.data[2] = a;
+ c.data[3] = b;
+ return c;
}
}