Add support for BLE notification (ANS client).

Work In Progress!!!
This commit is contained in:
JF
2020-03-25 21:23:40 +01:00
parent 7e9a7e4d5f
commit 68240704c7
13 changed files with 346 additions and 12 deletions

View File

@@ -35,7 +35,7 @@ void SystemTask::Work() {
watchdog.Start();
NRF_LOG_INFO("Last reset reason : %s", Pinetime::Drivers::Watchdog::ResetReasonToString(watchdog.ResetReason()));
APP_GPIOTE_INIT(2);
bool erase_bonds=false;
bool erase_bonds=true;
ble_manager_init_peer_manager();
nrf_sdh_freertos_init(ble_manager_start_advertising, &erase_bonds);
@@ -84,6 +84,12 @@ void SystemTask::Work() {
NRF_LOG_INFO("[SystemTask] Going to sleep");
displayApp->PushMessage(Pinetime::Applications::DisplayApp::Messages::GoToSleep);
isSleeping = true; break;
case Messages::OnNewTime:
displayApp->PushMessage(Pinetime::Applications::DisplayApp::Messages::UpdateDateTime);
break;
case Messages::OnNewNotification:
displayApp->PushMessage(Pinetime::Applications::DisplayApp::Messages::NewNotification);
break;
default: break;
}
}

View File

@@ -13,7 +13,8 @@ namespace Pinetime {
namespace System {
class SystemTask {
public:
enum class Messages {GoToSleep, GoToRunning};
enum class Messages {GoToSleep, GoToRunning, OnNewTime, OnNewNotification
};
SystemTask(Pinetime::Drivers::SpiMaster& spi,
Pinetime::Drivers::St7789& lcd,