SystemTask: forward declare BatteryController to fix of cyclic dependency

SystemTask.h included BatteryController.h, and BatteryController.h
included SystemTask.h. If unlucky the class SystemTask isn't created yet
when BatteryController wants to use it.

Fix that cyclic dependency by forward declaring the BatteryController
class and including it in the SystemTask.cpp file, where it is needed.
This commit is contained in:
Reinhold Gschweicher authored and JF committed 2022-02-19 13:17:00 +01:00
1 parent 4aaa3a3b49
commit b857fdb9f4
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -4,6 +4,7 @@
#include <libraries/log/nrf_log.h>
#include "BootloaderVersion.h"
#include "components/battery/BatteryController.h"
#include "components/ble/BleController.h"
#include "drivers/Cst816s.h"
#include "drivers/St7789.h"
+1 -1
View File
@@ -13,7 +13,6 @@
#include <components/motion/MotionController.h>
#include "systemtask/SystemMonitor.h"
#include "components/battery/BatteryController.h"
#include "components/ble/NimbleController.h"
#include "components/ble/NotificationManager.h"
#include "components/motor/MotorController.h"
@@ -47,6 +46,7 @@ namespace Pinetime {
class Hrs3300;
}
namespace Controllers {
class Battery;
class TouchHandler;
class ButtonHandler;
}