Skip to content

Commit

Permalink
Replace gadget bridge on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
ldab committed Aug 6, 2024
1 parent f7347e1 commit 8a58551
Show file tree
Hide file tree
Showing 7 changed files with 138 additions and 5 deletions.
1 change: 1 addition & 0 deletions app/src/applications/notification/ui_export/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ SET(SOURCES
images/ui_img_call_png.c
images/ui_img_mail_png.c
images/ui_img_gadget_png.c
images/ui_img_apple.c
images/ui_img_youtube_png.c
images/ui_img_homeassistant_png.c
images/ui_img_whatsapp_png.c
Expand Down
111 changes: 111 additions & 0 deletions app/src/applications/notification/ui_export/images/ui_img_apple.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
#ifdef __has_include
#if __has_include("lvgl.h")
#ifndef LV_LVGL_H_INCLUDE_SIMPLE
#define LV_LVGL_H_INCLUDE_SIMPLE
#endif
#endif
#endif

#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif


#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif

#ifndef LV_ATTRIBUTE_IMG_UI_IMG_APPLE
#define LV_ATTRIBUTE_IMG_UI_IMG_APPLE
#endif

const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_UI_IMG_APPLE uint8_t ui_img_apple_map[] = {
#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
/*Pixel format: Red: 3 bit, Green: 3 bit, Blue: 2 bit*/
0x00, 0x00, 0x00, 0x00, 0x24, 0x48, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x70, 0x70, 0x94, 0x28, 0x00, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x90, 0x94, 0x6c, 0x70, 0x20, 0x64, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x48, 0xb8, 0x4c, 0x6c, 0x68, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x40, 0x84, 0xa9, 0x88, 0x24, 0x04, 0x44, 0x40, 0x84, 0xa5, 0x84, 0x40, 0x00, 0x00,
0x00, 0x20, 0xcd, 0xf7, 0xf2, 0xe9, 0xe9, 0xc9, 0xc9, 0xe9, 0xe9, 0xe9, 0xe9, 0xc4, 0x40, 0x00,
0x00, 0x44, 0xf7, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0x64, 0x00,
0x00, 0x84, 0xf6, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0x64, 0x00,
0x00, 0xa9, 0xf2, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0x84, 0x00,
0x00, 0x84, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0x84, 0x00,
0x00, 0x64, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0x64, 0x00,
0x00, 0x40, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0x40, 0x00,
0x00, 0x20, 0x84, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0x84, 0x20, 0x00,
0x00, 0x00, 0x20, 0xc9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xa4, 0x40, 0x00, 0x00,
0x00, 0x00, 0x00, 0x20, 0xc9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xa4, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x20, 0x64, 0x64, 0x20, 0x20, 0x64, 0x64, 0x40, 0x00, 0x00, 0x00, 0x00,
#endif
#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP == 0
/*Pixel format: Red: 5 bit, Green: 6 bit, Blue: 5 bit*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x21, 0x20, 0x3a, 0xc0, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x63, 0xa0, 0x63, 0x60, 0x95, 0xc0, 0x31, 0x00, 0x00, 0x81, 0x20, 0xc2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x74, 0xa0, 0x84, 0x20, 0x5b, 0x00, 0x6c, 0x61, 0x18, 0x63, 0x59, 0x61, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x9d, 0xe0, 0x52, 0x60, 0x5b, 0xa3, 0x59, 0x81, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x61, 0x38, 0x44, 0x79, 0x07, 0xaa, 0x83, 0x71, 0x60, 0x31, 0x80, 0x10, 0xe2, 0x38, 0x81, 0x30, 0x23, 0x79, 0x65, 0xa9, 0xe3, 0x78, 0x82, 0x40, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x61, 0x28, 0xca, 0xca, 0x75, 0xfd, 0xad, 0xfb, 0x27, 0xfa, 0x27, 0xf2, 0xa5, 0xb9, 0xa5, 0xb9, 0x27, 0xf2, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x24, 0xb1, 0x82, 0x40, 0x00, 0x00,
0x00, 0x00, 0xa2, 0x48, 0x75, 0xfd, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0xe6, 0xf1, 0x82, 0x50, 0x00, 0x00,
0x00, 0x00, 0x03, 0x79, 0xf2, 0xfc, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xf2, 0xa2, 0x70, 0x00, 0x00,
0x00, 0x00, 0xa5, 0x99, 0x71, 0xfc, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0xc3, 0x80, 0x00, 0x00,
0x00, 0x00, 0x24, 0x89, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0xa2, 0x78, 0x00, 0x00,
0x00, 0x00, 0xc3, 0x58, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x06, 0xf2, 0x82, 0x58, 0x00, 0x00,
0x00, 0x00, 0x81, 0x38, 0x06, 0xf2, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x85, 0xd9, 0x82, 0x48, 0x00, 0x00,
0x00, 0x00, 0x61, 0x10, 0x23, 0x81, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x07, 0xf2, 0xa3, 0x70, 0x61, 0x20, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x61, 0x30, 0xa5, 0xc1, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x24, 0xa9, 0x82, 0x40, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x30, 0xa5, 0xb9, 0x27, 0xfa, 0x27, 0xfa, 0x07, 0xf2, 0x07, 0xf2, 0x27, 0xfa, 0x27, 0xfa, 0x24, 0xa9, 0x82, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x30, 0xc2, 0x50, 0xc2, 0x50, 0x61, 0x30, 0x61, 0x30, 0xc2, 0x58, 0xa2, 0x58, 0x82, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
#endif
#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP != 0
/*Pixel format: Red: 5 bit, Green: 6 bit, Blue: 5 bit BUT the 2 bytes are swapped*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x20, 0x3a, 0x20, 0x31, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0xa0, 0x63, 0xa0, 0x95, 0x60, 0x31, 0xc0, 0x00, 0x00, 0x20, 0x81, 0x30, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x40, 0x84, 0xa0, 0x5b, 0x20, 0x6c, 0x00, 0x18, 0x61, 0x59, 0x63, 0x20, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x9d, 0x80, 0x52, 0xe0, 0x5b, 0x60, 0x59, 0xa3, 0x18, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x38, 0x61, 0x79, 0x44, 0xaa, 0x07, 0x71, 0x83, 0x31, 0x60, 0x10, 0x80, 0x38, 0xe2, 0x30, 0x81, 0x79, 0x23, 0xa9, 0x65, 0x78, 0xe3, 0x40, 0x82, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x28, 0x61, 0xca, 0xca, 0xfd, 0x75, 0xfb, 0xad, 0xfa, 0x27, 0xf2, 0x27, 0xb9, 0xa5, 0xb9, 0xa5, 0xf2, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xb1, 0x24, 0x40, 0x82, 0x00, 0x00,
0x00, 0x00, 0x48, 0xa2, 0xfd, 0x75, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xf1, 0xe6, 0x50, 0x82, 0x00, 0x00,
0x00, 0x00, 0x79, 0x03, 0xfc, 0xf2, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xf2, 0x27, 0x70, 0xa2, 0x00, 0x00,
0x00, 0x00, 0x99, 0xa5, 0xfc, 0x71, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0x80, 0xc3, 0x00, 0x00,
0x00, 0x00, 0x89, 0x24, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0x78, 0xa2, 0x00, 0x00,
0x00, 0x00, 0x58, 0xc3, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xf2, 0x06, 0x58, 0x82, 0x00, 0x00,
0x00, 0x00, 0x38, 0x81, 0xf2, 0x06, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xd9, 0x85, 0x48, 0x82, 0x00, 0x00,
0x00, 0x00, 0x10, 0x61, 0x81, 0x23, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xf2, 0x07, 0x70, 0xa3, 0x20, 0x61, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x30, 0x61, 0xc1, 0xa5, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xfa, 0x27, 0xa9, 0x24, 0x40, 0x82, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x61, 0xb9, 0xa5, 0xfa, 0x27, 0xfa, 0x27, 0xf2, 0x07, 0xf2, 0x07, 0xfa, 0x27, 0xfa, 0x27, 0xa9, 0x24, 0x40, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x81, 0x50, 0xc2, 0x50, 0xc2, 0x30, 0x61, 0x30, 0x61, 0x58, 0xc2, 0x58, 0xa2, 0x40, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
#endif
#if LV_COLOR_DEPTH == 32
/*Pixel format: Fix 0xFF: 8 bit, Red: 8 bit, Green: 8 bit, Blue: 8 bit*/
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x25, 0x1f, 0xff, 0x00, 0x42, 0x38, 0xff, 0x00, 0x38, 0x2e, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x74, 0x62, 0xff, 0x00, 0x75, 0x62, 0xff, 0x00, 0xab, 0x8f, 0xff, 0x00, 0x37, 0x2f, 0xff, 0x00, 0x00, 0x00, 0xff, 0x09, 0x11, 0x21, 0xff, 0x0c, 0x16, 0x2c, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x88, 0x72, 0xff, 0x00, 0x94, 0x7c, 0xff, 0x00, 0x65, 0x54, 0xff, 0x00, 0x81, 0x6b, 0xff, 0x05, 0x0c, 0x15, 0xff, 0x19, 0x2d, 0x57, 0xff, 0x08, 0x0d, 0x1c, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x40, 0x36, 0xff, 0x00, 0xb1, 0x94, 0xff, 0x00, 0x5b, 0x4c, 0xff, 0x00, 0x6b, 0x5a, 0xff, 0x18, 0x32, 0x5a, 0xff, 0x06, 0x0e, 0x1b, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x0a, 0x0d, 0x35, 0xff, 0x1e, 0x26, 0x7b, 0xff, 0x35, 0x3f, 0xa9, 0xff, 0x16, 0x30, 0x73, 0xff, 0x02, 0x2c, 0x2e, 0xff, 0x00, 0x10, 0x0e, 0xff, 0x0e, 0x1a, 0x34, 0xff, 0x0a, 0x0f, 0x31, 0xff, 0x1a, 0x22, 0x7a, 0xff, 0x24, 0x2b, 0xa6, 0xff, 0x17, 0x1a, 0x74, 0xff, 0x0d, 0x0e, 0x43, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x0a, 0x0c, 0x2b, 0xff, 0x4c, 0x56, 0xc8, 0xff, 0xa5, 0xab, 0xf4, 0xff, 0x69, 0x74, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x34, 0x42, 0xf0, 0xff, 0x28, 0x33, 0xb7, 0xff, 0x27, 0x33, 0xb7, 0xff, 0x34, 0x42, 0xf0, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x1f, 0x24, 0xb0, 0xff, 0x0c, 0x0f, 0x41, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x0f, 0x14, 0x4a, 0xff, 0xa6, 0xac, 0xf4, 0xff, 0x37, 0x44, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x31, 0x3c, 0xec, 0xff, 0x0d, 0x10, 0x50, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x1a, 0x21, 0x77, 0xff, 0x93, 0x9a, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x42, 0xf3, 0xff, 0x11, 0x12, 0x6c, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x2b, 0x34, 0x96, 0xff, 0x85, 0x8d, 0xf5, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x15, 0x17, 0x83, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x1d, 0x25, 0x87, 0xff, 0x37, 0x45, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x13, 0x15, 0x77, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x15, 0x19, 0x5a, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x33, 0x3f, 0xee, 0xff, 0x10, 0x11, 0x5b, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x0b, 0x0e, 0x36, 0xff, 0x33, 0x41, 0xec, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x29, 0x30, 0xd8, 0xff, 0x0d, 0x0f, 0x46, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x0b, 0x0b, 0x11, 0xff, 0x1a, 0x22, 0x7d, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x34, 0x41, 0xf2, 0xff, 0x14, 0x15, 0x70, 0xff, 0x0b, 0x0b, 0x1c, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x0a, 0x0c, 0x2f, 0xff, 0x29, 0x34, 0xbe, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x42, 0xf4, 0xff, 0x1e, 0x22, 0xa8, 0xff, 0x0c, 0x0f, 0x3f, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x0a, 0x0d, 0x2e, 0xff, 0x28, 0x33, 0xb7, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x34, 0x41, 0xee, 0xff, 0x34, 0x41, 0xee, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x35, 0x43, 0xf4, 0xff, 0x1e, 0x23, 0xa5, 0xff, 0x0c, 0x0e, 0x3e, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x0b, 0x0f, 0x2f, 0xff, 0x13, 0x17, 0x53, 0xff, 0x13, 0x17, 0x53, 0xff, 0x0a, 0x0d, 0x2e, 0xff, 0x0a, 0x0d, 0x2e, 0xff, 0x12, 0x16, 0x54, 0xff, 0x10, 0x13, 0x56, 0xff, 0x0c, 0x0f, 0x42, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
#endif
};

const lv_img_dsc_t ui_img_apple = {
.header.cf = LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 16,
.header.h = 16,
.data_size = 256 * LV_COLOR_SIZE / 8,
.data = ui_img_apple_map,
};
5 changes: 5 additions & 0 deletions app/src/ble/ble_ancs.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,11 @@ static int gattp_init(void)
return bt_gattp_init(&gattp);
}

