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 #129

Merged
merged 5 commits into from
Nov 20, 2023
Merged

Ble enhancements#124 #129

merged 5 commits into from
Nov 20, 2023

Conversation

Kampi
Copy link
Collaborator

@Kampi Kampi commented Nov 20, 2023

BLE:

  • 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
  • Add log level for Bluetooth code
  • Replace include guards with "pragma once"

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

Template app:

  • Add log level for template app

Settings app:

  • Add log level for settings app

- 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]>
@Kampi Kampi linked an issue Nov 20, 2023 that may be closed by this pull request
24 tasks
- 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
@@ -220,6 +231,13 @@ static void on_pairing_enable_changed(lv_setting_value_t value, bool final)
{
if (final) {
ble_comm_set_pairable(true);

if (!k_work_delayable_is_pending(&ble_pairing_dwork)) {
Copy link
Owner

@jakkra jakkra Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can replace all of this with one in the top of file:
K_WORK_DELAYABLE_DEFINE(ble_pairing_dwork, ble_pairing_work_handler)

And then always call k_work_reschedule here, I think it will schedule if not already scheduled, and re-schedule i.e. prolong to 60s if timer already running.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

@@ -353,7 +353,7 @@ static void open_notification_popup(void *data)
lv_group_set_default(temp_group);
lv_indev_set_group(enc_indev, temp_group);
zsw_vibration_run_pattern(ZSW_VIBRATION_PATTERN_NOTIFICATION);
zsw_notification_popup_show(not->title, not->body, not->src, not->id, on_popup_notifcation_closed, 10);
zsw_notification_popup_show(not->title, not->sender, not->src, not->id, on_popup_notifcation_closed, 10);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sender is body? What changes here?

Copy link
Collaborator Author

@Kampi Kampi Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shortens the message that is shown in the notification preview. So you don´t have the full text here. Instead, there is shown something like "ABCDE12345678..."

PXL_20231119_123931602

@jakkra jakkra merged commit 6b5b2d0 into main Nov 20, 2023
16 checks passed
@jakkra jakkra deleted the BLE_enhancements#124 branch November 20, 2023 17:52
@Kampi Kampi removed a link to an issue Nov 20, 2023
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants