Skip to content
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

Ble enhancements#124 #134

Closed
wants to merge 25 commits into from
Closed

Ble enhancements#124 #134

wants to merge 25 commits into from

Conversation

Kampi
Copy link
Collaborator

@Kampi Kampi commented Nov 21, 2023

  • Remove Gadgetbridge code from BLE communication code and split them

Kampi and others added 14 commits November 20, 2023 10:27
- Add "Subject" field to notification object
- Remove length check for notification fields, because empty fields have a length of 0 which causes issues with the string termination

main:
- Rename log level for main in Kconfig
- Add log level for main application
- Use short payload of a notification instead of the long version

Signed-off-by: Daniel Kampert <[email protected]>
- Add log level for Bluetooth code
- Replace include guards with "pragma once"

Template app:
- Add log level for template app

Settings app:
- Add log level for settings app

Signed-off-by: Daniel Kampert <[email protected]>
- Fix compile errors because of multible log tags in Bluetooth code
- Undo auto insertion in settings file by VS Code
- Change log level for notification data to debug
- Update device information in Device Information Service

Misc:
- Add wildcard for debug directory to gitignore to ignore patterns like "debug_rev_1" etc.
- Add BLE connected and disconnected ZBUS event
- Replace "printk" in "ble_comm" with log output
- Remove new line from log output
- Add ZBUS instead of BLE data callback

Misc:
- Replace include guard for managers with "pragma once"
- Add docu header to manager functions
- Format code

Signed-off-by: Daniel Kampert <[email protected]>
- Move Gadgetbridge related code into separate source file
Saves us bunch of RAM not having a seperate on.
Helps with thread safety.
@Kampi
Copy link
Collaborator Author

Kampi commented Nov 21, 2023

Testing draft PR

@Kampi Kampi changed the title Draft:Ble enhancements#124 Ble enhancements#124 Nov 21, 2023
@Kampi Kampi marked this pull request as draft November 21, 2023 18:23
app/src/ble/CMakeLists.txt Outdated Show resolved Hide resolved
app/src/ble/ble_ancs.c Outdated Show resolved Hide resolved
app/src/ble/ble_ancs.c Outdated Show resolved Hide resolved
app/src/events/ble_event.h Outdated Show resolved Hide resolved
app/src/main.c Show resolved Hide resolved
app/src/main.c Outdated Show resolved Hide resolved
- Format code
- Changes from PR

Notifications:
- Improve scrolling
- Add option to add notifications when notification app is active

BLE:

Signed-off-by: Daniel Kampert <[email protected]>
- Add new design for Notifications
- Rework UI
- Remove connected and disconnected event

Notification manager:
- Add ZBUS listener to keep track about new notifications
- Add missing value check for "num_notifications" to prevent boundary issues with the notification buffer

Notifications:
- Rework UI
- Add timestamp field
- Add log levels
- Add notification source "COMMON_MESSENGER", "WHATSAPP" and "COMMON_MAIL"

IAQ app:
- Add log levels

Signed-off-by: Daniel Kampert <[email protected]>
- Add long press to remove a notification
- Add scrolling with animation when notification is removed
- Convert the age into a better time format
- Fix crash when closing notification app with at least one active notification
- Set initial time when building a notification instead setting it to 0
- Change font size for notification body from 14 to 12

Signed-off-by: Daniel Kampert <[email protected]>
@ldab
Copy link
Collaborator

ldab commented Nov 25, 2023

As a side comment, I'm getting tons of whatsapp messages and I don't even have whatsapp on this phone hahaha so something is off

But on the bright side, the "Notification" screen is nice

@Kampi
Copy link
Collaborator Author

Kampi commented Nov 25, 2023

As a side comment, I'm getting tons of whatsapp messages and I don't even have whatsapp on this phone hahaha so something is off

But on the bright side, the "Notification" screen is nice

That´s weird :D
I guess it happens on iOS? Can you please set CONFIG_ZSW_BLE_LOG_LEVEL_DBG=y and CONFIG_NOTIFICATION_APP_LOG_LEVEL_DBG=y so we can figure out where they come from? WhatsApp isn´t added as a notification source in zsw_notification_manager. Only as check in notification_ui.c. So maybe some wrong values.

@jakkra
Copy link
Owner

jakkra commented Nov 25, 2023

As a side comment, I'm getting tons of whatsapp messages and I don't even have whatsapp on this phone hahaha so something is off
But on the bright side, the "Notification" screen is nice

That´s weird :D I guess it happens on iOS? Can you please set CONFIG_ZSW_BLE_LOG_LEVEL_DBG=y and CONFIG_NOTIFICATION_APP_LOG_LEVEL_DBG=y so we can figure out where they come from? WhatsApp isn´t added as a notification source in zsw_notification_manager. Only as check in notification_ui.c. So maybe some wrong values.

Many of mine are also WhatsApp hehe and I don't have it

@Kampi Kampi self-assigned this Nov 26, 2023
@Kampi Kampi added enhancement New feature or request GUI LVGL/UI Related BLE Bluetooth related labels Nov 26, 2023
- Add button to clear all notifications
- Replace text area with label to prevent a focus on the body
- Fix a bug where the last notification out of many can not be removed when the removal starts not at the bottom
- Add "Now" string for notifications with an age of less than 1 minute instead of showing the seconds
- Add notification for WhatsApp

Notification manager:
- Add notification remove channel for ZBUS



Signed-off-by: Daniel Kampert <[email protected]>
@Kampi
Copy link
Collaborator Author

Kampi commented Nov 26, 2023

New update available 👍

  • Improve stability
  • Improve the UI
  • Improve support for long messages via scrolling (also improves the scrolling through the list, because we don´t have an anchor from the text area)

image

@Kampi Kampi marked this pull request as ready for review November 26, 2023 18:27
@Kampi Kampi linked an issue Nov 26, 2023 that may be closed by this pull request
24 tasks
@Kampi Kampi closed this Nov 30, 2023
@Kampi
Copy link
Collaborator Author

Kampi commented Nov 30, 2023

Moved to PR from my fork

@Kampi Kampi deleted the BLE_enhancements#124 branch November 30, 2023 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BLE Bluetooth related enhancement New feature or request GUI LVGL/UI Related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BLE enhancements
3 participants