WeatherService: Remove unused SystemTask reference

This commit is contained in:
Riku Isokoski 2023-03-15 10:19:30 +02:00
parent c7a9b3d7d3
commit 7e15a1e340
3 changed files with 3 additions and 10 deletions

View file

@ -43,7 +43,7 @@ NimbleController::NimbleController(Pinetime::System::SystemTask& systemTask,
alertNotificationClient {systemTask, notificationManager}, alertNotificationClient {systemTask, notificationManager},
currentTimeService {dateTimeController}, currentTimeService {dateTimeController},
musicService {*this}, musicService {*this},
weatherService {systemTask, dateTimeController}, weatherService {dateTimeController},
navService {systemTask}, navService {systemTask},
batteryInformationService {batteryController}, batteryInformationService {batteryController},
immediateAlertService {systemTask, notificationManager}, immediateAlertService {systemTask, notificationManager},

View file

@ -19,7 +19,6 @@
#include <qcbor/qcbor_spiffy_decode.h> #include <qcbor/qcbor_spiffy_decode.h>
#include "WeatherService.h" #include "WeatherService.h"
#include "libs/QCBOR/inc/qcbor/qcbor.h" #include "libs/QCBOR/inc/qcbor/qcbor.h"
#include "systemtask/SystemTask.h"
int WeatherCallback(uint16_t /*connHandle*/, uint16_t /*attrHandle*/, struct ble_gatt_access_ctxt* ctxt, void* arg) { int WeatherCallback(uint16_t /*connHandle*/, uint16_t /*attrHandle*/, struct ble_gatt_access_ctxt* ctxt, void* arg) {
return static_cast<Pinetime::Controllers::WeatherService*>(arg)->OnCommand(ctxt); return static_cast<Pinetime::Controllers::WeatherService*>(arg)->OnCommand(ctxt);
@ -27,8 +26,7 @@ int WeatherCallback(uint16_t /*connHandle*/, uint16_t /*attrHandle*/, struct ble
namespace Pinetime { namespace Pinetime {
namespace Controllers { namespace Controllers {
WeatherService::WeatherService(System::SystemTask& system, DateTime& dateTimeController) WeatherService::WeatherService(DateTime& dateTimeController) : dateTimeController(dateTimeController) {
: system(system), dateTimeController(dateTimeController) {
nullHeader = &nullTimelineheader; nullHeader = &nullTimelineheader;
nullTimelineheader->timestamp = 0; nullTimelineheader->timestamp = 0;
} }

View file

@ -36,15 +36,11 @@
int WeatherCallback(uint16_t connHandle, uint16_t attrHandle, struct ble_gatt_access_ctxt* ctxt, void* arg); int WeatherCallback(uint16_t connHandle, uint16_t attrHandle, struct ble_gatt_access_ctxt* ctxt, void* arg);
namespace Pinetime { namespace Pinetime {
namespace System {
class SystemTask;
}
namespace Controllers { namespace Controllers {
class WeatherService { class WeatherService {
public: public:
explicit WeatherService(System::SystemTask& system, DateTime& dateTimeController); explicit WeatherService(DateTime& dateTimeController);
void Init(); void Init();
@ -133,7 +129,6 @@ namespace Pinetime {
uint16_t eventHandle {}; uint16_t eventHandle {};
Pinetime::System::SystemTask& system;
Pinetime::Controllers::DateTime& dateTimeController; Pinetime::Controllers::DateTime& dateTimeController;
std::vector<std::unique_ptr<WeatherData::TimelineHeader>> timeline; std::vector<std::unique_ptr<WeatherData::TimelineHeader>> timeline;