-
Notifications
You must be signed in to change notification settings - Fork 0
Ancs ble fixes #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ancs
Are you sure you want to change the base?
Ancs ble fixes #20
Changes from all commits
96eebee
8563252
bd796e1
671166b
d52638d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -237,8 +237,13 @@ void SystemTask::Work() { | |
| break; | ||
| case Messages::BleConnected: | ||
| displayApp.PushMessage(Pinetime::Applications::Display::Messages::NotifyDeviceActivity); | ||
| isBleDiscoveryTimerRunning = true; | ||
| bleDiscoveryTimer = 5; | ||
| isBleDiscoveryStarted = false; | ||
| break; | ||
| case Messages::BleStartDiscovery: | ||
| if (!isBleDiscoveryStarted) { | ||
| isBleDiscoveryStarted = true; | ||
| nimbleController.StartDiscovery(); | ||
| } | ||
|
Comment on lines
-240
to
+246
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My one concern with this change is that only the success case is explicitly covered in the code. When the |
||
| break; | ||
| case Messages::BleFirmwareUpdateStarted: | ||
| GoToRunning(); | ||
|
|
@@ -380,16 +385,6 @@ void SystemTask::Work() { | |
| elapsed = xTaskGetTickCount() - lastStateUpdate; | ||
| if (elapsed >= stateUpdatePeriod) { | ||
| UpdateMotion(); | ||
| if (isBleDiscoveryTimerRunning) { | ||
| if (bleDiscoveryTimer == 0) { | ||
| isBleDiscoveryTimerRunning = false; | ||
| // Services discovery is deferred from 3 seconds to avoid the conflicts between the host communicating with the | ||
| // target and vice-versa. I'm not sure if this is the right way to handle this... | ||
| nimbleController.StartDiscovery(); | ||
| } else { | ||
| bleDiscoveryTimer--; | ||
| } | ||
| } | ||
| monitor.Process(); | ||
| NoInit_BackUpTime = dateTimeController.CurrentDateTime(); | ||
| if (nrf_gpio_pin_read(PinMap::Button) == 0) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment no longer true?