bool ble_ancs_present(void)
{
return atomic_test_bit(&discovery_flags, DISCOVERY_ANCS_SUCCEEDED);
}

int ble_ancs_init(void)
{
int err = bt_ancs_client_init(&ancs_c);
Expand Down
12 changes: 11 additions & 1 deletion app/src/ble/ble_ancs.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,14 @@
#include <zephyr/kernel.h>
#include "ble/ble_comm.h"

int ble_ancs_init(void);
/**
* @brief Init Apple Notification Center Service, ANCS
*/
int ble_ancs_init(void);

/**
* @brief Check if ANCS service is present on the device connected to the watch
*
* @return true if ANCS is present
*/
bool ble_ancs_present(void);
4 changes: 2 additions & 2 deletions app/src/images/binaries/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# External SPI Flash resource storage
Normally try to put all resources in external flash as they quickly fill up the internal flash. This is however
only possible on ZSWatch v4 and later which have external flash on QSPI (fast).
only possible on ZSWatch v3 and later. It can be disabled by `CONFIG_STORE_IMAGES_EXTERNAL_FLASH=n` configuration.
To be compatible with both with and without QSPI flash the code need to use the following macros for declaring images:

Use `ZSW_LV_IMG_DECLARE(file_name)` instead of LVGL's `LV_IMG_DECLARE(file_name)`.<br>
Use `ZSW_LV_IMG_USE(file_name)` instead of `lv_img_set_src(img, &file_name)`.

Those two macros will automatically pick the file from internal flash if no QSPI flash and from QSPI flash if ZSWatch version supports it.
Those two macros will automatically pick the file from internal flash if ZSWatch version supports it.
You do however need to convert the image both to `.c` and `.bin` to use this approach right now and place the `.c` in `app/src/images/` folder and the .`bin` in `app/src/images/binaries/lvgl_lfs`

If the resource is big and always shall be in external flash just do `lv_img_set_src(img, "/lvgl_lfs/filename.bin")`
Expand Down
Binary file added app/src/images/binaries/S/ui_img_apple.bin
Binary file not shown.
10 changes: 8 additions & 2 deletions app/src/ui/utils/zsw_ui_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include <lvgl.h>
#include "utils/zsw_ui_utils.h"
#include "ble/ble_ancs.h"
#include "managers/zsw_notification_manager.h"
#include <lvgl.h>

#if CONFIG_WATCHFACE_BACKGROUND_SPACE
ZSW_LV_IMG_DECLARE(space_blur_bg);
Expand All @@ -44,6 +45,7 @@ LV_IMG_DECLARE(unknown);

ZSW_LV_IMG_DECLARE(ui_img_call_png);
ZSW_LV_IMG_DECLARE(ui_img_gadget_png);
ZSW_LV_IMG_DECLARE(ui_img_apple);
ZSW_LV_IMG_DECLARE(ui_img_mail_png);
ZSW_LV_IMG_DECLARE(ui_img_whatsapp_png);
ZSW_LV_IMG_DECLARE(ui_img_trash_png);
Expand Down Expand Up @@ -333,7 +335,11 @@ const void *zsw_ui_utils_icon_from_notification(zsw_notification_src_t src)
case NOTIFICATION_SRC_CALENDAR:
return ZSW_LV_IMG_USE(google_calendar_icon);
default:
return ZSW_LV_IMG_USE(ui_img_gadget_png);
if (ble_ancs_present()) {
return ZSW_LV_IMG_USE(ui_img_apple);
} else {
return ZSW_LV_IMG_USE(ui_img_gadget_png);
}
}
}

Expand Down

0 comments on commit 8a58551

Please sign in to comment.