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

Apple Notification Center Service - iOS #115

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Build firmware for iOS
working-directory: ZSWatch
run: |
west build app --build-dir ${{ matrix.board }}_${{ matrix.built_type }}_ios -p -b ${{ matrix.board }} -- -DOVERLAY_CONFIG=boards/${{ matrix.built_type }}.conf -DCONFIG_BLE_USES_AMS="y"
west build app --build-dir ${{ matrix.board }}_${{ matrix.built_type }}_ios -p -b ${{ matrix.board }} -- -DOVERLAY_CONFIG=boards/${{ matrix.built_type }}.conf -DCONFIG_BLE_USES_IOS="y"
cd ${{ matrix.board }}_${{ matrix.built_type }}/zephyr
mv zephyr.hex ${{ matrix.board }}_${{ matrix.built_type }}.hex || true

Expand Down
3 changes: 2 additions & 1 deletion app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ target_sources(app PRIVATE src/ble/ble_aoa.c)
target_sources(app PRIVATE src/ble/ble_comm.c)
target_sources(app PRIVATE src/ble/ble_transport.c)
target_sources(app PRIVATE src/ble/zsw_gatt_sensor_server.c)
target_sources_ifdef(CONFIG_BLE_USES_AMS app PRIVATE src/ble/ble_ams.c)
target_sources_ifdef(CONFIG_BLE_USES_IOS app PRIVATE src/ble/ble_ams.c)
target_sources_ifdef(CONFIG_BLE_USES_IOS app PRIVATE src/ble/ble_ancs.c)

target_sources(app PRIVATE src/sensors/zsw_imu.c)
target_sources(app PRIVATE src/sensors/zsw_pressure_sensor.c)
Expand Down
6 changes: 4 additions & 2 deletions app/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,12 @@ menu "ZSWatch"

config BLE_USES_GADGETBRIDGE
prompt "Smartphone interaction and notifications uses Gadgetbridge"
config BLE_USES_AMS
prompt "Smartphone uses Apple Media Service Client"
config BLE_USES_IOS
prompt "Smartphone uses Apple Services Client"
select BT_GATTP
select BT_GATT_DM
select BT_AMS_CLIENT
select BT_ANCS_CLIENT
endchoice

endmenu
Expand Down
6 changes: 3 additions & 3 deletions app/src/applications/music_control/music_control_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <zsw_clock.h>
#include <zephyr/zbus/zbus.h>

#ifdef CONFIG_BLE_USES_AMS
#ifdef CONFIG_BLE_USES_IOS
#include "ble/ble_ams.h"
#endif

Expand Down Expand Up @@ -85,7 +85,7 @@ static void on_music_ui_evt_music(music_control_ui_evt_type_t evt_type)
ble_comm_send(buf, msg_len);
}

#elif defined(CONFIG_BLE_USES_AMS)
#elif defined(CONFIG_BLE_USES_IOS)

switch (evt_type) {
case MUSIC_CONTROL_UI_CLOSE:
Expand All @@ -105,7 +105,7 @@ static void on_music_ui_evt_music(music_control_ui_evt_type_t evt_type)
break;
}

#endif // CONFIG_BLE_USES_AMS
#endif // CONFIG_BLE_USES_IOS
}

static void zbus_ble_comm_data_callback(const struct zbus_channel *chan)
Expand Down
Loading