summaryrefslogtreecommitdiff
path: root/src/Components/Ble/AlertNotificationService.cpp
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-09-26 15:09:24 (GMT)
committerGitea <gitea@fake.local>2020-09-26 15:09:24 (GMT)
commitb6a910e52ed98b662e6586f45cfe9c6997f8f158 (patch)
treed74185cbf682cde40e5de5bfa2f620ae201565a9 /src/Components/Ble/AlertNotificationService.cpp
parentbe05997272b7b1d1b25b122c8162ac6f4c1c12a2 (diff)
parent3e612e79ba82bac69258094d468c996c41b29612 (diff)
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/Components/Ble/AlertNotificationService.cpp')
-rw-r--r--src/Components/Ble/AlertNotificationService.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Components/Ble/AlertNotificationService.cpp b/src/Components/Ble/AlertNotificationService.cpp
index 0faa17c..ce2f7dd 100644
--- a/src/Components/Ble/AlertNotificationService.cpp
+++ b/src/Components/Ble/AlertNotificationService.cpp
@@ -26,8 +26,8 @@ void AlertNotificationService::Init() {
ASSERT(res == 0);
}
-AlertNotificationService::AlertNotificationService ( Pinetime::System::SystemTask& systemTask, Pinetime::Controllers::NotificationManager& notificationManager ) : m_systemTask{systemTask}, m_notificationManager{notificationManager},
- characteristicDefinition{
+AlertNotificationService::AlertNotificationService ( System::SystemTask& systemTask, NotificationManager& notificationManager )
+ : characteristicDefinition{
{
.uuid = (ble_uuid_t *) &ansCharUuid,
.access_cb = AlertNotificationCallback,
@@ -48,8 +48,7 @@ AlertNotificationService::AlertNotificationService ( Pinetime::System::SystemTas
{
0
},
- }
-{
+ }, m_systemTask{systemTask}, m_notificationManager{notificationManager} {
}
int AlertNotificationService::OnAlert(uint16_t conn_handle, uint16_t attr_handle,
@@ -67,7 +66,7 @@ int AlertNotificationService::OnAlert(uint16_t conn_handle, uint16_t attr_handle
char *s = (char *) &data[3];
auto messageSize = min(maxMessageSize, (bufferSize-3));
- for (int i = 0; i < messageSize-1; i++) {
+ for (uint i = 0; i < messageSize-1; i++) {
if (s[i] == 0x00) {
s[i] = 0x0A;
}