diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2018-11-19 23:13:50 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2018-11-19 23:13:50 +0100 |
commit | e8aa2eadf309fbc0c0e1418c6bee482e505fa09b (patch) | |
tree | e93292292834b8d8959301cd8d02b27090e7e0ca /apps/SoilMoisture.cpp | |
parent | d6f16958eaa966332b911eb9257b8524c2efd772 (diff) | |
download | ble-toys-e8aa2eadf309fbc0c0e1418c6bee482e505fa09b.tar.gz ble-toys-e8aa2eadf309fbc0c0e1418c6bee482e505fa09b.tar.bz2 ble-toys-e8aa2eadf309fbc0c0e1418c6bee482e505fa09b.tar.xz ble-toys-e8aa2eadf309fbc0c0e1418c6bee482e505fa09b.zip |
ble-read-characteristic: working READ mode, starting on NOTIFY.
Diffstat (limited to 'apps/SoilMoisture.cpp')
-rw-r--r-- | apps/SoilMoisture.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/apps/SoilMoisture.cpp b/apps/SoilMoisture.cpp index 79f168f..d7c03bb 100644 --- a/apps/SoilMoisture.cpp +++ b/apps/SoilMoisture.cpp @@ -4,23 +4,21 @@ namespace trygvis { namespace sensor { -#define BLUETOOTH_UUID_INITIALIZER \ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb }; +using namespace trygvis::bluetooth; +using std::to_string; +using std::bitset; Uuid trygvis_io_base_uuid = {0x32, 0xd0, 0x00, 0x00, 0x03, 0x5d, 0x59, 0xc5, 0x70, 0xd3, 0xbc, 0x8e, 0x4a, 0x1f, 0xd8, 0x3f}; Uuid bluetooth_base_uuid = - {0x00, 0x00, 0x18, 0x0f, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb}; + {0x00, 0x00, 0, 0, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb}; const Uuid soil_moisture_service = makeUuid(trygvis_io_base_uuid, 0x00, 0x10); const Uuid soil_moisture_characteristic = makeUuid(trygvis_io_base_uuid, 0x00, 0x11); 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 void createGetSensorCount(ByteBuffer &buffer) { buffer |