aboutsummaryrefslogtreecommitdiff
path: root/sensor
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-06-21 12:27:48 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2015-06-21 12:27:48 +0200
commitf4afc04ee7a085a89ad84ba89344bb50ca9e6e04 (patch)
tree404058c5ffd4773dfe13ddcd7a1cafc39864ae21 /sensor
parent7e2fb834d8ba2eb3fd6453f135d3e8ef30c852c6 (diff)
downloadble-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 'sensor')
-rw-r--r--sensor/include/trygvis/sensor.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sensor/include/trygvis/sensor.h b/sensor/include/trygvis/sensor.h
index bcbd43b..48fb509 100644
--- a/sensor/include/trygvis/sensor.h
+++ b/sensor/include/trygvis/sensor.h
@@ -184,10 +184,12 @@ public:
return values.at(index);
}
- void set(const SampleKey *key, const std::string &value) {
+ SampleRecord& set(const SampleKey *key, const std::string &value) {
values.resize(max(values.size(), key->index + 1));
values.at(key->index).reset(value);
+
+ return *this;
}
template<class A>