Skip to content

Commit

Permalink
Merge branch 'feat/status_bar_support_24h_format' into 'master'
Browse files Browse the repository at this point in the history
feat(phone): support 24h format clock of status bar

Closes #18

See merge request ae_group/esp-brookesia!14
  • Loading branch information
Lzw655 committed Dec 23, 2024
2 parents c0a875b + 443130d commit 2c0c83f
Show file tree
Hide file tree
Showing 95 changed files with 3,134 additions and 2,100 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@

## v0.4.2 - 2024-12-11

### Enhancements:

* feat(assets): update large images
* feat(phone): support 24h format for clock of status bar
* feat(phone): disable manager gesture navigation back by default
* feat(phone): add stylesheet 720x1280
* feat(examples): update arduino Phone

### Bugfixes:

* fix(examples): PSRAM use QUAD mode for M5Stack CoreS3
* fix(examples): PSRAM use QUAD mode for M5Stack CoreS3 @georgik (#16)

## v0.4.1 - 2024-10-25

Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/tools/stylesheet_calculator.xlsx
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/how_to_use.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Users can access them by navigating to `File` > `Examples` > `esp-brookesia` in

Here are examples of using esp-brookesia on the Arduino development platform:

- [ESP_Brookesia_Phone](../examples/arduino/ESP_Brookesia_Phone): This example demonstrates how to run the Phone UI using the [ESP32_Display_Panel](https://github.com/esp-arduino-libs/ESP32_Display_Panel) library.
- [Phone](../examples/arduino/Phone): This example demonstrates how to run the Phone UI using the [ESP32_Display_Panel](https://github.com/esp-arduino-libs/ESP32_Display_Panel) library.

## App Development

Expand All @@ -124,7 +124,7 @@ Additionally, the system app base class in esp-brookesia provides extra user-con
- **Status Icon**: Set the app's status icon by configuring the `status_icon` field in `ESP_Brookesia_PhoneAppData_t`.
- **Status Bar Visual Mode**: Set the app's status bar visual mode by configuring the `status_bar_visual_mode` field in `ESP_Brookesia_PhoneAppData_t`, supporting `fixed` and `hidden` modes.
- **Navigation Bar Visual Mode**: Set the app's navigation bar visual mode by configuring the `navigation_bar_visual_mode` field in `ESP_Brookesia_PhoneAppData_t`, supporting `fixed`, `hidden`, and `flexible` modes.
- **Gesture Navigation**: Enable or disable gesture navigation for the app by configuring the `enable_navigation_gesture` field in `ESP_Brookesia_PhoneAppData_t`.
- **Gesture Navigation**: Enable or disable gesture navigation for the app by configuring the `enable_navigation_gesture` field in `ESP_Brookesia_PhoneAppData_t`, default only supporting opening the recents screen by swiping up from the bottom. You can enable side-swipe gestures for navigating back to the previous page by configuring the `enable_gesture_navigation_back` field in the `ESP_Brookesia_PhoneManagerData_t` of stylesheet.

### General Examples

Expand Down
4 changes: 2 additions & 2 deletions docs/how_to_use_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ idf.py add-dependency "espressif/esp-brookesia"

以下是在 Arduino 开发平台下使用 esp-brookesia 的示例:

- [ESP_Brookesia_Phone](../examples/arduino/ESP_Brookesia_Phone): 此示例演示了如何使用 [ESP32_Display_Panel](https://github.com/esp-arduino-libs/ESP32_Display_Panel) 库运行 Phone UI。
- [Phone](../examples/arduino/Phone): 此示例演示了如何使用 [ESP32_Display_Panel](https://github.com/esp-arduino-libs/ESP32_Display_Panel) 库运行 Phone UI。

## App 开发

Expand All @@ -124,7 +124,7 @@ esp-brookesia 的系统 app 基类是继承自内核 app 基类 `ESP_Brookesia_C
- **状态图标**:通过设置 `ESP_Brookesia_PhoneAppData_t``status_icon` 字段来设置 app 的状态图标。
- **状态栏显示模式**:通过设置 `ESP_Brookesia_PhoneAppData_t``status_bar_visual_mode` 字段来设置 app 的状态栏显示模式,支持 `固定``隐藏` 两种模式。
- **导航栏显示模式**:通过设置 `ESP_Brookesia_PhoneAppData_t``navigation_bar_visual_mode` 字段来设置 app 的导航栏显示模式,支持 `固定``隐藏``动态` 三种模式。
- **手势导航**:通过设置 `ESP_Brookesia_PhoneAppData_t` 中 enable_navigation_gesture` 字段来设置 app 是否支持通过手势进行导航。
- **手势导航**:通过设置 `ESP_Brookesia_PhoneAppData_t``enable_navigation_gesture` 字段来设置 app 是否支持通过手势进行导航,该功能默认仅支持从底部向上滑动打开概览屏幕,可以通过设置样式表 `ESP_Brookesia_PhoneManagerData_t``enable_gesture_navigation_back` 字段来支持侧边滑动返回上一级页面

### 通用示例

Expand Down
1 change: 1 addition & 0 deletions docs/system_ui_phone.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ To achieve the best display performance at fixed resolutions, esp-brookesia also
- [320 x 240](../src/systems/phone/stylesheets/320_240/)
- [320 x 480](../src/systems/phone/stylesheets/320_480/)
- [480 x 480](../src/systems/phone/stylesheets/480_480/)
- [720 x 1280](../src/systems/phone/stylesheets/720_1280/)
- [800 x 480](../src/systems/phone/stylesheets/800_480/)
- [800 x 1280](../src/systems/phone/stylesheets/800_1280/)
- [1024 x 600](../src/systems/phone/stylesheets/1024_600/)
Expand Down
1 change: 1 addition & 0 deletions docs/system_ui_phone_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
- [320 x 240](../src/systems/phone/stylesheets/320_240/)
- [320 x 480](../src/systems/phone/stylesheets/320_480/)
- [480 x 480](../src/systems/phone/stylesheets/480_480/)
- [720 x 1280](../src/systems/phone/stylesheets/720_1280/)
- [800 x 480](../src/systems/phone/stylesheets/800_480/)
- [800 x 1280](../src/systems/phone/stylesheets/800_1280/)
- [1024 x 600](../src/systems/phone/stylesheets/1024_600/)
Expand Down
4 changes: 2 additions & 2 deletions docs/system_ui_widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The [Status Bar](../src/widgets/status_bar/) displays time, battery level, WiFi

- **Position**: Located at the top of the screen.
- **Status Icons**: Each icon supports up to 6 images with adaptive scaling, allowing the use of images different from the stylesheet size.
- **Time Information**: Allows setting the system time, formatted as `HH:MM AM/PM`.
- **Time Information**: Allows setting the system time, 12h formatted as `HH:MM AM/PM` and 24h formatted as `HH:MM`.
- **Battery Information**: Allows setting the battery status, including both percentage and status icon.
- **WiFi Status**: Allows setting the WiFi connection status, including a status icon.

Expand Down Expand Up @@ -61,7 +61,7 @@ The [Recents Screen](../src/widgets/recents_screen/) displays the currently runn

- **Indicator Bar**:

- **Position**: Located at the `left edge`, `right edge`, and `top edge` of the screen.
- **Position**: Located at the `left edge`, `right edge`, and `bottom edge` of the screen.
- **Display**: Hidden by default, it appears when an edge gesture is detected and changes as the gesture moves in a specific direction.

- **Gesture Information**
Expand Down
4 changes: 2 additions & 2 deletions docs/system_ui_widgets_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

- **位置**:屏幕顶部。
- **状态图标**:每个图标支持最多 6 张图片,并且支持自适应缩放,允许使用不同于样式表大小的图片。
- **时间信息**:允许设置系统时间,格式为 `HH:MM AM/PM`
- **时间信息**:允许设置系统时间,12h 格式为 `HH:MM AM/PM`, 24h 格式为 `HH:MM`
- **电量信息**:允许设置电量状态,包含百分比和状态图标。
- **WiFi 状态**:允许设置 WiFi 连接状态,包含状态图标。

Expand Down Expand Up @@ -61,7 +61,7 @@

- **指示条**

- **位置**:位于屏幕 `左边缘``右边缘``上边缘`
- **位置**:位于屏幕 `左边缘``右边缘``下边缘`
- **显示**:默认隐藏,当检测到边缘位置触发手势动作时显示,并且随着手势在特定方向上移动而变化

- **手势信息**
Expand Down
50 changes: 33 additions & 17 deletions examples/arduino/Phone/ESP_Panel_Board_Custom.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* - EK9716B
* - GC9A01, GC9B71, GC9503
* - ILI9341
* - JD9365
* - NV3022B
* - SH8601
* - SPD2010
Expand Down Expand Up @@ -110,8 +111,6 @@
// |--------------|---------------|
#define ESP_PANEL_LCD_RGB_DATA_WIDTH (16) // | 8 | 16 |
#define ESP_PANEL_LCD_RGB_PIXEL_BITS (16) // | 24 | 16 |

#define ESP_PANEL_LCD_RGB_FRAME_BUF_NUM (1) // 1/2/3
#define ESP_PANEL_LCD_RGB_BOUNCE_BUF_SIZE (0) // Bounce buffer size in bytes. This function is used to avoid screen drift.
// To enable the bounce buffer, set it to a non-zero value. Typically set to `ESP_PANEL_LCD_WIDTH * 10`
// The size of the Bounce Buffer must satisfy `width_of_lcd * height_of_lcd = size_of_buffer * N`,
Expand All @@ -121,7 +120,6 @@
#define ESP_PANEL_LCD_RGB_IO_DE (17) // -1 if not used
#define ESP_PANEL_LCD_RGB_IO_PCLK (9)
#define ESP_PANEL_LCD_RGB_IO_DISP (-1) // -1 if not used

// | RGB565 | RGB666 | RGB888 |
// |--------|--------|--------|
#define ESP_PANEL_LCD_RGB_IO_DATA0 (10) // | B0 | B0-1 | B0-3 |
Expand Down Expand Up @@ -158,6 +156,22 @@
// The `mirror()` function will be implemented by LCD command if set to 1.
#endif

#elif ESP_PANEL_LCD_BUS_TYPE == ESP_PANEL_BUS_TYPE_MIPI_DSI

#define ESP_PANEL_LCD_MIPI_DSI_LANE_NUM (2) // ESP32-P4 supports 1 or 2 lanes
#define ESP_PANEL_LCD_MIPI_DSI_LANE_RATE_MBPS (1000) // Single lane bit rate, should consult the LCD supplier or check the
// LCD drive IC datasheet for the supported lane rate.
// ESP32-P4 supports max 1500Mbps
#define ESP_PANEL_LCD_MIPI_DSI_PHY_LDO_ID (3) // -1 if not used
#define ESP_PANEL_LCD_MIPI_DPI_CLK_MHZ (52)
#define ESP_PANEL_LCD_MIPI_DPI_PIXEL_BITS (ESP_PANEL_LCD_RGB565_COLOR_BITS_16)
#define ESP_PANEL_LCD_MIPI_DSI_HPW (10)
#define ESP_PANEL_LCD_MIPI_DSI_HBP (160)
#define ESP_PANEL_LCD_MIPI_DSI_HFP (160)
#define ESP_PANEL_LCD_MIPI_DSI_VPW (1)
#define ESP_PANEL_LCD_MIPI_DSI_VBP (23)
#define ESP_PANEL_LCD_MIPI_DSI_VFP (12)

#else

#error "The function is not ready and will be implemented in the future."
Expand All @@ -176,18 +190,20 @@
* 2. Formatter: ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(delay_ms, command, { data0, data1, ... }) and
* ESP_PANEL_LCD_CMD_WITH_NONE_PARAM(delay_ms, command)
*/
// #define ESP_PANEL_LCD_VENDOR_INIT_CMD() \
// { \
// {0xFF, (uint8_t []){0x77, 0x01, 0x00, 0x00, 0x10}, 5, 0}, \
// {0xC0, (uint8_t []){0x3B, 0x00}, 2, 0}, \
// {0xC1, (uint8_t []){0x0D, 0x02}, 2, 0}, \
// {0x29, (uint8_t []){0x00}, 0, 120}, \
// or \
// ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xFF, {0x77, 0x01, 0x00, 0x00, 0x10}), \
// ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC0, {0x3B, 0x00}), \
// ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC1, {0x0D, 0x02}), \
// ESP_PANEL_LCD_CMD_WITH_NONE_PARAM(120, 0x29), \
// }
/*
#define ESP_PANEL_LCD_VENDOR_INIT_CMD() \
{ \
{0xFF, (uint8_t []){0x77, 0x01, 0x00, 0x00, 0x10}, 5, 0}, \
{0xC0, (uint8_t []){0x3B, 0x00}, 2, 0}, \
{0xC1, (uint8_t []){0x0D, 0x02}, 2, 0}, \
{0x29, (uint8_t []){0x00}, 0, 120}, \
or \
ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xFF, {0x77, 0x01, 0x00, 0x00, 0x10}), \
ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC0, {0x3B, 0x00}), \
ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC1, {0x0D, 0x02}), \
ESP_PANEL_LCD_CMD_WITH_NONE_PARAM(120, 0x29), \
}
*/

/* LCD Color Settings */
/* LCD color depth in bits */
Expand Down Expand Up @@ -378,8 +394,8 @@
*
*/
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 0
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 2
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 2
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 3
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1

#endif /* ESP_PANEL_USE_CUSTOM_BOARD */

Expand Down
32 changes: 23 additions & 9 deletions examples/arduino/Phone/ESP_Panel_Board_Supported.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
* - BOARD_ESP32_S3_BOX_LITE (ESP32-S3-Box-Lite): https://github.com/espressif/esp-box/tree/master
* - BOARD_ESP32_S3_EYE (ESP32-S3-EYE): https://github.com/espressif/esp-who/blob/master/docs/en/get-started/ESP32-S3-EYE_Getting_Started_Guide.md
* - BOARD_ESP32_S3_KORVO_2 (ESP32-S3-Korvo-2): https://docs.espressif.com/projects/esp-adf/en/latest/design-guide/dev-boards/user-guide-esp32-s3-korvo-2.html
* - BOARD_ESP32_S3_LCD_EV_BOARD (ESP32-S3-LCD-EV-Board): https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/user_guide_v1.4.html
* - BOARD_ESP32_S3_LCD_EV_BOARD (ESP32-S3-LCD-EV-Board(v1.1-v1.4)): https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/user_guide_v1.4.html
* - BOARD_ESP32_S3_LCD_EV_BOARD_V1_5 (ESP32-S3-LCD-EV-Board(v1.5)): https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/user_guide.html
* - BOARD_ESP32_S3_LCD_EV_BOARD_2 (ESP32-S3-LCD-EV-Board-2)): https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/user_guide_v1.4.html
* - BOARD_ESP32_S3_LCD_EV_BOARD_2 (ESP32-S3-LCD-EV-Board-2(v1.1-v1.4))): https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/user_guide_v1.4.html
* - BOARD_ESP32_S3_LCD_EV_BOARD_2_V1_5 (ESP32-S3-LCD-EV-Board-2(v1.5)): https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/user_guide.html
* - BOARD_ESP32_S3_USB_OTG (ESP32-S3-USB-OTG): https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-usb-otg/index.html
* - BOARD_ESP32_P4_FUNCTION_EV_BOARD (ESP32-P4-Function-EV-Board): https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32p4/esp32-p4-function-ev-board/index.html
*
*/
// #define BOARD_ESP32_C3_LCDKIT
Expand All @@ -45,6 +46,7 @@
// #define BOARD_ESP32_S3_LCD_EV_BOARD_2
// #define BOARD_ESP32_S3_LCD_EV_BOARD_2_V1_5
// #define BOARD_ESP32_S3_USB_OTG
// #define BOARD_ESP32_P4_FUNCTION_EV_BOARD

/*
* Elecrow (https://www.elecrow.com):
Expand All @@ -56,9 +58,9 @@
/*
* M5Stack (https://m5stack.com/):
*
* - BOARD_M5STACK_M5CORE2 (M5STACK_M5CORE2): https://docs.m5stack.com/zh_CN/core/core2
* - BOARD_M5STACK_M5DIAL (M5STACK_M5DIAL): https://docs.m5stack.com/zh_CN/core/M5Dial
* - BOARD_M5STACK_M5CORES3 (M5STACK_M5CORES3): https://docs.m5stack.com/zh_CN/core/CoreS3
* - BOARD_M5STACK_M5CORE2 (M5STACK_M5CORE2): https://docs.m5stack.com/en/core/core2
* - BOARD_M5STACK_M5DIAL (M5STACK_M5DIAL): https://docs.m5stack.com/en/core/M5Dial
* - BOARD_M5STACK_M5CORES3 (M5STACK_M5CORES3): https://docs.m5stack.com/en/core/CoreS3
*/
// #define BOARD_M5STACK_M5CORE2
// #define BOARD_M5STACK_M5DIAL
Expand All @@ -77,11 +79,23 @@
/*
* Waveshare Supported Boards (https://www.waveshare.com/):
*
* - ESP32_S3_Touch_LCD_4_3:
* - https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm
*
* - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85 (ESP32_S3_Touch_LCD_1_85): https://www.waveshare.com/esp32-s3-touch-lcd-1.85.htm
* - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1 (ESP32_S3_Touch_LCD_2_1): https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm
* - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3 (ESP32_S3_Touch_LCD_4_3): https://www.waveshare.com/esp32-s3-touch-lcd-4.3.htm
* - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B (ESP32_S3_Touch_LCD_4_3_B): https://www.waveshare.com/esp32-s3-touch-lcd-4.3B.htm
* - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5 (ESP32_S3_Touch_LCD_5): https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28117
* - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B (ESP32_S3_Touch_LCD_5_B): https://www.waveshare.com/esp32-s3-touch-lcd-5.htm?sku=28151
* - BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7 (ESP32_S3_Touch_LCD_7): https://www.waveshare.com/esp32-s3-touch-lcd-7.htm
* - BOARD_WAVESHARE_ESP32_P4_NANO (ESP32_P4_NANO): https://www.waveshare.com/esp32-p4-nano.htm
*/
// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_1_85
// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_2_1
// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3
// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_4_3_B
// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5
// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_5_B
// #define BOARD_WAVESHARE_ESP32_S3_Touch_LCD_7
// #define BOARD_WAVESHARE_ESP32_P4_NANO

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////// File Version ///////////////////////////////////////////////////////////
Expand All @@ -98,7 +112,7 @@
*
*/
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 3
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 7
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 0

#endif
Loading

0 comments on commit 2c0c83f

Please sign in to comment.