Fixed a few compilation errors, fixed UUID.
This commit is contained in:
parent
ed6f0aade4
commit
ffb17357e7
|
@ -250,7 +250,7 @@ namespace Pinetime {
|
||||||
class Location : public TimelineHeader {
|
class Location : public TimelineHeader {
|
||||||
public:
|
public:
|
||||||
/** Location name */
|
/** Location name */
|
||||||
std::unique_ptr<std::string> location;
|
std::string location;
|
||||||
/** Altitude relative to sea level in meters */
|
/** Altitude relative to sea level in meters */
|
||||||
int16_t altitude;
|
int16_t altitude;
|
||||||
/** Latitude, EPSG:3857 (Google Maps, Openstreetmaps datum) */
|
/** 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 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
|
* 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,
|
* Amount of the pollution in SI units,
|
||||||
* otherwise it's going to be difficult to create UI, alerts
|
* otherwise it's going to be difficult to create UI, alerts
|
||||||
|
|
|
@ -87,7 +87,7 @@ namespace Pinetime {
|
||||||
if (UsefulBuf_IsNULLOrEmptyC(String) != 0) {
|
if (UsefulBuf_IsNULLOrEmptyC(String) != 0) {
|
||||||
return BLE_ATT_ERR_INVALID_ATTR_VALUE_LEN;
|
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;
|
int64_t tmpAmount = 0;
|
||||||
QCBORDecode_GetInt64InMapSZ(&decodeContext, "Amount", &tmpAmount);
|
QCBORDecode_GetInt64InMapSZ(&decodeContext, "Amount", &tmpAmount);
|
||||||
if (tmpAmount < 0) {
|
if (tmpAmount < 0) {
|
||||||
|
|
|
@ -88,7 +88,7 @@ namespace Pinetime {
|
||||||
// 0003yyxx-78fc-48fe-8e23-433b3a1942d0
|
// 0003yyxx-78fc-48fe-8e23-433b3a1942d0
|
||||||
static constexpr ble_uuid128_t CharUuid(uint8_t x, uint8_t y) {
|
static constexpr ble_uuid128_t CharUuid(uint8_t x, uint8_t y) {
|
||||||
return ble_uuid128_t {.u = {.type = BLE_UUID_TYPE_128},
|
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()};
|
ble_uuid128_t weatherUuid {BaseUuid()};
|
||||||
|
|
|
@ -1,14 +1,26 @@
|
||||||
|
/* Copyright (C) 2021 Avamander
|
||||||
|
|
||||||
|
This file is part of InfiniTime.
|
||||||
|
|
||||||
|
InfiniTime is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published
|
||||||
|
by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
InfiniTime is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
#include "Weather.h"
|
#include "Weather.h"
|
||||||
#include <lvgl/lvgl.h>
|
#include <lvgl/lvgl.h>
|
||||||
#include <components/ble/weather/WeatherService.h>
|
#include <components/ble/weather/WeatherService.h>
|
||||||
#include "../DisplayApp.h"
|
|
||||||
#include "Label.h"
|
#include "Label.h"
|
||||||
#include "Version.h"
|
|
||||||
#include "components/battery/BatteryController.h"
|
#include "components/battery/BatteryController.h"
|
||||||
#include "components/ble/BleController.h"
|
#include "components/ble/BleController.h"
|
||||||
#include "components/brightness/BrightnessController.h"
|
|
||||||
#include "components/datetime/DateTimeController.h"
|
|
||||||
#include "drivers/Watchdog.h"
|
|
||||||
#include "components/ble/weather/WeatherData.h"
|
#include "components/ble/weather/WeatherData.h"
|
||||||
|
|
||||||
using namespace Pinetime::Applications::Screens;
|
using namespace Pinetime::Applications::Screens;
|
||||||
|
@ -41,11 +53,10 @@ Weather::~Weather() {
|
||||||
lv_obj_clean(lv_scr_act());
|
lv_obj_clean(lv_scr_act());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Weather::Refresh() {
|
void Weather::Refresh() {
|
||||||
if (running) {
|
if (running) {
|
||||||
screens.Refresh();
|
// screens.Refresh();
|
||||||
}
|
}
|
||||||
return running;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Weather::OnButtonPushed() {
|
bool Weather::OnButtonPushed() {
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
~Weather() override;
|
~Weather() override;
|
||||||
|
|
||||||
bool Refresh() override;
|
void Refresh() override;
|
||||||
|
|
||||||
bool OnButtonPushed() override;
|
bool OnButtonPushed() override;
|
||||||
|
|
||||||
|
@ -42,4 +42,4 @@ namespace Pinetime {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue