Fully implement music app and service

SystemTask can return a reference to the nimbleController
The nimbleController can return a reference to the musicService
The musicService get a connection handle from the nimbleController
The musicApp communicated directly with the musicService
This commit is contained in:
Adam Pigg
2020-07-20 21:28:21 +01:00
parent 686e826f4e
commit 5713eac104
8 changed files with 61 additions and 20 deletions

View File

@@ -16,6 +16,7 @@ namespace Pinetime {
}
namespace Controllers {
class DateTime;
class NimbleController {
public:
@@ -39,6 +40,8 @@ namespace Pinetime {
Pinetime::Controllers::MusicService& music() {return musicService;};
uint16_t connHandle();
private:
static constexpr char* deviceName = "Pinetime-JF";
Pinetime::System::SystemTask& systemTask;
@@ -56,7 +59,7 @@ namespace Pinetime {
MusicService musicService;
uint8_t addrType; // 1 = Random, 0 = PUBLIC
uint16_t connectionHandle;
uint16_t connectionHandle = 0;
ble_uuid128_t dfuServiceUuid {
.u { .type = BLE_UUID_TYPE_128},