summaryrefslogtreecommitdiff
path: root/src/components/ble
diff options
context:
space:
mode:
authorAvamander <avamander@gmail.com>2021-11-28 15:33:06 +0200
committerAvamander <avamander@gmail.com>2021-12-04 22:03:40 +0200
commitffb17357e74fd80a0381361a5cbc6bc481d28000 (patch)
tree35ecac9774eb91200d73f2a7ff967ed1290ba709 /src/components/ble
parented6f0aade4db811b5013441c57944baff4528938 (diff)
Fixed a few compilation errors, fixed UUID.
Diffstat (limited to 'src/components/ble')
-rw-r--r--src/components/ble/weather/WeatherData.h4
-rw-r--r--src/components/ble/weather/WeatherService.cpp2
-rw-r--r--src/components/ble/weather/WeatherService.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/components/ble/weather/WeatherData.h b/src/components/ble/weather/WeatherData.h
index 9b424004..19b9709d 100644
--- a/src/components/ble/weather/WeatherData.h
+++ b/src/components/ble/weather/WeatherData.h
@@ -250,7 +250,7 @@ namespace Pinetime {
class Location : public TimelineHeader {
public:
/** Location name */
- std::unique_ptr<std::string> location;
+ std::string location;
/** Altitude relative to sea level in meters */
int16_t altitude;
/** Latitude, EPSG:3857 (Google Maps, Openstreetmaps datum) */
@@ -311,7 +311,7 @@ namespace Pinetime {
* For chemical compounds use the molecular formula e.g. "NO2", "CO2", "O3"
* For pollen use the genus, e.g. "Betula" for birch or "Alternaria" for that mold's spores
*/
- std::unique_ptr<std::string> polluter;
+ std::string polluter;
/**
* Amount of the pollution in SI units,
* otherwise it's going to be difficult to create UI, alerts
diff --git a/src/components/ble/weather/WeatherService.cpp b/src/components/ble/weather/WeatherService.cpp
index 22c80837..bbaa21f0 100644
--- a/src/components/ble/weather/WeatherService.cpp
+++ b/src/components/ble/weather/WeatherService.cpp
@@ -87,7 +87,7 @@ namespace Pinetime {
if (UsefulBuf_IsNULLOrEmptyC(String) != 0) {
return BLE_ATT_ERR_INVALID_ATTR_VALUE_LEN;
}
- airquality->polluter = std::make_unique<std::string>(static_cast<const char*>(String.ptr), String.len);
+ airquality->polluter = std::string(static_cast<const char*>(String.ptr), String.len);
int64_t tmpAmount = 0;
QCBORDecode_GetInt64InMapSZ(&decodeContext, "Amount", &tmpAmount);
if (tmpAmount < 0) {
diff --git a/src/components/ble/weather/WeatherService.h b/src/components/ble/weather/WeatherService.h
index 5504ea49..7bf60ee1 100644
--- a/src/components/ble/weather/WeatherService.h
+++ b/src/components/ble/weather/WeatherService.h
@@ -88,7 +88,7 @@ namespace Pinetime {
// 0003yyxx-78fc-48fe-8e23-433b3a1942d0
static constexpr ble_uuid128_t CharUuid(uint8_t x, uint8_t y) {
return ble_uuid128_t {.u = {.type = BLE_UUID_TYPE_128},
- .value = {0xd0, 0x42, 0x19, 0x3a, 0x3b, 0x43, 0x23, 0x8e, 0xfe, 0x48, 0xfc, 0x78, x, y, 0x03, 0x00}};
+ .value = {0xd0, 0x42, 0x19, 0x3a, 0x3b, 0x43, 0x23, 0x8e, 0xfe, 0x48, 0xfc, 0x78, y, x, 0x03, 0x00}};
}
ble_uuid128_t weatherUuid {BaseUuid()};