Add support for BLE notification (ANS client).
Work In Progress!!!
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user