aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ble/MusicService.cpp
diff options
context:
space:
mode:
authorRiku Isokoski <riksu9000@gmail.com>2023-03-15 10:18:07 +0200
committerRiku Isokoski <riksu9000@gmail.com>2023-03-19 12:41:01 +0200
commitc7a9b3d7d324b9c6fcf5ad70869c8b5e45267dba (patch)
tree6f89c9a58a087435773170256be470cccc320957 /src/components/ble/MusicService.cpp
parent310ea81eec3bd35e13718dd85e578048ce20eb47 (diff)
MusicService: Remove SystemTask dependency
Diffstat (limited to 'src/components/ble/MusicService.cpp')
-rw-r--r--src/components/ble/MusicService.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/ble/MusicService.cpp b/src/components/ble/MusicService.cpp
index 403c957b..94d97f46 100644
--- a/src/components/ble/MusicService.cpp
+++ b/src/components/ble/MusicService.cpp
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "components/ble/MusicService.h"
-#include "systemtask/SystemTask.h"
+#include "components/ble/NimbleController.h"
#include <cstring>
namespace {
@@ -53,7 +53,7 @@ namespace {
}
}
-Pinetime::Controllers::MusicService::MusicService(Pinetime::System::SystemTask& system) : m_system(system) {
+Pinetime::Controllers::MusicService::MusicService(Pinetime::Controllers::NimbleController& nimble) : nimble(nimble) {
characteristicDefinition[0] = {.uuid = &msEventCharUuid.u,
.access_cb = MusicCallback,
.arg = this,
@@ -212,7 +212,7 @@ int Pinetime::Controllers::MusicService::getTrackLength() const {
void Pinetime::Controllers::MusicService::event(char event) {
auto* om = ble_hs_mbuf_from_flat(&event, 1);
- uint16_t connectionHandle = m_system.nimble().connHandle();
+ uint16_t connectionHandle = nimble.connHandle();
if (connectionHandle == 0 || connectionHandle == BLE_HS_CONN_HANDLE_NONE) {
return;