Merge branch 'feature/cahtgpt_add_boxlite' into 'master'
ChatGPT exmaple: ADD ESP-Box Lite support See merge request ae_group/esp-box!70
This commit is contained in:
@@ -1,78 +1,113 @@
|
||||
# **ChatGPT Example**
|
||||
In this example, we are utilizing the OpenAI API in conjunction with an ESP-Box to create a voice-based chatbot. The ESP-Box is a device or system that incorporates an ESP32-S3 microcontroller. The purpose of this implementation is to enable users to communicate with the chatbot using spoken language. The process involves capturing audio input from the user, sending it to the OpenAI API for processing, and receiving a response that is then converted into speech and played back to the user.
|
||||
# ChatGPT Example
|
||||
|
||||
## **Environment**
|
||||
1. ESP-IDF version [master](https://github.com/espressif/esp-idf)
|
||||
| Board | Support Status |
|
||||
| ----------------- | -------------- |
|
||||
| ESP32-S3-BOX | YES |
|
||||
| ESP32-S3-BOX-Lite | YES |
|
||||
|
||||
|
||||
In this example, we are utilizing the OpenAI API in conjunction with an ESP-BOX to create a voice-based chatbot. The ESP-BOX is a device or system that incorporates an ESP32-S3 microcontroller. The purpose of this implementation is to enable users to communicate with the chatbot using spoken language. The process involves capturing audio input from the user, sending it to the OpenAI API for processing, and receiving a response that is then converted into speech and played back to the user.
|
||||
|
||||
## How to use example
|
||||
* ESP-IDF version [master](https://github.com/espressif/esp-idf)
|
||||
|
||||
```
|
||||
git checkout master && git pull && git submodule update --init --recursive
|
||||
|
||||
```
|
||||
* If you encounter any errors during the upgrade process, please make sure to use the ESP-IDF version [master](https://github.com/espressif/esp-idf) at commit ID `d2471b11e78fb0af612dfa045255ac7fe497bea8`. This specific commit represents a stable state of the ESP-IDF repository and can help ensure a smoother transition or troubleshooting process.
|
||||
* If you encounter any errors during the upgrade process, please make sure to use the ESP-IDF version [master](https://github.com/espressif/esp-idf) at commit ID `53ff7d43dbff642d831a937b066ea0735a6aca24`. This specific commit represents a stable state of the ESP-IDF repository and can help ensure a smoother transition or troubleshooting process.
|
||||
```
|
||||
git checkout 67552c31dac8cd94fb0d63192a538f4f984c5b6e && git pull && git submodule update --init --recursive
|
||||
git checkout 53ff7d43dbff642d831a937b066ea0735a6aca24 && git pull && git submodule update --init --recursive
|
||||
|
||||
```
|
||||
|
||||
### Hardware Required
|
||||
|
||||
* A ESP32-S3-BOX or ESP32-S3-BOX-Lite
|
||||
* An USB-C cable for power supply and programming
|
||||
|
||||
|
||||
## **Text to speech**
|
||||
Due to the lack of native text-to-speech support in the [OpenAI](https://platform.openai.com/docs/api-reference) API, an external API is used to meet this requirement. This example utilizes the text-to-speech functionality offered by [TalkingGenie](https://www.talkinggenie.com/tts). Additional information can be found in this [blog post](https://czyt.tech/post/a-free-tts-api/?from_wecom=1).
|
||||
|
||||
## **Reproducing the demo**
|
||||
### **Build and Flash**
|
||||
There is another project called **factory_nvs** within the **ChatGPT_demo** project. It includes the code to store credentials in the NVS (Non-Volatile Storage) of the ESP-Box. On the other hand, **Chat_GPT Demo**consists of the demo code. Therefore, it is essential to build both projects.
|
||||
|
||||
|
||||
### 1. Clone the Github repository
|
||||
**1. Clone the Github repository**
|
||||
|
||||
```bash
|
||||
git clone https://github.com/espressif/esp-box
|
||||
|
||||
```
|
||||
|
||||
### 2. Change the working directory
|
||||
**2. Change the working directory**
|
||||
|
||||
```bash
|
||||
cd examples/chatgpt_demo/factory_nvs
|
||||
|
||||
```
|
||||
|
||||
### 3. Build the factory_nvs
|
||||
**3. Hardware Selection**
|
||||
|
||||
To select the appropriate hardware ([ESP32-S3-BOX](https://github.com/espressif/esp-box/blob/master/docs/hardware_overview/esp32_s3_box/hardware_overview_for_box.md) or [ESP32-S3-BOX-Lite](https://github.com/espressif/esp-box/blob/master/docs/hardware_overview/esp32_s3_box_lite/hardware_overview_for_lite.md)) and access the HMI Board Config, use the following command.
|
||||
|
||||
Select the proper hardware by using this command and look for **HMI Board Cofig**
|
||||
|
||||
```bash
|
||||
idf.py menuconfig
|
||||
|
||||
```
|
||||
|
||||
**4. Build the factory_nvs**
|
||||
|
||||
```bash
|
||||
idf.py build
|
||||
|
||||
```
|
||||
|
||||
### 4. Change the working directory
|
||||
**5. Change the working directory**
|
||||
|
||||
```bash
|
||||
cd examples/chatgpt_demo/
|
||||
|
||||
```
|
||||
**6. Hardware Selection**
|
||||
|
||||
To select the appropriate hardware ([ESP32-S3-BOX](https://github.com/espressif/esp-box/blob/master/docs/hardware_overview/esp32_s3_box/hardware_overview_for_box.md) or [ESP32-S3-BOX-Lite](https://github.com/espressif/esp-box/blob/master/docs/hardware_overview/esp32_s3_box_lite/hardware_overview_for_lite.md)) and access the HMI Board Config, use the following command.
|
||||
|
||||
### 5. Build the chatgpt_demo
|
||||
```bash
|
||||
idf.py menuconfig
|
||||
|
||||
```
|
||||
|
||||
**7. Build the chatgpt_demo**
|
||||
|
||||
```bash
|
||||
idf.py build
|
||||
|
||||
```
|
||||
|
||||
### 6. Flash on ESP-BOX
|
||||
```
|
||||
**8. Flash**
|
||||
|
||||
```bash
|
||||
python -m esptool -p /dev/ttyACM0 --chip esp32s3 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 16MB --flash_freq 80m 0x0 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0xd000 build/ota_data_initial.bin 0x10000 build/chatgpt_demo.bin 0x900000 build/storage.bin 0xb00000 build/srmodels/srmodels.bin 0x700000 factory_nvs/build/factory_nvs.bin
|
||||
|
||||
```
|
||||
|
||||
In case found error during the building process [follow the official IDF guide for more details](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#build-your-first-project).
|
||||
|
||||
|
||||
## Known compilation errors
|
||||
When encountering compilation errors related to the "espressif__esp-sr" component, a common solution is to remove the ".component_hash" file located at "managed_components/espressif__esp-sr" and proceed with the rebuild. This step helps resolve the issue and allows the compilation process to continue smoothly.
|
||||
|
||||
|
||||
## **Resources**
|
||||
Follow the [blog posts](https://blog.espressif.com/) for brief description about the code.
|
||||
|
||||
1. [Unleashing the Power of OpenAI and ESP-BOX: A Guide to Fusing ChatGPT with Espressif SOCs](https://blog.espressif.com/unleashing-the-power-of-openai-and-esp-box-a-guide-to-fusing-chatgpt-with-espressif-socs-fba0b2d2c4f2)
|
||||
2. [OpenAI Component | Accelerating the integration of OpenAI APIs in projects](https://blog.espressif.com/openai-component-accelerating-the-integration-of-openai-apis-in-projects-e5fa87998126)
|
||||
|
||||
### **Note**:
|
||||
Please note that,
|
||||
1. You require an **OpenAI API** key to proceed with the demo.
|
||||
2. To enter the WIFI credentials and OpenAI secret key.
|
||||
3. The example does not currently support ESP-BOX Lite.
|
||||
4. Additionally, as a result of **OpenAI's restrictions**, this particular example cannot be supported within Mainland China.
|
||||
1. You require an **OpenAI API key** to proceed with the demo.
|
||||
2. To provide the WIFI credentials and the OpenAI secret key, Please follow the on display prompts to proceed.
|
||||
3. Additionally, as a result of **OpenAI's restrictions**, this particular example cannot be supported within Mainland China.
|
||||
4. ChatGPT is a large language model that is unable to distinguish between Chinese Jian ti (简体) and Fan ti (繁體) characters. Due to the constraints of LVGL (Light and Versatile Graphics Library), this project currently only supports Jian Ti (simplified Chinese characters).
|
||||
|
||||
@@ -5,5 +5,8 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
set(EXTRA_COMPONENT_DIRS
|
||||
../../../components
|
||||
)
|
||||
add_compile_options(-fdiagnostics-color=always)
|
||||
project(factory_nvs)
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
|
||||
static char *TAG = "NVS: ui-events";
|
||||
|
||||
void EventBtnSetupClick(lv_event_t * e)
|
||||
void EventBtnSetupClick(lv_event_t *e)
|
||||
{
|
||||
ESP_LOGI(TAG, "btn click!");
|
||||
// Configure USB PHY, Change back to USB-Serial-Jtag
|
||||
usb_phy_ll_int_jtag_enable(&USB_SERIAL_JTAG);
|
||||
usb_phy_ll_int_jtag_enable(&USB_SERIAL_JTAG);
|
||||
esp_restart();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## IDF Component Manager Manifest File
|
||||
dependencies:
|
||||
espressif/esp_tinyuf2: "^0.1.0"
|
||||
espressif/esp-box: "~2.2.0"
|
||||
# espressif/esp-box: "~2.2.0"
|
||||
## Required IDF version
|
||||
idf:
|
||||
version: ">=5.0"
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
SET(SOURCES screens/ui_ScreenSetup.c
|
||||
ui.c
|
||||
components/ui_comp_hook.c
|
||||
ui_helpers.c
|
||||
images/ui_img_setup_bg_png.c
|
||||
images/ui_img_setup_text_bg_png.c
|
||||
fonts/ui_font_PingFangEN14.c
|
||||
fonts/ui_font_PingFangEN16.c
|
||||
fonts/ui_font_PingFangEN20.c)
|
||||
|
||||
add_library(ui ${SOURCES})
|
||||
@@ -0,0 +1,9 @@
|
||||
screens/ui_ScreenSetup.c
|
||||
ui.c
|
||||
components/ui_comp_hook.c
|
||||
ui_helpers.c
|
||||
images/ui_img_setup_bg_png.c
|
||||
images/ui_img_setup_text_bg_png.c
|
||||
fonts/ui_font_PingFangEN14.c
|
||||
fonts/ui_font_PingFangEN16.c
|
||||
fonts/ui_font_PingFangEN20.c
|
||||
@@ -1,17 +1,17 @@
|
||||
// This file was generated by SquareLine Studio
|
||||
// SquareLine Studio version: SquareLine Studio 1.2.3
|
||||
// SquareLine Studio version: SquareLine Studio 1.3.1
|
||||
// LVGL version: 8.3.4
|
||||
// Project name: box_reset_mode
|
||||
|
||||
#include "ui.h"
|
||||
#include "../ui.h"
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
// IMAGE DATA: assets\setup_bg.png
|
||||
const LV_ATTRIBUTE_MEM_ALIGN uint8_t ui_img_setup_bg_png_data[] = {
|
||||
0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,
|
||||
0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,
|
||||
0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,
|
||||
0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x00,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x00,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x00,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,
|
||||
0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,
|
||||
@@ -1211,12 +1211,14 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t ui_img_setup_bg_png_data[] = {
|
||||
0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,
|
||||
0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,
|
||||
0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,0x08,0x21,0xFF,
|
||||
};
|
||||
|
||||
};
|
||||
const lv_img_dsc_t ui_img_setup_bg_png = {
|
||||
.header.always_zero = 0,
|
||||
.header.w = 320,
|
||||
.header.h = 240,
|
||||
.data_size = sizeof(ui_img_setup_bg_png_data),
|
||||
.header.cf = LV_IMG_CF_TRUE_COLOR_ALPHA,
|
||||
.data = ui_img_setup_bg_png_data};
|
||||
.header.always_zero = 0,
|
||||
.header.w = 320,
|
||||
.header.h = 240,
|
||||
.data_size = sizeof(ui_img_setup_bg_png_data),
|
||||
.header.cf = LV_IMG_CF_TRUE_COLOR_ALPHA,
|
||||
.data = ui_img_setup_bg_png_data
|
||||
};
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// This file was generated by SquareLine Studio
|
||||
// SquareLine Studio version: SquareLine Studio 1.2.3
|
||||
// SquareLine Studio version: SquareLine Studio 1.3.1
|
||||
// LVGL version: 8.3.4
|
||||
// Project name: box_reset_mode
|
||||
|
||||
#include "ui.h"
|
||||
#include "../ui.h"
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
// IMAGE DATA: assets\setup_text_bg.png
|
||||
const LV_ATTRIBUTE_MEM_ALIGN uint8_t ui_img_setup_text_bg_png_data[] = {
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0xFF,0xFF,0x00,0xFF,0xFF,0x01,0xFF,0xFF,0x03,0xFF,0xFF,0x0E,0xFF,0xFF,0x1B,0xFF,0xFF,0x27,0xFF,0xFF,0x2E,0xFF,0xFF,0x32,0xFF,0xFF,0x36,0xFF,0xFF,0x38,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0xFF,0xFF,0x00,0xFF,0xFF,0x01,0xFF,0xFF,0x03,0xFF,0xFF,0x0E,0xFF,0xFF,0x1B,0xFF,0xFF,0x27,0xFF,0xFF,0x2E,0xFF,0xFF,0x32,0xFF,0xFF,0x36,0xFF,0xFF,0x38,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,
|
||||
0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,
|
||||
0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,
|
||||
0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,
|
||||
@@ -1211,12 +1211,14 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t ui_img_setup_text_bg_png_data[] = {
|
||||
0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,
|
||||
0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,
|
||||
0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x39,0xFF,0xFF,0x38,0xFF,0xFF,0x36,0xFF,0xFF,0x32,0xFF,0xFF,0x2D,0xFF,0xFF,0x26,0xFF,0xFF,0x1A,0xFF,0xFF,0x0C,0xFF,0xFF,0x02,0xFF,0xFF,0x01,0xFF,0xFF,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
};
|
||||
|
||||
};
|
||||
const lv_img_dsc_t ui_img_setup_text_bg_png = {
|
||||
.header.always_zero = 0,
|
||||
.header.w = 320,
|
||||
.header.h = 240,
|
||||
.data_size = sizeof(ui_img_setup_text_bg_png_data),
|
||||
.header.cf = LV_IMG_CF_TRUE_COLOR_ALPHA,
|
||||
.data = ui_img_setup_text_bg_png_data};
|
||||
.header.always_zero = 0,
|
||||
.header.w = 320,
|
||||
.header.h = 240,
|
||||
.data_size = sizeof(ui_img_setup_text_bg_png_data),
|
||||
.header.cf = LV_IMG_CF_TRUE_COLOR_ALPHA,
|
||||
.data = ui_img_setup_text_bg_png_data
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
// This file was generated by SquareLine Studio
|
||||
// SquareLine Studio version: SquareLine Studio 1.3.1
|
||||
// LVGL version: 8.3.4
|
||||
// Project name: box_reset_mode
|
||||
|
||||
#include "../ui.h"
|
||||
|
||||
void ui_ScreenSetup_screen_init(void)
|
||||
{
|
||||
ui_ScreenSetup = lv_obj_create(NULL);
|
||||
lv_obj_clear_flag(ui_ScreenSetup, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||
lv_obj_set_style_bg_img_src(ui_ScreenSetup, &ui_img_setup_bg_png, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_ImageSetupTextBg = lv_img_create(ui_ScreenSetup);
|
||||
lv_img_set_src(ui_ImageSetupTextBg, &ui_img_setup_text_bg_png);
|
||||
lv_obj_set_width(ui_ImageSetupTextBg, 320);
|
||||
lv_obj_set_height(ui_ImageSetupTextBg, 240);
|
||||
lv_obj_set_align(ui_ImageSetupTextBg, LV_ALIGN_CENTER);
|
||||
lv_obj_add_flag(ui_ImageSetupTextBg, LV_OBJ_FLAG_ADV_HITTEST); /// Flags
|
||||
lv_obj_clear_flag(ui_ImageSetupTextBg, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||
lv_img_set_zoom(ui_ImageSetupTextBg, 560);
|
||||
|
||||
ui_PanelSetupSteps = lv_obj_create(ui_ScreenSetup);
|
||||
lv_obj_set_width(ui_PanelSetupSteps, 320);
|
||||
lv_obj_set_height(ui_PanelSetupSteps, 240);
|
||||
lv_obj_set_x(ui_PanelSetupSteps, -1);
|
||||
lv_obj_set_y(ui_PanelSetupSteps, -2);
|
||||
lv_obj_clear_flag(ui_PanelSetupSteps, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||
lv_obj_set_style_radius(ui_PanelSetupSteps, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_PanelSetupSteps, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_PanelSetupSteps, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui_PanelSetupSteps, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui_PanelSetupSteps, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui_PanelSetupSteps, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui_PanelSetupSteps, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui_PanelSetupSteps, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
lv_obj_set_style_border_width(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_width(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_pad(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_row(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_column(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelSetupStepContent = lv_label_create(ui_PanelSetupSteps);
|
||||
lv_obj_set_width(ui_LabelSetupStepContent, lv_pct(88));
|
||||
lv_obj_set_height(ui_LabelSetupStepContent, lv_pct(61));
|
||||
lv_obj_set_x(ui_LabelSetupStepContent, lv_pct(0));
|
||||
lv_obj_set_y(ui_LabelSetupStepContent, lv_pct(20));
|
||||
lv_obj_set_align(ui_LabelSetupStepContent, LV_ALIGN_TOP_MID);
|
||||
lv_label_set_text(ui_LabelSetupStepContent,
|
||||
"1. Connect ESP-Box to PC.\n2. Open \"ESP-Box\" folder.\n3. Edit \"CONFIG.INI\" file with Wi-Fi SSID, password, and OpenAI key.\n4. Save the file.\n5. Restart the device.");
|
||||
lv_obj_set_style_text_color(ui_LabelSetupStepContent, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelSetupStepContent, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_letter_space(ui_LabelSetupStepContent, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_line_space(ui_LabelSetupStepContent, 5, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelSetupStepContent, &ui_font_PingFangEN14, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelSetupStepTile = lv_label_create(ui_PanelSetupSteps);
|
||||
lv_obj_set_width(ui_LabelSetupStepTile, 230);
|
||||
lv_obj_set_height(ui_LabelSetupStepTile, LV_SIZE_CONTENT); /// 140
|
||||
lv_obj_set_x(ui_LabelSetupStepTile, 45);
|
||||
lv_obj_set_y(ui_LabelSetupStepTile, 15);
|
||||
lv_label_set_text(ui_LabelSetupStepTile, "Steps");
|
||||
lv_obj_set_style_text_color(ui_LabelSetupStepTile, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelSetupStepTile, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_LabelSetupStepTile, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelSetupStepTile, &ui_font_PingFangEN20, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_ButtonSetup = lv_btn_create(ui_PanelSetupSteps);
|
||||
lv_obj_set_width(ui_ButtonSetup, 72);
|
||||
lv_obj_set_height(ui_ButtonSetup, 24);
|
||||
lv_obj_set_x(ui_ButtonSetup, 0);
|
||||
lv_obj_set_y(ui_ButtonSetup, -20);
|
||||
lv_obj_set_align(ui_ButtonSetup, LV_ALIGN_BOTTOM_MID);
|
||||
lv_obj_add_flag(ui_ButtonSetup, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||
lv_obj_clear_flag(ui_ButtonSetup, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||
lv_obj_set_style_radius(ui_ButtonSetup, 17, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_ButtonSetup, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_ButtonSetup, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelSetupBtn = lv_label_create(ui_ButtonSetup);
|
||||
lv_obj_set_width(ui_LabelSetupBtn, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelSetupBtn, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_align(ui_LabelSetupBtn, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_LabelSetupBtn, "Restart");
|
||||
lv_obj_set_style_text_color(ui_LabelSetupBtn, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelSetupBtn, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_LabelSetupBtn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelSetupBtn, &ui_font_PingFangEN16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
lv_obj_add_event_cb(ui_ButtonSetup, ui_event_ButtonSetup, LV_EVENT_ALL, NULL);
|
||||
|
||||
if (ui_get_btn_op_group()) {
|
||||
lv_group_remove_all_objs(ui_get_btn_op_group());
|
||||
lv_group_add_obj(ui_get_btn_op_group(), ui_ButtonSetup);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// This file was generated by SquareLine Studio
|
||||
// SquareLine Studio version: SquareLine Studio 1.2.3
|
||||
// SquareLine Studio version: SquareLine Studio 1.3.1
|
||||
// LVGL version: 8.3.4
|
||||
// Project name: box_reset_mode
|
||||
|
||||
@@ -7,227 +7,161 @@
|
||||
#include "ui_helpers.h"
|
||||
|
||||
///////////////////// VARIABLES ////////////////////
|
||||
void sleep_body_up_down_Animation( lv_obj_t *TargetObject, int delay);
|
||||
void listen_eye_blink_Animation( lv_obj_t *TargetObject, int delay);
|
||||
void listen_eye_screen_move_Animation( lv_obj_t *TargetObject, int delay);
|
||||
void get_eye_blink_Animation( lv_obj_t *TargetObject, int delay);
|
||||
void sleep_body_up_down_Animation(lv_obj_t *TargetObject, int delay);
|
||||
void listen_eye_blink_Animation(lv_obj_t *TargetObject, int delay);
|
||||
void listen_eye_screen_move_Animation(lv_obj_t *TargetObject, int delay);
|
||||
void get_eye_blink_Animation(lv_obj_t *TargetObject, int delay);
|
||||
|
||||
// SCREEN: ui_ScreenSetup
|
||||
void ui_ScreenSetup_screen_init(void);
|
||||
lv_obj_t *ui_ScreenSetup;
|
||||
lv_obj_t *ui_ImageSetupTextBg;
|
||||
lv_obj_t *ui_PanelSetupSteps;
|
||||
lv_obj_t *ui_LabelSetupStepContent;
|
||||
lv_obj_t *ui_LabelSetupStepTile;
|
||||
void ui_event_ButtonSetup( lv_event_t * e);
|
||||
void ui_event_ButtonSetup(lv_event_t *e);
|
||||
lv_obj_t *ui_ButtonSetup;
|
||||
lv_obj_t *ui_LabelSetupBtn;
|
||||
lv_obj_t *ui____initial_actions0;
|
||||
|
||||
static lv_group_t *g_btn_op_group = NULL;
|
||||
|
||||
///////////////////// TEST LVGL SETTINGS ////////////////////
|
||||
#if LV_COLOR_DEPTH != 16
|
||||
#error "LV_COLOR_DEPTH should be 16bit to match SquareLine Studio's settings"
|
||||
#error "LV_COLOR_DEPTH should be 16bit to match SquareLine Studio's settings"
|
||||
#endif
|
||||
#if LV_COLOR_16_SWAP !=1
|
||||
#error "LV_COLOR_16_SWAP should be 1 to match SquareLine Studio's settings"
|
||||
#error "LV_COLOR_16_SWAP should be 1 to match SquareLine Studio's settings"
|
||||
#endif
|
||||
|
||||
lv_group_t *ui_get_btn_op_group(void)
|
||||
{
|
||||
return g_btn_op_group;
|
||||
}
|
||||
|
||||
///////////////////// ANIMATIONS ////////////////////
|
||||
void sleep_body_up_down_Animation( lv_obj_t *TargetObject, int delay)
|
||||
void sleep_body_up_down_Animation(lv_obj_t *TargetObject, int delay)
|
||||
{
|
||||
ui_anim_user_data_t *PropertyAnimation_0_user_data = lv_mem_alloc(sizeof(ui_anim_user_data_t));
|
||||
PropertyAnimation_0_user_data->target = TargetObject;
|
||||
PropertyAnimation_0_user_data->val = -1;
|
||||
lv_anim_t PropertyAnimation_0;
|
||||
lv_anim_init(&PropertyAnimation_0);
|
||||
lv_anim_set_time(&PropertyAnimation_0, 1000);
|
||||
lv_anim_set_user_data(&PropertyAnimation_0, PropertyAnimation_0_user_data);
|
||||
lv_anim_set_custom_exec_cb(&PropertyAnimation_0, _ui_anim_callback_set_y );
|
||||
lv_anim_set_values(&PropertyAnimation_0, 0, -20 );
|
||||
lv_anim_set_path_cb( &PropertyAnimation_0, lv_anim_path_linear);
|
||||
lv_anim_set_delay( &PropertyAnimation_0, delay + 0 );
|
||||
lv_anim_set_deleted_cb( &PropertyAnimation_0, _ui_anim_callback_free_user_data );
|
||||
lv_anim_set_playback_time(&PropertyAnimation_0, 1000);
|
||||
lv_anim_set_playback_delay(&PropertyAnimation_0, 0);
|
||||
lv_anim_set_repeat_count(&PropertyAnimation_0, LV_ANIM_REPEAT_INFINITE );
|
||||
lv_anim_set_repeat_delay(&PropertyAnimation_0, 0);
|
||||
lv_anim_set_early_apply( &PropertyAnimation_0, false );
|
||||
lv_anim_set_get_value_cb(&PropertyAnimation_0, &_ui_anim_callback_get_y );
|
||||
lv_anim_start(&PropertyAnimation_0);
|
||||
ui_anim_user_data_t *PropertyAnimation_0_user_data = lv_mem_alloc(sizeof(ui_anim_user_data_t));
|
||||
PropertyAnimation_0_user_data->target = TargetObject;
|
||||
PropertyAnimation_0_user_data->val = -1;
|
||||
lv_anim_t PropertyAnimation_0;
|
||||
lv_anim_init(&PropertyAnimation_0);
|
||||
lv_anim_set_time(&PropertyAnimation_0, 1000);
|
||||
lv_anim_set_user_data(&PropertyAnimation_0, PropertyAnimation_0_user_data);
|
||||
lv_anim_set_custom_exec_cb(&PropertyAnimation_0, _ui_anim_callback_set_y);
|
||||
lv_anim_set_values(&PropertyAnimation_0, 0, -20);
|
||||
lv_anim_set_path_cb(&PropertyAnimation_0, lv_anim_path_linear);
|
||||
lv_anim_set_delay(&PropertyAnimation_0, delay + 0);
|
||||
lv_anim_set_deleted_cb(&PropertyAnimation_0, _ui_anim_callback_free_user_data);
|
||||
lv_anim_set_playback_time(&PropertyAnimation_0, 1000);
|
||||
lv_anim_set_playback_delay(&PropertyAnimation_0, 0);
|
||||
lv_anim_set_repeat_count(&PropertyAnimation_0, LV_ANIM_REPEAT_INFINITE);
|
||||
lv_anim_set_repeat_delay(&PropertyAnimation_0, 0);
|
||||
lv_anim_set_early_apply(&PropertyAnimation_0, false);
|
||||
lv_anim_set_get_value_cb(&PropertyAnimation_0, &_ui_anim_callback_get_y);
|
||||
lv_anim_start(&PropertyAnimation_0);
|
||||
|
||||
}
|
||||
void listen_eye_blink_Animation( lv_obj_t *TargetObject, int delay)
|
||||
void listen_eye_blink_Animation(lv_obj_t *TargetObject, int delay)
|
||||
{
|
||||
ui_anim_user_data_t *PropertyAnimation_0_user_data = lv_mem_alloc(sizeof(ui_anim_user_data_t));
|
||||
PropertyAnimation_0_user_data->target = TargetObject;
|
||||
PropertyAnimation_0_user_data->val = -1;
|
||||
lv_anim_t PropertyAnimation_0;
|
||||
lv_anim_init(&PropertyAnimation_0);
|
||||
lv_anim_set_time(&PropertyAnimation_0, 100);
|
||||
lv_anim_set_user_data(&PropertyAnimation_0, PropertyAnimation_0_user_data);
|
||||
lv_anim_set_custom_exec_cb(&PropertyAnimation_0, _ui_anim_callback_set_height );
|
||||
lv_anim_set_values(&PropertyAnimation_0, 0, -10 );
|
||||
lv_anim_set_path_cb( &PropertyAnimation_0, lv_anim_path_linear);
|
||||
lv_anim_set_delay( &PropertyAnimation_0, delay + 1800 );
|
||||
lv_anim_set_deleted_cb( &PropertyAnimation_0, _ui_anim_callback_free_user_data );
|
||||
lv_anim_set_playback_time(&PropertyAnimation_0, 100);
|
||||
lv_anim_set_playback_delay(&PropertyAnimation_0, 0);
|
||||
lv_anim_set_repeat_count(&PropertyAnimation_0, LV_ANIM_REPEAT_INFINITE );
|
||||
lv_anim_set_repeat_delay(&PropertyAnimation_0, 2100);
|
||||
lv_anim_set_early_apply( &PropertyAnimation_0, false );
|
||||
lv_anim_set_get_value_cb(&PropertyAnimation_0, &_ui_anim_callback_get_height );
|
||||
lv_anim_start(&PropertyAnimation_0);
|
||||
ui_anim_user_data_t *PropertyAnimation_0_user_data = lv_mem_alloc(sizeof(ui_anim_user_data_t));
|
||||
PropertyAnimation_0_user_data->target = TargetObject;
|
||||
PropertyAnimation_0_user_data->val = -1;
|
||||
lv_anim_t PropertyAnimation_0;
|
||||
lv_anim_init(&PropertyAnimation_0);
|
||||
lv_anim_set_time(&PropertyAnimation_0, 100);
|
||||
lv_anim_set_user_data(&PropertyAnimation_0, PropertyAnimation_0_user_data);
|
||||
lv_anim_set_custom_exec_cb(&PropertyAnimation_0, _ui_anim_callback_set_height);
|
||||
lv_anim_set_values(&PropertyAnimation_0, 0, -10);
|
||||
lv_anim_set_path_cb(&PropertyAnimation_0, lv_anim_path_linear);
|
||||
lv_anim_set_delay(&PropertyAnimation_0, delay + 1800);
|
||||
lv_anim_set_deleted_cb(&PropertyAnimation_0, _ui_anim_callback_free_user_data);
|
||||
lv_anim_set_playback_time(&PropertyAnimation_0, 100);
|
||||
lv_anim_set_playback_delay(&PropertyAnimation_0, 0);
|
||||
lv_anim_set_repeat_count(&PropertyAnimation_0, LV_ANIM_REPEAT_INFINITE);
|
||||
lv_anim_set_repeat_delay(&PropertyAnimation_0, 2100);
|
||||
lv_anim_set_early_apply(&PropertyAnimation_0, false);
|
||||
lv_anim_set_get_value_cb(&PropertyAnimation_0, &_ui_anim_callback_get_height);
|
||||
lv_anim_start(&PropertyAnimation_0);
|
||||
|
||||
}
|
||||
void listen_eye_screen_move_Animation( lv_obj_t *TargetObject, int delay)
|
||||
void listen_eye_screen_move_Animation(lv_obj_t *TargetObject, int delay)
|
||||
{
|
||||
ui_anim_user_data_t *PropertyAnimation_0_user_data = lv_mem_alloc(sizeof(ui_anim_user_data_t));
|
||||
PropertyAnimation_0_user_data->target = TargetObject;
|
||||
PropertyAnimation_0_user_data->val = -1;
|
||||
lv_anim_t PropertyAnimation_0;
|
||||
lv_anim_init(&PropertyAnimation_0);
|
||||
lv_anim_set_time(&PropertyAnimation_0, 300);
|
||||
lv_anim_set_user_data(&PropertyAnimation_0, PropertyAnimation_0_user_data);
|
||||
lv_anim_set_custom_exec_cb(&PropertyAnimation_0, _ui_anim_callback_set_x );
|
||||
lv_anim_set_values(&PropertyAnimation_0, 0, -20 );
|
||||
lv_anim_set_path_cb( &PropertyAnimation_0, lv_anim_path_linear);
|
||||
lv_anim_set_delay( &PropertyAnimation_0, delay + 0 );
|
||||
lv_anim_set_deleted_cb( &PropertyAnimation_0, _ui_anim_callback_free_user_data );
|
||||
lv_anim_set_playback_time(&PropertyAnimation_0, 300);
|
||||
lv_anim_set_playback_delay(&PropertyAnimation_0, 2000);
|
||||
lv_anim_set_repeat_count(&PropertyAnimation_0, LV_ANIM_REPEAT_INFINITE );
|
||||
lv_anim_set_repeat_delay(&PropertyAnimation_0, 2000);
|
||||
lv_anim_set_early_apply( &PropertyAnimation_0, false );
|
||||
lv_anim_set_get_value_cb(&PropertyAnimation_0, &_ui_anim_callback_get_x );
|
||||
lv_anim_start(&PropertyAnimation_0);
|
||||
ui_anim_user_data_t *PropertyAnimation_0_user_data = lv_mem_alloc(sizeof(ui_anim_user_data_t));
|
||||
PropertyAnimation_0_user_data->target = TargetObject;
|
||||
PropertyAnimation_0_user_data->val = -1;
|
||||
lv_anim_t PropertyAnimation_0;
|
||||
lv_anim_init(&PropertyAnimation_0);
|
||||
lv_anim_set_time(&PropertyAnimation_0, 300);
|
||||
lv_anim_set_user_data(&PropertyAnimation_0, PropertyAnimation_0_user_data);
|
||||
lv_anim_set_custom_exec_cb(&PropertyAnimation_0, _ui_anim_callback_set_x);
|
||||
lv_anim_set_values(&PropertyAnimation_0, 0, -20);
|
||||
lv_anim_set_path_cb(&PropertyAnimation_0, lv_anim_path_linear);
|
||||
lv_anim_set_delay(&PropertyAnimation_0, delay + 0);
|
||||
lv_anim_set_deleted_cb(&PropertyAnimation_0, _ui_anim_callback_free_user_data);
|
||||
lv_anim_set_playback_time(&PropertyAnimation_0, 300);
|
||||
lv_anim_set_playback_delay(&PropertyAnimation_0, 2000);
|
||||
lv_anim_set_repeat_count(&PropertyAnimation_0, LV_ANIM_REPEAT_INFINITE);
|
||||
lv_anim_set_repeat_delay(&PropertyAnimation_0, 2000);
|
||||
lv_anim_set_early_apply(&PropertyAnimation_0, false);
|
||||
lv_anim_set_get_value_cb(&PropertyAnimation_0, &_ui_anim_callback_get_x);
|
||||
lv_anim_start(&PropertyAnimation_0);
|
||||
|
||||
}
|
||||
void get_eye_blink_Animation( lv_obj_t *TargetObject, int delay)
|
||||
void get_eye_blink_Animation(lv_obj_t *TargetObject, int delay)
|
||||
{
|
||||
ui_anim_user_data_t *PropertyAnimation_0_user_data = lv_mem_alloc(sizeof(ui_anim_user_data_t));
|
||||
PropertyAnimation_0_user_data->target = TargetObject;
|
||||
PropertyAnimation_0_user_data->val = -1;
|
||||
lv_anim_t PropertyAnimation_0;
|
||||
lv_anim_init(&PropertyAnimation_0);
|
||||
lv_anim_set_time(&PropertyAnimation_0, 100);
|
||||
lv_anim_set_user_data(&PropertyAnimation_0, PropertyAnimation_0_user_data);
|
||||
lv_anim_set_custom_exec_cb(&PropertyAnimation_0, _ui_anim_callback_set_height );
|
||||
lv_anim_set_values(&PropertyAnimation_0, 0, -10 );
|
||||
lv_anim_set_path_cb( &PropertyAnimation_0, lv_anim_path_linear);
|
||||
lv_anim_set_delay( &PropertyAnimation_0, delay + 0 );
|
||||
lv_anim_set_deleted_cb( &PropertyAnimation_0, _ui_anim_callback_free_user_data );
|
||||
lv_anim_set_playback_time(&PropertyAnimation_0, 100);
|
||||
lv_anim_set_playback_delay(&PropertyAnimation_0, 0);
|
||||
lv_anim_set_repeat_count(&PropertyAnimation_0, LV_ANIM_REPEAT_INFINITE );
|
||||
lv_anim_set_repeat_delay(&PropertyAnimation_0, 1000);
|
||||
lv_anim_set_early_apply( &PropertyAnimation_0, false );
|
||||
lv_anim_set_get_value_cb(&PropertyAnimation_0, &_ui_anim_callback_get_height );
|
||||
lv_anim_start(&PropertyAnimation_0);
|
||||
ui_anim_user_data_t *PropertyAnimation_0_user_data = lv_mem_alloc(sizeof(ui_anim_user_data_t));
|
||||
PropertyAnimation_0_user_data->target = TargetObject;
|
||||
PropertyAnimation_0_user_data->val = -1;
|
||||
lv_anim_t PropertyAnimation_0;
|
||||
lv_anim_init(&PropertyAnimation_0);
|
||||
lv_anim_set_time(&PropertyAnimation_0, 100);
|
||||
lv_anim_set_user_data(&PropertyAnimation_0, PropertyAnimation_0_user_data);
|
||||
lv_anim_set_custom_exec_cb(&PropertyAnimation_0, _ui_anim_callback_set_height);
|
||||
lv_anim_set_values(&PropertyAnimation_0, 0, -10);
|
||||
lv_anim_set_path_cb(&PropertyAnimation_0, lv_anim_path_linear);
|
||||
lv_anim_set_delay(&PropertyAnimation_0, delay + 0);
|
||||
lv_anim_set_deleted_cb(&PropertyAnimation_0, _ui_anim_callback_free_user_data);
|
||||
lv_anim_set_playback_time(&PropertyAnimation_0, 100);
|
||||
lv_anim_set_playback_delay(&PropertyAnimation_0, 0);
|
||||
lv_anim_set_repeat_count(&PropertyAnimation_0, LV_ANIM_REPEAT_INFINITE);
|
||||
lv_anim_set_repeat_delay(&PropertyAnimation_0, 1000);
|
||||
lv_anim_set_early_apply(&PropertyAnimation_0, false);
|
||||
lv_anim_set_get_value_cb(&PropertyAnimation_0, &_ui_anim_callback_get_height);
|
||||
lv_anim_start(&PropertyAnimation_0);
|
||||
|
||||
}
|
||||
|
||||
///////////////////// FUNCTIONS ////////////////////
|
||||
void ui_event_ButtonSetup( lv_event_t * e) {
|
||||
lv_event_code_t event_code = lv_event_get_code(e);lv_obj_t * target = lv_event_get_target(e);
|
||||
if ( event_code == LV_EVENT_CLICKED) {
|
||||
EventBtnSetupClick( e );
|
||||
}
|
||||
void ui_event_ButtonSetup(lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t event_code = lv_event_get_code(e);
|
||||
if (event_code == LV_EVENT_CLICKED) {
|
||||
EventBtnSetupClick(e);
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////// SCREENS ////////////////////
|
||||
void ui_ScreenSetup_screen_init(void)
|
||||
|
||||
void ui_init(void)
|
||||
{
|
||||
ui_ScreenSetup = lv_obj_create(NULL);
|
||||
lv_obj_clear_flag( ui_ScreenSetup, LV_OBJ_FLAG_SCROLLABLE ); /// Flags
|
||||
lv_obj_set_style_bg_img_src( ui_ScreenSetup, &ui_img_setup_bg_png, LV_PART_MAIN | LV_STATE_DEFAULT );
|
||||
lv_disp_t *dispp = lv_disp_get_default();
|
||||
lv_theme_t *theme = lv_theme_default_init(dispp, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED),
|
||||
false, LV_FONT_DEFAULT);
|
||||
|
||||
ui_ImageSetupTextBg = lv_img_create(ui_ScreenSetup);
|
||||
lv_img_set_src(ui_ImageSetupTextBg, &ui_img_setup_text_bg_png);
|
||||
lv_obj_set_width( ui_ImageSetupTextBg, 320);
|
||||
lv_obj_set_height( ui_ImageSetupTextBg, 240);
|
||||
lv_obj_set_align( ui_ImageSetupTextBg, LV_ALIGN_CENTER );
|
||||
lv_obj_add_flag( ui_ImageSetupTextBg, LV_OBJ_FLAG_ADV_HITTEST ); /// Flags
|
||||
lv_obj_clear_flag( ui_ImageSetupTextBg, LV_OBJ_FLAG_SCROLLABLE ); /// Flags
|
||||
lv_img_set_zoom(ui_ImageSetupTextBg,560);
|
||||
|
||||
ui_PanelSetupSteps = lv_obj_create(ui_ScreenSetup);
|
||||
lv_obj_set_width( ui_PanelSetupSteps, 320);
|
||||
lv_obj_set_height( ui_PanelSetupSteps, 240);
|
||||
lv_obj_set_x( ui_PanelSetupSteps, -1 );
|
||||
lv_obj_set_y( ui_PanelSetupSteps, -2 );
|
||||
lv_obj_clear_flag( ui_PanelSetupSteps, LV_OBJ_FLAG_SCROLLABLE ); /// Flags
|
||||
lv_obj_set_style_radius(ui_PanelSetupSteps, 0, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_PanelSetupSteps, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT );
|
||||
lv_obj_set_style_bg_opa(ui_PanelSetupSteps, 0, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui_PanelSetupSteps, 0, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui_PanelSetupSteps, 0, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui_PanelSetupSteps, 0, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui_PanelSetupSteps, 0, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui_PanelSetupSteps, 0, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
lv_indev_t *indev = lv_indev_get_next(NULL);
|
||||
if (lv_indev_get_type(indev) == LV_INDEV_TYPE_ENCODER) {
|
||||
g_btn_op_group = lv_group_create();
|
||||
lv_indev_set_group(indev, g_btn_op_group);
|
||||
indev->driver->long_press_time = 1000;
|
||||
indev->driver->long_press_repeat_time = 5 * 1000;
|
||||
}
|
||||
|
||||
lv_obj_set_style_border_width(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_width(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_pad(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_row(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_column(ui_PanelSetupSteps, 0, LV_PART_SCROLLBAR| LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelSetupStepContent = lv_label_create(ui_PanelSetupSteps);
|
||||
lv_obj_set_width( ui_LabelSetupStepContent, lv_pct(88));
|
||||
lv_obj_set_height( ui_LabelSetupStepContent, lv_pct(61));
|
||||
lv_obj_set_x( ui_LabelSetupStepContent, lv_pct(0) );
|
||||
lv_obj_set_y( ui_LabelSetupStepContent, lv_pct(20) );
|
||||
lv_obj_set_align( ui_LabelSetupStepContent, LV_ALIGN_TOP_MID );
|
||||
lv_label_set_text(ui_LabelSetupStepContent,"1. Connect ESP-Box to PC.\n2. Open \"ESP-Box\" folder.\n3. Edit \"init.config\" file with Wi-Fi SSID, password, and OpenAI key.\n4. Save the file.\n5. Restart the device.");
|
||||
lv_obj_set_style_text_color(ui_LabelSetupStepContent, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT );
|
||||
lv_obj_set_style_text_opa(ui_LabelSetupStepContent, 255, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_letter_space(ui_LabelSetupStepContent, 0, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_line_space(ui_LabelSetupStepContent, 5, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelSetupStepContent, &ui_font_PingFangEN14, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelSetupStepTile = lv_label_create(ui_PanelSetupSteps);
|
||||
lv_obj_set_width( ui_LabelSetupStepTile, 230);
|
||||
lv_obj_set_height( ui_LabelSetupStepTile, LV_SIZE_CONTENT); /// 140
|
||||
lv_obj_set_x( ui_LabelSetupStepTile, 45 );
|
||||
lv_obj_set_y( ui_LabelSetupStepTile, 15 );
|
||||
lv_label_set_text(ui_LabelSetupStepTile,"Steps");
|
||||
lv_obj_set_style_text_color(ui_LabelSetupStepTile, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT );
|
||||
lv_obj_set_style_text_opa(ui_LabelSetupStepTile, 255, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_LabelSetupStepTile, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelSetupStepTile, &ui_font_PingFangEN20, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
|
||||
ui_ButtonSetup = lv_btn_create(ui_PanelSetupSteps);
|
||||
lv_obj_set_width( ui_ButtonSetup, 72);
|
||||
lv_obj_set_height( ui_ButtonSetup, 24);
|
||||
lv_obj_set_x( ui_ButtonSetup, 0 );
|
||||
lv_obj_set_y( ui_ButtonSetup, -20 );
|
||||
lv_obj_set_align( ui_ButtonSetup, LV_ALIGN_BOTTOM_MID );
|
||||
lv_obj_add_flag( ui_ButtonSetup, LV_OBJ_FLAG_SCROLL_ON_FOCUS ); /// Flags
|
||||
lv_obj_clear_flag( ui_ButtonSetup, LV_OBJ_FLAG_SCROLLABLE ); /// Flags
|
||||
lv_obj_set_style_radius(ui_ButtonSetup, 17, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_ButtonSetup, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT );
|
||||
lv_obj_set_style_bg_opa(ui_ButtonSetup, 255, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelSetupBtn = lv_label_create(ui_ButtonSetup);
|
||||
lv_obj_set_width( ui_LabelSetupBtn, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height( ui_LabelSetupBtn, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_align( ui_LabelSetupBtn, LV_ALIGN_CENTER );
|
||||
lv_label_set_text(ui_LabelSetupBtn,"Restart");
|
||||
lv_obj_set_style_text_color(ui_LabelSetupBtn, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT );
|
||||
lv_obj_set_style_text_opa(ui_LabelSetupBtn, 255, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_LabelSetupBtn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelSetupBtn, &ui_font_PingFangEN16, LV_PART_MAIN| LV_STATE_DEFAULT);
|
||||
|
||||
lv_obj_add_event_cb(ui_ButtonSetup, ui_event_ButtonSetup, LV_EVENT_ALL, NULL);
|
||||
|
||||
}
|
||||
|
||||
void ui_init( void )
|
||||
{
|
||||
lv_disp_t *dispp = lv_disp_get_default();
|
||||
lv_theme_t *theme = lv_theme_default_init(dispp, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED), false, LV_FONT_DEFAULT);
|
||||
lv_disp_set_theme(dispp, theme);
|
||||
ui_ScreenSetup_screen_init();
|
||||
ui____initial_actions0 = lv_obj_create(NULL);
|
||||
lv_disp_load_scr( ui_ScreenSetup);
|
||||
lv_disp_set_theme(dispp, theme);
|
||||
ui_ScreenSetup_screen_init();
|
||||
ui____initial_actions0 = lv_obj_create(NULL);
|
||||
lv_disp_load_scr(ui_ScreenSetup);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// This file was generated by SquareLine Studio
|
||||
// SquareLine Studio version: SquareLine Studio 1.2.3
|
||||
// SquareLine Studio version: SquareLine Studio 1.3.1
|
||||
// LVGL version: 8.3.4
|
||||
// Project name: box_reset_mode
|
||||
|
||||
@@ -10,32 +10,35 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "lvgl.h"
|
||||
#include "lvgl.h"
|
||||
|
||||
#include "ui_helpers.h"
|
||||
#include "ui_events.h"
|
||||
void sleep_body_up_down_Animation( lv_obj_t *TargetObject, int delay);
|
||||
void listen_eye_blink_Animation( lv_obj_t *TargetObject, int delay);
|
||||
void listen_eye_screen_move_Animation( lv_obj_t *TargetObject, int delay);
|
||||
void get_eye_blink_Animation( lv_obj_t *TargetObject, int delay);
|
||||
void sleep_body_up_down_Animation(lv_obj_t *TargetObject, int delay);
|
||||
void listen_eye_blink_Animation(lv_obj_t *TargetObject, int delay);
|
||||
void listen_eye_screen_move_Animation(lv_obj_t *TargetObject, int delay);
|
||||
void get_eye_blink_Animation(lv_obj_t *TargetObject, int delay);
|
||||
// SCREEN: ui_ScreenSetup
|
||||
void ui_ScreenSetup_screen_init(void);
|
||||
extern lv_obj_t *ui_ScreenSetup;
|
||||
extern lv_obj_t *ui_ImageSetupTextBg;
|
||||
extern lv_obj_t *ui_PanelSetupSteps;
|
||||
extern lv_obj_t *ui_LabelSetupStepContent;
|
||||
extern lv_obj_t *ui_LabelSetupStepTile;
|
||||
void ui_event_ButtonSetup( lv_event_t * e);
|
||||
void ui_event_ButtonSetup(lv_event_t *e);
|
||||
extern lv_obj_t *ui_ButtonSetup;
|
||||
extern lv_obj_t *ui_LabelSetupBtn;
|
||||
extern lv_obj_t *ui____initial_actions0;
|
||||
|
||||
LV_IMG_DECLARE(ui_img_setup_bg_png); // assets\setup_bg.png
|
||||
LV_IMG_DECLARE(ui_img_setup_text_bg_png); // assets\setup_text_bg.png
|
||||
|
||||
LV_IMG_DECLARE( ui_img_setup_bg_png); // assets\setup_bg.png
|
||||
LV_IMG_DECLARE( ui_img_setup_text_bg_png); // assets\setup_text_bg.png
|
||||
|
||||
|
||||
LV_FONT_DECLARE( ui_font_PingFangEN14);
|
||||
LV_FONT_DECLARE( ui_font_PingFangEN16);
|
||||
LV_FONT_DECLARE( ui_font_PingFangEN20);
|
||||
LV_FONT_DECLARE(ui_font_PingFangEN14);
|
||||
LV_FONT_DECLARE(ui_font_PingFangEN16);
|
||||
LV_FONT_DECLARE(ui_font_PingFangEN20);
|
||||
|
||||
// EVENT: event for ESP32_S3_BOX_Lite
|
||||
lv_group_t *ui_get_btn_op_group(void);
|
||||
|
||||
void ui_init(void);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// This file was generated by SquareLine Studio
|
||||
// SquareLine Studio version: SquareLine Studio 1.2.3
|
||||
// SquareLine Studio version: SquareLine Studio 1.3.1
|
||||
// LVGL version: 8.3.4
|
||||
// Project name: box_reset_mode
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void EventBtnSetupClick(lv_event_t * e);
|
||||
void EventBtnSetupClick(lv_event_t *e);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
|
||||
@@ -1,232 +1,294 @@
|
||||
// This file was generated by SquareLine Studio
|
||||
// SquareLine Studio version: SquareLine Studio 1.2.3
|
||||
// SquareLine Studio version: SquareLine Studio 1.3.1
|
||||
// LVGL version: 8.3.4
|
||||
// Project name: box_reset_mode
|
||||
|
||||
#include "ui_helpers.h"
|
||||
|
||||
void _ui_bar_set_property( lv_obj_t *target, int id, int val)
|
||||
void _ui_bar_set_property(lv_obj_t *target, int id, int val)
|
||||
{
|
||||
if (id == _UI_BAR_PROPERTY_VALUE_WITH_ANIM) lv_bar_set_value(target, val, LV_ANIM_ON);
|
||||
if (id == _UI_BAR_PROPERTY_VALUE) lv_bar_set_value(target, val, LV_ANIM_OFF);
|
||||
}
|
||||
|
||||
void _ui_basic_set_property( lv_obj_t *target, int id, int val)
|
||||
{
|
||||
if (id == _UI_BASIC_PROPERTY_POSITION_X) lv_obj_set_x(target, val);
|
||||
if (id == _UI_BASIC_PROPERTY_POSITION_Y) lv_obj_set_y(target, val);
|
||||
if (id == _UI_BASIC_PROPERTY_WIDTH) lv_obj_set_width(target, val);
|
||||
if (id == _UI_BASIC_PROPERTY_HEIGHT) lv_obj_set_height(target, val);
|
||||
}
|
||||
|
||||
|
||||
void _ui_dropdown_set_property( lv_obj_t *target, int id, int val)
|
||||
{
|
||||
if (id == _UI_DROPDOWN_PROPERTY_SELECTED) lv_dropdown_set_selected(target, val);
|
||||
}
|
||||
|
||||
void _ui_image_set_property( lv_obj_t *target, int id, uint8_t *val)
|
||||
{
|
||||
if (id == _UI_IMAGE_PROPERTY_IMAGE) lv_img_set_src(target, val);
|
||||
}
|
||||
|
||||
void _ui_label_set_property( lv_obj_t *target, int id, char *val)
|
||||
{
|
||||
if (id == _UI_LABEL_PROPERTY_TEXT) lv_label_set_text(target, val);
|
||||
}
|
||||
|
||||
|
||||
void _ui_roller_set_property( lv_obj_t *target, int id, int val)
|
||||
{
|
||||
if (id == _UI_ROLLER_PROPERTY_SELECTED_WITH_ANIM) lv_roller_set_selected(target, val, LV_ANIM_ON);
|
||||
if (id == _UI_ROLLER_PROPERTY_SELECTED) lv_roller_set_selected(target, val, LV_ANIM_OFF);
|
||||
}
|
||||
|
||||
void _ui_slider_set_property( lv_obj_t *target, int id, int val)
|
||||
{
|
||||
if (id == _UI_SLIDER_PROPERTY_VALUE_WITH_ANIM) lv_slider_set_value(target, val, LV_ANIM_ON);
|
||||
if (id == _UI_SLIDER_PROPERTY_VALUE) lv_slider_set_value(target, val, LV_ANIM_OFF);
|
||||
}
|
||||
|
||||
|
||||
void _ui_screen_change( lv_obj_t *target, lv_scr_load_anim_t fademode, int spd, int delay)
|
||||
{
|
||||
lv_scr_load_anim(target, fademode, spd, delay, false);
|
||||
}
|
||||
|
||||
void _ui_arc_increment( lv_obj_t *target, int val)
|
||||
{
|
||||
int old = lv_arc_get_value(target);
|
||||
lv_arc_set_value(target, old+val);
|
||||
lv_event_send(target,LV_EVENT_VALUE_CHANGED, 0);
|
||||
}
|
||||
|
||||
void _ui_bar_increment( lv_obj_t *target, int val, int anm)
|
||||
{
|
||||
int old = lv_bar_get_value(target);
|
||||
lv_bar_set_value(target, old+val, anm);
|
||||
}
|
||||
|
||||
void _ui_slider_increment( lv_obj_t *target, int val, int anm)
|
||||
{
|
||||
int old = lv_slider_get_value(target);
|
||||
lv_slider_set_value(target, old+val, anm);
|
||||
lv_event_send(target,LV_EVENT_VALUE_CHANGED, 0);
|
||||
}
|
||||
|
||||
void _ui_keyboard_set_target( lv_obj_t *keyboard, lv_obj_t *textarea)
|
||||
{
|
||||
lv_keyboard_set_textarea(keyboard, textarea);
|
||||
}
|
||||
|
||||
void _ui_flag_modify( lv_obj_t *target, int32_t flag, int value)
|
||||
{
|
||||
if (value==_UI_MODIFY_FLAG_TOGGLE)
|
||||
{
|
||||
if ( lv_obj_has_flag(target,flag) ) lv_obj_clear_flag(target,flag);
|
||||
else lv_obj_add_flag(target,flag);
|
||||
if (id == _UI_BAR_PROPERTY_VALUE_WITH_ANIM) {
|
||||
lv_bar_set_value(target, val, LV_ANIM_ON);
|
||||
}
|
||||
else if (value==_UI_MODIFY_FLAG_ADD) lv_obj_add_flag(target,flag);
|
||||
else lv_obj_clear_flag(target,flag);
|
||||
}
|
||||
void _ui_state_modify( lv_obj_t *target, int32_t state, int value)
|
||||
{
|
||||
if (value==_UI_MODIFY_STATE_TOGGLE)
|
||||
{
|
||||
if ( lv_obj_has_state(target,state) ) lv_obj_clear_state(target,state);
|
||||
else lv_obj_add_state(target,state);
|
||||
if (id == _UI_BAR_PROPERTY_VALUE) {
|
||||
lv_bar_set_value(target, val, LV_ANIM_OFF);
|
||||
}
|
||||
else if (value==_UI_MODIFY_STATE_ADD) lv_obj_add_state(target,state);
|
||||
else lv_obj_clear_state(target,state);
|
||||
}
|
||||
|
||||
void _ui_opacity_set( lv_obj_t *target, int val)
|
||||
void _ui_basic_set_property(lv_obj_t *target, int id, int val)
|
||||
{
|
||||
lv_obj_set_style_opa(target, val, 0);
|
||||
if (id == _UI_BASIC_PROPERTY_POSITION_X) {
|
||||
lv_obj_set_x(target, val);
|
||||
}
|
||||
if (id == _UI_BASIC_PROPERTY_POSITION_Y) {
|
||||
lv_obj_set_y(target, val);
|
||||
}
|
||||
if (id == _UI_BASIC_PROPERTY_WIDTH) {
|
||||
lv_obj_set_width(target, val);
|
||||
}
|
||||
if (id == _UI_BASIC_PROPERTY_HEIGHT) {
|
||||
lv_obj_set_height(target, val);
|
||||
}
|
||||
}
|
||||
|
||||
void _ui_dropdown_set_property(lv_obj_t *target, int id, int val)
|
||||
{
|
||||
if (id == _UI_DROPDOWN_PROPERTY_SELECTED) {
|
||||
lv_dropdown_set_selected(target, val);
|
||||
}
|
||||
}
|
||||
|
||||
void _ui_image_set_property(lv_obj_t *target, int id, uint8_t *val)
|
||||
{
|
||||
if (id == _UI_IMAGE_PROPERTY_IMAGE) {
|
||||
lv_img_set_src(target, val);
|
||||
}
|
||||
}
|
||||
|
||||
void _ui_label_set_property(lv_obj_t *target, int id, const char *val)
|
||||
{
|
||||
if (id == _UI_LABEL_PROPERTY_TEXT) {
|
||||
lv_label_set_text(target, val);
|
||||
}
|
||||
}
|
||||
|
||||
void _ui_roller_set_property(lv_obj_t *target, int id, int val)
|
||||
{
|
||||
if (id == _UI_ROLLER_PROPERTY_SELECTED_WITH_ANIM) {
|
||||
lv_roller_set_selected(target, val, LV_ANIM_ON);
|
||||
}
|
||||
if (id == _UI_ROLLER_PROPERTY_SELECTED) {
|
||||
lv_roller_set_selected(target, val, LV_ANIM_OFF);
|
||||
}
|
||||
}
|
||||
|
||||
void _ui_slider_set_property(lv_obj_t *target, int id, int val)
|
||||
{
|
||||
if (id == _UI_SLIDER_PROPERTY_VALUE_WITH_ANIM) {
|
||||
lv_slider_set_value(target, val, LV_ANIM_ON);
|
||||
}
|
||||
if (id == _UI_SLIDER_PROPERTY_VALUE) {
|
||||
lv_slider_set_value(target, val, LV_ANIM_OFF);
|
||||
}
|
||||
}
|
||||
|
||||
void _ui_screen_change(lv_obj_t **target, lv_scr_load_anim_t fademode, int spd, int delay, void (*target_init)(void))
|
||||
{
|
||||
if (*target == NULL) {
|
||||
target_init();
|
||||
}
|
||||
lv_scr_load_anim(*target, fademode, spd, delay, false);
|
||||
}
|
||||
|
||||
void _ui_screen_delete(lv_obj_t **target)
|
||||
{
|
||||
if (*target == NULL) {
|
||||
lv_obj_del(*target);
|
||||
target = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void _ui_arc_increment(lv_obj_t *target, int val)
|
||||
{
|
||||
int old = lv_arc_get_value(target);
|
||||
lv_arc_set_value(target, old + val);
|
||||
lv_event_send(target, LV_EVENT_VALUE_CHANGED, 0);
|
||||
}
|
||||
|
||||
void _ui_bar_increment(lv_obj_t *target, int val, int anm)
|
||||
{
|
||||
int old = lv_bar_get_value(target);
|
||||
lv_bar_set_value(target, old + val, anm);
|
||||
}
|
||||
|
||||
void _ui_slider_increment(lv_obj_t *target, int val, int anm)
|
||||
{
|
||||
int old = lv_slider_get_value(target);
|
||||
lv_slider_set_value(target, old + val, anm);
|
||||
lv_event_send(target, LV_EVENT_VALUE_CHANGED, 0);
|
||||
}
|
||||
|
||||
void _ui_keyboard_set_target(lv_obj_t *keyboard, lv_obj_t *textarea)
|
||||
{
|
||||
lv_keyboard_set_textarea(keyboard, textarea);
|
||||
}
|
||||
|
||||
void _ui_flag_modify(lv_obj_t *target, int32_t flag, int value)
|
||||
{
|
||||
if (value == _UI_MODIFY_FLAG_TOGGLE) {
|
||||
if (lv_obj_has_flag(target, flag)) {
|
||||
lv_obj_clear_flag(target, flag);
|
||||
} else {
|
||||
lv_obj_add_flag(target, flag);
|
||||
}
|
||||
} else if (value == _UI_MODIFY_FLAG_ADD) {
|
||||
lv_obj_add_flag(target, flag);
|
||||
} else {
|
||||
lv_obj_clear_flag(target, flag);
|
||||
}
|
||||
}
|
||||
void _ui_state_modify(lv_obj_t *target, int32_t state, int value)
|
||||
{
|
||||
if (value == _UI_MODIFY_STATE_TOGGLE) {
|
||||
if (lv_obj_has_state(target, state)) {
|
||||
lv_obj_clear_state(target, state);
|
||||
} else {
|
||||
lv_obj_add_state(target, state);
|
||||
}
|
||||
} else if (value == _UI_MODIFY_STATE_ADD) {
|
||||
lv_obj_add_state(target, state);
|
||||
} else {
|
||||
lv_obj_clear_state(target, state);
|
||||
}
|
||||
}
|
||||
|
||||
void scr_unloaded_delete_cb(lv_event_t *e)
|
||||
{
|
||||
lv_obj_t **var = lv_event_get_user_data(e);
|
||||
lv_obj_del(*var);
|
||||
(*var) = NULL;
|
||||
}
|
||||
|
||||
void _ui_opacity_set(lv_obj_t *target, int val)
|
||||
{
|
||||
lv_obj_set_style_opa(target, val, 0);
|
||||
}
|
||||
|
||||
void _ui_anim_callback_free_user_data(lv_anim_t *a)
|
||||
{
|
||||
lv_mem_free(a->user_data);
|
||||
a->user_data=NULL;
|
||||
lv_mem_free(a->user_data);
|
||||
a->user_data = NULL;
|
||||
}
|
||||
|
||||
void _ui_anim_callback_set_x(lv_anim_t* a, int32_t v)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_obj_set_x(usr->target, v);
|
||||
}
|
||||
|
||||
void _ui_anim_callback_set_y(lv_anim_t* a, int32_t v)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_obj_set_y(usr->target, v);
|
||||
}
|
||||
|
||||
void _ui_anim_callback_set_width(lv_anim_t* a, int32_t v)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_obj_set_width(usr->target, v);
|
||||
}
|
||||
|
||||
void _ui_anim_callback_set_height(lv_anim_t* a, int32_t v)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_obj_set_height(usr->target, v);
|
||||
}
|
||||
|
||||
void _ui_anim_callback_set_opacity(lv_anim_t* a, int32_t v)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_obj_set_style_opa(usr->target, v, 0);
|
||||
}
|
||||
|
||||
void _ui_anim_callback_set_image_zoom(lv_anim_t* a, int32_t v)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_img_set_zoom(usr->target, v);
|
||||
}
|
||||
|
||||
void _ui_anim_callback_set_image_angle(lv_anim_t* a, int32_t v)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_img_set_angle(usr->target, v);
|
||||
}
|
||||
|
||||
void _ui_anim_callback_set_image_frame(lv_anim_t* a, int32_t v)
|
||||
{
|
||||
void _ui_anim_callback_set_x(lv_anim_t *a, int32_t v)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
usr->val = v;
|
||||
if ( v<0 ) v=0;
|
||||
if ( v>=usr->imgset_size ) v=usr->imgset_size-1;
|
||||
lv_obj_set_x(usr->target, v);
|
||||
}
|
||||
|
||||
void _ui_anim_callback_set_y(lv_anim_t *a, int32_t v)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_obj_set_y(usr->target, v);
|
||||
}
|
||||
|
||||
void _ui_anim_callback_set_width(lv_anim_t *a, int32_t v)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_obj_set_width(usr->target, v);
|
||||
}
|
||||
|
||||
void _ui_anim_callback_set_height(lv_anim_t *a, int32_t v)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_obj_set_height(usr->target, v);
|
||||
}
|
||||
|
||||
void _ui_anim_callback_set_opacity(lv_anim_t *a, int32_t v)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_obj_set_style_opa(usr->target, v, 0);
|
||||
}
|
||||
|
||||
void _ui_anim_callback_set_image_zoom(lv_anim_t *a, int32_t v)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_img_set_zoom(usr->target, v);
|
||||
}
|
||||
|
||||
void _ui_anim_callback_set_image_angle(lv_anim_t *a, int32_t v)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_img_set_angle(usr->target, v);
|
||||
}
|
||||
|
||||
void _ui_anim_callback_set_image_frame(lv_anim_t *a, int32_t v)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
usr->val = v;
|
||||
if (v < 0) {
|
||||
v = 0;
|
||||
}
|
||||
if (v >= usr->imgset_size) {
|
||||
v = usr->imgset_size - 1;
|
||||
}
|
||||
lv_img_set_src(usr->target, usr->imgset[v]);
|
||||
}
|
||||
|
||||
int32_t _ui_anim_callback_get_x(lv_anim_t* a)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_obj_get_x_aligned(usr->target);
|
||||
}
|
||||
|
||||
int32_t _ui_anim_callback_get_y(lv_anim_t* a)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_obj_get_y_aligned(usr->target);
|
||||
}
|
||||
|
||||
int32_t _ui_anim_callback_get_width(lv_anim_t* a)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_obj_get_width(usr->target);
|
||||
}
|
||||
|
||||
int32_t _ui_anim_callback_get_height(lv_anim_t* a)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_obj_get_height(usr->target);
|
||||
}
|
||||
|
||||
int32_t _ui_anim_callback_get_opacity(lv_anim_t* a)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_obj_get_style_opa(usr->target, 0);
|
||||
}
|
||||
|
||||
int32_t _ui_anim_callback_get_image_zoom(lv_anim_t* a)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_img_get_zoom(usr->target);
|
||||
}
|
||||
|
||||
int32_t _ui_anim_callback_get_image_angle(lv_anim_t* a)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_img_get_angle(usr->target);
|
||||
}
|
||||
|
||||
int32_t _ui_anim_callback_get_image_frame(lv_anim_t* a)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return usr->val;
|
||||
}
|
||||
|
||||
void _ui_arc_set_text_value( lv_obj_t *trg, lv_obj_t *src, char *prefix, char *postfix)
|
||||
int32_t _ui_anim_callback_get_x(lv_anim_t *a)
|
||||
{
|
||||
char buf[_UI_TEMPORARY_STRING_BUFFER_SIZE];
|
||||
lv_snprintf(buf, sizeof(buf), "%s%d%s", prefix, (int)lv_arc_get_value(src), postfix);
|
||||
lv_label_set_text(trg, buf);
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_obj_get_x_aligned(usr->target);
|
||||
}
|
||||
|
||||
void _ui_slider_set_text_value( lv_obj_t *trg, lv_obj_t *src, char *prefix, char *postfix)
|
||||
int32_t _ui_anim_callback_get_y(lv_anim_t *a)
|
||||
{
|
||||
char buf[_UI_TEMPORARY_STRING_BUFFER_SIZE];
|
||||
lv_snprintf(buf, sizeof(buf), "%s%d%s", prefix, (int)lv_slider_get_value(src), postfix);
|
||||
lv_label_set_text(trg, buf);
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_obj_get_y_aligned(usr->target);
|
||||
}
|
||||
void _ui_checked_set_text_value( lv_obj_t *trg, lv_obj_t *src, char *txt_on, char *txt_off)
|
||||
|
||||
int32_t _ui_anim_callback_get_width(lv_anim_t *a)
|
||||
{
|
||||
if (lv_obj_has_state(src,LV_STATE_CHECKED)) lv_label_set_text(trg,txt_on);
|
||||
else lv_label_set_text(trg,txt_off);
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_obj_get_width(usr->target);
|
||||
}
|
||||
|
||||
int32_t _ui_anim_callback_get_height(lv_anim_t *a)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_obj_get_height(usr->target);
|
||||
}
|
||||
|
||||
int32_t _ui_anim_callback_get_opacity(lv_anim_t *a)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_obj_get_style_opa(usr->target, 0);
|
||||
}
|
||||
|
||||
int32_t _ui_anim_callback_get_image_zoom(lv_anim_t *a)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_img_get_zoom(usr->target);
|
||||
}
|
||||
|
||||
int32_t _ui_anim_callback_get_image_angle(lv_anim_t *a)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_img_get_angle(usr->target);
|
||||
}
|
||||
|
||||
int32_t _ui_anim_callback_get_image_frame(lv_anim_t *a)
|
||||
{
|
||||
ui_anim_user_data_t *usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return usr->val;
|
||||
}
|
||||
|
||||
void _ui_arc_set_text_value(lv_obj_t *trg, lv_obj_t *src, const char *prefix, const char *postfix)
|
||||
{
|
||||
char buf[_UI_TEMPORARY_STRING_BUFFER_SIZE];
|
||||
lv_snprintf(buf, sizeof(buf), "%s%d%s", prefix, (int)lv_arc_get_value(src), postfix);
|
||||
lv_label_set_text(trg, buf);
|
||||
}
|
||||
|
||||
void _ui_slider_set_text_value(lv_obj_t *trg, lv_obj_t *src, const char *prefix, const char *postfix)
|
||||
{
|
||||
char buf[_UI_TEMPORARY_STRING_BUFFER_SIZE];
|
||||
lv_snprintf(buf, sizeof(buf), "%s%d%s", prefix, (int)lv_slider_get_value(src), postfix);
|
||||
lv_label_set_text(trg, buf);
|
||||
}
|
||||
void _ui_checked_set_text_value(lv_obj_t *trg, lv_obj_t *src, const char *txt_on, const char *txt_off)
|
||||
{
|
||||
if (lv_obj_has_state(src, LV_STATE_CHECKED)) {
|
||||
lv_label_set_text(trg, txt_on);
|
||||
} else {
|
||||
lv_label_set_text(trg, txt_off);
|
||||
}
|
||||
}
|
||||
|
||||
void _ui_spinbox_step(lv_obj_t *target, int val, int anm)
|
||||
{
|
||||
int old = lv_slider_get_value(target);
|
||||
lv_slider_set_value(target, old + val, anm);
|
||||
lv_event_send(target, LV_EVENT_VALUE_CHANGED, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// This file was generated by SquareLine Studio
|
||||
// SquareLine Studio version: SquareLine Studio 1.2.3
|
||||
// SquareLine Studio version: SquareLine Studio 1.3.1
|
||||
// LVGL version: 8.3.4
|
||||
// Project name: box_reset_mode
|
||||
|
||||
@@ -15,52 +15,56 @@ extern "C" {
|
||||
#define _UI_TEMPORARY_STRING_BUFFER_SIZE 32
|
||||
#define _UI_BAR_PROPERTY_VALUE 0
|
||||
#define _UI_BAR_PROPERTY_VALUE_WITH_ANIM 1
|
||||
void _ui_bar_set_property( lv_obj_t *target, int id, int val);
|
||||
void _ui_bar_set_property(lv_obj_t *target, int id, int val);
|
||||
|
||||
#define _UI_BASIC_PROPERTY_POSITION_X 0
|
||||
#define _UI_BASIC_PROPERTY_POSITION_Y 1
|
||||
#define _UI_BASIC_PROPERTY_WIDTH 2
|
||||
#define _UI_BASIC_PROPERTY_HEIGHT 3
|
||||
void _ui_basic_set_property( lv_obj_t *target, int id, int val);
|
||||
void _ui_basic_set_property(lv_obj_t *target, int id, int val);
|
||||
|
||||
#define _UI_DROPDOWN_PROPERTY_SELECTED 0
|
||||
void _ui_dropdown_set_property( lv_obj_t *target, int id, int val);
|
||||
void _ui_dropdown_set_property(lv_obj_t *target, int id, int val);
|
||||
|
||||
#define _UI_IMAGE_PROPERTY_IMAGE 0
|
||||
void _ui_image_set_property( lv_obj_t *target, int id, uint8_t *val);
|
||||
void _ui_image_set_property(lv_obj_t *target, int id, uint8_t *val);
|
||||
|
||||
#define _UI_LABEL_PROPERTY_TEXT 0
|
||||
void _ui_label_set_property( lv_obj_t *target, int id, char *val);
|
||||
void _ui_label_set_property(lv_obj_t *target, int id, const char *val);
|
||||
|
||||
#define _UI_ROLLER_PROPERTY_SELECTED 0
|
||||
#define _UI_ROLLER_PROPERTY_SELECTED_WITH_ANIM 1
|
||||
void _ui_roller_set_property( lv_obj_t *target, int id, int val);
|
||||
void _ui_roller_set_property(lv_obj_t *target, int id, int val);
|
||||
|
||||
#define _UI_SLIDER_PROPERTY_VALUE 0
|
||||
#define _UI_SLIDER_PROPERTY_VALUE_WITH_ANIM 1
|
||||
void _ui_slider_set_property( lv_obj_t *target, int id, int val);
|
||||
void _ui_slider_set_property(lv_obj_t *target, int id, int val);
|
||||
|
||||
void _ui_screen_change( lv_obj_t *target, lv_scr_load_anim_t fademode, int spd, int delay);
|
||||
void _ui_screen_change(lv_obj_t **target, lv_scr_load_anim_t fademode, int spd, int delay, void (*target_init)(void));
|
||||
|
||||
void _ui_arc_increment( lv_obj_t *target, int val);
|
||||
void _ui_screen_delete(lv_obj_t **target);
|
||||
|
||||
void _ui_bar_increment( lv_obj_t *target, int val, int anm);
|
||||
void _ui_arc_increment(lv_obj_t *target, int val);
|
||||
|
||||
void _ui_slider_increment( lv_obj_t *target, int val, int anm);
|
||||
void _ui_bar_increment(lv_obj_t *target, int val, int anm);
|
||||
|
||||
void _ui_keyboard_set_target( lv_obj_t *keyboard, lv_obj_t *textarea);
|
||||
void _ui_slider_increment(lv_obj_t *target, int val, int anm);
|
||||
|
||||
void _ui_keyboard_set_target(lv_obj_t *keyboard, lv_obj_t *textarea);
|
||||
|
||||
#define _UI_MODIFY_FLAG_ADD 0
|
||||
#define _UI_MODIFY_FLAG_REMOVE 1
|
||||
#define _UI_MODIFY_FLAG_TOGGLE 2
|
||||
void _ui_flag_modify( lv_obj_t *target, int32_t flag, int value);
|
||||
void _ui_flag_modify(lv_obj_t *target, int32_t flag, int value);
|
||||
|
||||
#define _UI_MODIFY_STATE_ADD 0
|
||||
#define _UI_MODIFY_STATE_REMOVE 1
|
||||
#define _UI_MODIFY_STATE_TOGGLE 2
|
||||
void _ui_state_modify( lv_obj_t *target, int32_t state, int value);
|
||||
void _ui_state_modify(lv_obj_t *target, int32_t state, int value);
|
||||
|
||||
void _ui_opacity_set( lv_obj_t *target, int val);
|
||||
void scr_unloaded_delete_cb(lv_event_t *e);
|
||||
|
||||
void _ui_opacity_set(lv_obj_t *target, int val);
|
||||
|
||||
/** Describes an animation*/
|
||||
typedef struct _ui_anim_user_data_t {
|
||||
@@ -71,44 +75,45 @@ typedef struct _ui_anim_user_data_t {
|
||||
} ui_anim_user_data_t;
|
||||
void _ui_anim_callback_free_user_data(lv_anim_t *a);
|
||||
|
||||
void _ui_anim_callback_set_x(lv_anim_t* a, int32_t v);
|
||||
void _ui_anim_callback_set_x(lv_anim_t *a, int32_t v);
|
||||
|
||||
void _ui_anim_callback_set_y(lv_anim_t* a, int32_t v);
|
||||
void _ui_anim_callback_set_y(lv_anim_t *a, int32_t v);
|
||||
|
||||
void _ui_anim_callback_set_width(lv_anim_t* a, int32_t v);
|
||||
void _ui_anim_callback_set_width(lv_anim_t *a, int32_t v);
|
||||
|
||||
void _ui_anim_callback_set_height(lv_anim_t* a, int32_t v);
|
||||
void _ui_anim_callback_set_height(lv_anim_t *a, int32_t v);
|
||||
|
||||
void _ui_anim_callback_set_opacity(lv_anim_t* a, int32_t v);
|
||||
void _ui_anim_callback_set_opacity(lv_anim_t *a, int32_t v);
|
||||
|
||||
void _ui_anim_callback_set_image_zoom(lv_anim_t* a, int32_t v);
|
||||
void _ui_anim_callback_set_image_zoom(lv_anim_t *a, int32_t v);
|
||||
|
||||
void _ui_anim_callback_set_image_angle(lv_anim_t* a, int32_t v);
|
||||
void _ui_anim_callback_set_image_angle(lv_anim_t *a, int32_t v);
|
||||
|
||||
void _ui_anim_callback_set_image_frame(lv_anim_t* a, int32_t v);
|
||||
void _ui_anim_callback_set_image_frame(lv_anim_t *a, int32_t v);
|
||||
|
||||
int32_t _ui_anim_callback_get_x(lv_anim_t* a);
|
||||
int32_t _ui_anim_callback_get_x(lv_anim_t *a);
|
||||
|
||||
int32_t _ui_anim_callback_get_y(lv_anim_t* a);
|
||||
int32_t _ui_anim_callback_get_y(lv_anim_t *a);
|
||||
|
||||
int32_t _ui_anim_callback_get_width(lv_anim_t* a);
|
||||
int32_t _ui_anim_callback_get_width(lv_anim_t *a);
|
||||
|
||||
int32_t _ui_anim_callback_get_height(lv_anim_t* a);
|
||||
int32_t _ui_anim_callback_get_height(lv_anim_t *a);
|
||||
|
||||
int32_t _ui_anim_callback_get_opacity(lv_anim_t* a);
|
||||
int32_t _ui_anim_callback_get_opacity(lv_anim_t *a);
|
||||
|
||||
int32_t _ui_anim_callback_get_image_zoom(lv_anim_t* a);
|
||||
int32_t _ui_anim_callback_get_image_zoom(lv_anim_t *a);
|
||||
|
||||
int32_t _ui_anim_callback_get_image_angle(lv_anim_t* a);
|
||||
int32_t _ui_anim_callback_get_image_angle(lv_anim_t *a);
|
||||
|
||||
int32_t _ui_anim_callback_get_image_frame(lv_anim_t* a);
|
||||
int32_t _ui_anim_callback_get_image_frame(lv_anim_t *a);
|
||||
|
||||
void _ui_arc_set_text_value( lv_obj_t *trg, lv_obj_t *src, char *prefix, char *postfix);
|
||||
void _ui_arc_set_text_value(lv_obj_t *trg, lv_obj_t *src, const char *prefix, const char *postfix);
|
||||
|
||||
void _ui_slider_set_text_value( lv_obj_t *trg, lv_obj_t *src, char *prefix, char *postfix);
|
||||
void _ui_slider_set_text_value(lv_obj_t *trg, lv_obj_t *src, const char *prefix, const char *postfix);
|
||||
|
||||
void _ui_checked_set_text_value( lv_obj_t *trg, lv_obj_t *src, char *txt_on, char *txt_off);
|
||||
void _ui_checked_set_text_value(lv_obj_t *trg, lv_obj_t *src, const char *txt_on, const char *txt_off);
|
||||
|
||||
void _ui_spinbox_step(lv_obj_t *target, int val, int anm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -121,6 +121,12 @@
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": -534729152,
|
||||
"strtype": "IMAGE/Overflow_visible",
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 1276252291,
|
||||
"strtype": "OBJECT/Flex_in_new_track",
|
||||
@@ -175,6 +181,12 @@
|
||||
"strval": "True",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": -261005922,
|
||||
"strtype": "IMAGE/Scroll_with_arrow",
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 2061529886,
|
||||
"strtype": "OBJECT/Scroll_one",
|
||||
@@ -408,6 +420,12 @@
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": -1289899904,
|
||||
"strtype": "LABEL/Overflow_visible",
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": -1747116036,
|
||||
"strtype": "OBJECT/Flex_in_new_track",
|
||||
@@ -462,6 +480,12 @@
|
||||
"strval": "True",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 2091080113,
|
||||
"strtype": "LABEL/Scroll_with_arrow",
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 1182993321,
|
||||
"strtype": "OBJECT/Scroll_one",
|
||||
@@ -548,7 +572,7 @@
|
||||
{
|
||||
"nid": 1897820454,
|
||||
"strtype": "LABEL/Text",
|
||||
"strval": "1. Connect ESP-Box to PC.\\n2. Open \\\"ESP-Box\\\" folder.\\n3. Edit \\\"init.config\\\" file with Wi-Fi SSID, password, and OpenAI key.\\n4. Save the file.\\n5. Restart the device.",
|
||||
"strval": "1. Connect ESP-Box to PC.\\n2. Open \\\"ESP-Box\\\" folder.\\n3. Edit \\\"CONFIG.INI\\\" file with Wi-Fi SSID, password, and OpenAI key.\\n4. Save the file.\\n5. Restart the device.",
|
||||
"InheritedType": 10
|
||||
},
|
||||
{
|
||||
@@ -717,6 +741,12 @@
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 282845424,
|
||||
"strtype": "LABEL/Overflow_visible",
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": -1601871850,
|
||||
"strtype": "OBJECT/Flex_in_new_track",
|
||||
@@ -771,6 +801,12 @@
|
||||
"strval": "True",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 1706460746,
|
||||
"strtype": "LABEL/Scroll_with_arrow",
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": -137668690,
|
||||
"strtype": "OBJECT/Scroll_one",
|
||||
@@ -1027,6 +1063,12 @@
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 1045079446,
|
||||
"strtype": "LABEL/Overflow_visible",
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 1411435768,
|
||||
"strtype": "OBJECT/Flex_in_new_track",
|
||||
@@ -1081,6 +1123,12 @@
|
||||
"strval": "True",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 719705616,
|
||||
"strtype": "LABEL/Scroll_with_arrow",
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 37279642,
|
||||
"strtype": "OBJECT/Scroll_one",
|
||||
@@ -1332,6 +1380,12 @@
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 66152471,
|
||||
"strtype": "BUTTON/Overflow_visible",
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 266784115,
|
||||
"strtype": "OBJECT/Flex_in_new_track",
|
||||
@@ -1386,6 +1440,12 @@
|
||||
"strval": "True",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": -2134175473,
|
||||
"strtype": "BUTTON/Scroll_with_arrow",
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 1924789901,
|
||||
"strtype": "OBJECT/Scroll_one",
|
||||
@@ -1672,6 +1732,12 @@
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 1216637716,
|
||||
"strtype": "PANEL/Overflow_visible",
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 1263037123,
|
||||
"strtype": "OBJECT/Flex_in_new_track",
|
||||
@@ -1726,6 +1792,12 @@
|
||||
"strval": "True",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 1524671369,
|
||||
"strtype": "PANEL/Scroll_with_arrow",
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 943733697,
|
||||
"strtype": "OBJECT/Scroll_one",
|
||||
@@ -1975,6 +2047,12 @@
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 1780148675,
|
||||
"strtype": "SCREEN/Overflow_visible",
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": -823078378,
|
||||
"strtype": "OBJECT/Flex_in_new_track",
|
||||
@@ -1999,6 +2077,12 @@
|
||||
"strval": "True",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": 755366583,
|
||||
"strtype": "SCREEN/Scroll_with_arrow",
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": -134511224,
|
||||
"strtype": "OBJECT/Scroll_one",
|
||||
@@ -2065,6 +2149,17 @@
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"nid": -597114594,
|
||||
"strtype": "SCREEN/Screen",
|
||||
"InheritedType": 1
|
||||
},
|
||||
{
|
||||
"nid": -1307804889,
|
||||
"strtype": "SCREEN/Temporary",
|
||||
"strval": "False",
|
||||
"InheritedType": 2
|
||||
},
|
||||
{
|
||||
"part": "lv.PART.MAIN",
|
||||
"childs": [
|
||||
@@ -2919,10 +3014,11 @@
|
||||
"offset_x": 0,
|
||||
"offset_y": 0,
|
||||
"shape": "RECTANGLE",
|
||||
"multilang": null,
|
||||
"description": "",
|
||||
"board": "ESP-BOX",
|
||||
"board_version": "1.0.0",
|
||||
"editor_version": "1.2.3",
|
||||
"editor_version": "1.3.1",
|
||||
"image": "",
|
||||
"force_export_images": false,
|
||||
"pointfilter": false,
|
||||
|
||||
@@ -52,6 +52,10 @@ static void wifi_check_timer_handler(lv_timer_t *timer)
|
||||
lv_obj_clear_flag(ui_PanelSetupSteps, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_add_flag(ui_PanelSetupWifi, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_timer_del(timer);
|
||||
if (ui_get_btn_op_group()) {
|
||||
lv_group_remove_all_objs(ui_get_btn_op_group());
|
||||
lv_group_add_obj(ui_get_btn_op_group(), ui_ButtonSetup);
|
||||
}
|
||||
} else if (WIFI_STATUS_CONNECTED_FAILED == wifi_connected_already()) {
|
||||
lv_label_set_text(ui_LabelSetupWifi, LABEL_NOT_WIFI_TEXT);
|
||||
} else {
|
||||
|
||||
@@ -246,11 +246,9 @@ static void wifi_init_sta(void)
|
||||
static void network_task(void *args)
|
||||
{
|
||||
net_event_t net_event;
|
||||
TickType_t tick;
|
||||
|
||||
wifi_init_sta();
|
||||
|
||||
tick = xTaskGetTickCount();
|
||||
while (1) {
|
||||
if (pdPASS == xQueueReceive(wifi_event_queue, &net_event, portTICK_RATE_MS / 5)) {
|
||||
switch (net_event) {
|
||||
|
||||
@@ -43,7 +43,7 @@ esp_err_t start_openai(uint8_t *audio, int audio_len)
|
||||
audioTranscription->setTemperature(audioTranscription, 0.2);
|
||||
|
||||
chatCompletion->setModel(chatCompletion, "gpt-3.5-turbo");
|
||||
chatCompletion->setSystem(chatCompletion, "Code geek");
|
||||
chatCompletion->setSystem(chatCompletion, "user");
|
||||
chatCompletion->setMaxTokens(chatCompletion, CONFIG_MAX_TOKEN);
|
||||
chatCompletion->setTemperature(chatCompletion, 0.2);
|
||||
chatCompletion->setStop(chatCompletion, "\r");
|
||||
|
||||
@@ -405,7 +405,11 @@ void ui_ScreenListen_screen_init(void)
|
||||
lv_obj_set_align(ui_ImageListenSettings, LV_ALIGN_CENTER);
|
||||
lv_obj_add_flag(ui_ImageListenSettings, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
|
||||
lv_obj_clear_flag(ui_ImageListenSettings, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||
lv_obj_set_style_border_color(ui_ImageListenSettings, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_opa(ui_ImageListenSettings, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui_ImageListenSettings, 5, LV_PART_MAIN | LV_STATE_FOCUSED);
|
||||
|
||||
lv_obj_add_event_cb(ui_PanelSleep, ui_event_PanelSleep, LV_EVENT_ALL, NULL);
|
||||
lv_obj_add_event_cb(ui_ImageListenSettings, ui_event_ImageListenSettings, LV_EVENT_ALL, NULL);
|
||||
|
||||
}
|
||||
|
||||
@@ -67,6 +67,10 @@ void ui_ScreenReset_screen_init(void)
|
||||
lv_obj_add_flag(ui_ImageResetBack, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
|
||||
lv_obj_clear_flag(ui_ImageResetBack, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||
|
||||
lv_obj_set_style_border_color(ui_ImageResetBack, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_opa(ui_ImageResetBack, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui_ImageResetBack, 5, LV_PART_MAIN | LV_STATE_FOCUSED);
|
||||
|
||||
lv_obj_add_event_cb(ui_ButtonResetConfirm, ui_event_ButtonResetConfirm, LV_EVENT_ALL, NULL);
|
||||
lv_obj_add_event_cb(ui_ImageResetBack, ui_event_ImageResetBack, LV_EVENT_ALL, NULL);
|
||||
|
||||
|
||||
@@ -152,9 +152,14 @@ void ui_ScreenSettings_screen_init(void)
|
||||
lv_obj_set_height(ui_ImageSettingsBack, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_ImageSettingsBack, 10);
|
||||
lv_obj_set_y(ui_ImageSettingsBack, 10);
|
||||
lv_obj_add_flag(ui_ImageSettingsBack, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||
lv_obj_add_flag(ui_ImageSettingsBack, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
|
||||
lv_obj_clear_flag(ui_ImageSettingsBack, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||
|
||||
lv_obj_set_style_border_color(ui_ImageSettingsBack, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_opa(ui_ImageSettingsBack, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui_ImageSettingsBack, 5, LV_PART_MAIN | LV_STATE_FOCUSED);
|
||||
|
||||
ui_ImageSettingsReset = lv_img_create(ui_ScreenSettings);
|
||||
lv_img_set_src(ui_ImageSettingsReset, &ui_img_reset_icon_png);
|
||||
lv_obj_set_width(ui_ImageSettingsReset, LV_SIZE_CONTENT); /// 1
|
||||
@@ -162,11 +167,16 @@ void ui_ScreenSettings_screen_init(void)
|
||||
lv_obj_set_x(ui_ImageSettingsReset, -10);
|
||||
lv_obj_set_y(ui_ImageSettingsReset, 10);
|
||||
lv_obj_set_align(ui_ImageSettingsReset, LV_ALIGN_TOP_RIGHT);
|
||||
lv_obj_add_flag(ui_ImageSettingsReset, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||
lv_obj_add_flag(ui_ImageSettingsReset, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
|
||||
lv_obj_clear_flag(ui_ImageSettingsReset, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||
|
||||
lv_obj_set_style_border_color(ui_ImageSettingsReset, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_opa(ui_ImageSettingsReset, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui_ImageSettingsReset, 5, LV_PART_MAIN | LV_STATE_FOCUSED);
|
||||
|
||||
|
||||
lv_obj_add_event_cb(ui_DropdownSettingsRegion, ui_event_DropdownSettingsRegion, LV_EVENT_ALL, NULL);
|
||||
lv_obj_add_event_cb(ui_ImageSettingsBack, ui_event_ImageSettingsBack, LV_EVENT_ALL, NULL);
|
||||
lv_obj_add_event_cb(ui_ImageSettingsReset, ui_event_ImageSettingsReset, LV_EVENT_ALL, NULL);
|
||||
|
||||
}
|
||||
|
||||
@@ -146,4 +146,9 @@ void ui_ScreenSetup_screen_init(void)
|
||||
|
||||
lv_obj_add_event_cb(ui_ImageSetupWifiReset, ui_event_ImageSetupWifiReset, LV_EVENT_ALL, NULL);
|
||||
lv_obj_add_event_cb(ui_ButtonSetup, ui_event_ButtonSetup, LV_EVENT_ALL, NULL);
|
||||
|
||||
if (ui_get_btn_op_group()) {
|
||||
lv_group_remove_all_objs(ui_get_btn_op_group());
|
||||
lv_group_add_obj(ui_get_btn_op_group(), ui_ImageSetupWifiReset);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,6 +53,10 @@ void ui_ScreenWifiReset_screen_init(void)
|
||||
lv_obj_add_flag(ui_ImageWifiResetBack, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
|
||||
lv_obj_clear_flag(ui_ImageWifiResetBack, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||
|
||||
lv_obj_set_style_border_color(ui_ImageWifiResetBack, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_opa(ui_ImageWifiResetBack, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui_ImageWifiResetBack, 5, LV_PART_MAIN | LV_STATE_FOCUSED);
|
||||
|
||||
ui_LabelWifiResetContent = lv_label_create(ui_ScreenWifiReset);
|
||||
lv_obj_set_width(ui_LabelWifiResetContent, lv_pct(88));
|
||||
lv_obj_set_height(ui_LabelWifiResetContent, lv_pct(61));
|
||||
|
||||
+202
-144
@@ -5,112 +5,113 @@
|
||||
|
||||
#include "ui.h"
|
||||
#include "ui_helpers.h"
|
||||
#include <stdio.h>
|
||||
|
||||
///////////////////// VARIABLES ////////////////////
|
||||
void sleep_body_up_down_Animation(lv_obj_t * TargetObject, int delay);
|
||||
void listen_eye_blink_Animation(lv_obj_t * TargetObject, int delay);
|
||||
void listen_eye_screen_move_Animation(lv_obj_t * TargetObject, int delay);
|
||||
void get_eye_blink_Animation(lv_obj_t * TargetObject, int delay);
|
||||
|
||||
void sleep_body_up_down_Animation(lv_obj_t *TargetObject, int delay);
|
||||
void listen_eye_blink_Animation(lv_obj_t *TargetObject, int delay);
|
||||
void listen_eye_screen_move_Animation(lv_obj_t *TargetObject, int delay);
|
||||
void get_eye_blink_Animation(lv_obj_t *TargetObject, int delay);
|
||||
int check;
|
||||
// SCREEN: ui_ScreenSetup
|
||||
void ui_ScreenSetup_screen_init(void);
|
||||
lv_obj_t * ui_ScreenSetup;
|
||||
lv_obj_t * ui_ImageSetupTextBg;
|
||||
lv_obj_t * ui_PanelSetupWifi;
|
||||
lv_obj_t * ui_LabelSetupWifi;
|
||||
void ui_event_ImageSetupWifiReset(lv_event_t * e);
|
||||
lv_obj_t * ui_ImageSetupWifiReset;
|
||||
lv_obj_t * ui_PanelSetupSteps;
|
||||
lv_obj_t * ui_LabelSetupStepContent;
|
||||
lv_obj_t * ui_LabelSetupStepTile;
|
||||
void ui_event_ButtonSetup(lv_event_t * e);
|
||||
lv_obj_t * ui_ButtonSetup;
|
||||
lv_obj_t * ui_LabelSetupBtn;
|
||||
lv_obj_t *ui_ScreenSetup;
|
||||
lv_obj_t *ui_ImageSetupTextBg;
|
||||
lv_obj_t *ui_PanelSetupWifi;
|
||||
lv_obj_t *ui_LabelSetupWifi;
|
||||
void ui_event_ImageSetupWifiReset(lv_event_t *e);
|
||||
lv_obj_t *ui_ImageSetupWifiReset;
|
||||
lv_obj_t *ui_PanelSetupSteps;
|
||||
lv_obj_t *ui_LabelSetupStepContent;
|
||||
lv_obj_t *ui_LabelSetupStepTile;
|
||||
void ui_event_ButtonSetup(lv_event_t *e);
|
||||
lv_obj_t *ui_ButtonSetup;
|
||||
lv_obj_t *ui_LabelSetupBtn;
|
||||
|
||||
// SCREEN: ui_ScreenWifiReset
|
||||
void ui_ScreenWifiReset_screen_init(void);
|
||||
lv_obj_t * ui_ScreenWifiReset;
|
||||
lv_obj_t * ui_LabelWifiResetTitle;
|
||||
void ui_event_ButtonWifiResetConfirm(lv_event_t * e);
|
||||
lv_obj_t * ui_ButtonWifiResetConfirm;
|
||||
lv_obj_t * ui_LabelSetupBtn1;
|
||||
void ui_event_ImageWifiResetBack(lv_event_t * e);
|
||||
lv_obj_t * ui_ImageWifiResetBack;
|
||||
lv_obj_t * ui_LabelWifiResetContent;
|
||||
lv_obj_t *ui_ScreenWifiReset;
|
||||
lv_obj_t *ui_LabelWifiResetTitle;
|
||||
void ui_event_ButtonWifiResetConfirm(lv_event_t *e);
|
||||
lv_obj_t *ui_ButtonWifiResetConfirm;
|
||||
lv_obj_t *ui_LabelSetupBtn1;
|
||||
void ui_event_ImageWifiResetBack(lv_event_t *e);
|
||||
lv_obj_t *ui_ImageWifiResetBack;
|
||||
lv_obj_t *ui_LabelWifiResetContent;
|
||||
|
||||
// SCREEN: ui_ScreenListen
|
||||
void ui_ScreenListen_screen_init(void);
|
||||
lv_obj_t * ui_ScreenListen;
|
||||
lv_obj_t * ui_ImageBodyShadow;
|
||||
void ui_event_PanelSleep(lv_event_t * e);
|
||||
lv_obj_t * ui_PanelSleep;
|
||||
lv_obj_t * ui_ImageSleepBody;
|
||||
lv_obj_t * ui_Image3;
|
||||
lv_obj_t * ui_ImageSleepEye;
|
||||
lv_obj_t * ui_ContainerBigZ;
|
||||
lv_obj_t * ui_ContainerSmallZ;
|
||||
lv_obj_t * ui_PanelListen;
|
||||
lv_obj_t * ui_ImageListenBackGlow;
|
||||
lv_obj_t * ui_ImageListenBody;
|
||||
lv_obj_t * ui_ImageListenEyeScreen;
|
||||
lv_obj_t * ui_ImageListenEye;
|
||||
lv_obj_t * ui_PanelGet;
|
||||
lv_obj_t * ui_ImageGetBackGlow;
|
||||
lv_obj_t * ui_ImageGetBody;
|
||||
lv_obj_t * ui_ImageGetEyeScreen;
|
||||
lv_obj_t * ui_ImageGetEye;
|
||||
lv_obj_t * ui_PanelReply;
|
||||
lv_obj_t * ui_ImageReplyBg;
|
||||
lv_obj_t * ui_LabelReplyQuestion;
|
||||
lv_obj_t * ui_ImageRelyBody;
|
||||
lv_obj_t * ui_ImageReplyBodyShadow;
|
||||
lv_obj_t * ui_ContainerReplyContent;
|
||||
lv_obj_t * ui_LabelReplyContent;
|
||||
lv_obj_t * ui_ImageReplyLogo;
|
||||
lv_obj_t * ui_LabelListenSpeak;
|
||||
void ui_event_ImageListenSettings(lv_event_t * e);
|
||||
lv_obj_t * ui_ImageListenSettings;
|
||||
lv_obj_t *ui_ScreenListen;
|
||||
lv_obj_t *ui_ImageBodyShadow;
|
||||
void ui_event_PanelSleep(lv_event_t *e);
|
||||
lv_obj_t *ui_PanelSleep;
|
||||
lv_obj_t *ui_ImageSleepBody;
|
||||
lv_obj_t *ui_Image3;
|
||||
lv_obj_t *ui_ImageSleepEye;
|
||||
lv_obj_t *ui_ContainerBigZ;
|
||||
lv_obj_t *ui_ContainerSmallZ;
|
||||
lv_obj_t *ui_PanelListen;
|
||||
lv_obj_t *ui_ImageListenBackGlow;
|
||||
lv_obj_t *ui_ImageListenBody;
|
||||
lv_obj_t *ui_ImageListenEyeScreen;
|
||||
lv_obj_t *ui_ImageListenEye;
|
||||
lv_obj_t *ui_PanelGet;
|
||||
lv_obj_t *ui_ImageGetBackGlow;
|
||||
lv_obj_t *ui_ImageGetBody;
|
||||
lv_obj_t *ui_ImageGetEyeScreen;
|
||||
lv_obj_t *ui_ImageGetEye;
|
||||
lv_obj_t *ui_PanelReply;
|
||||
lv_obj_t *ui_ImageReplyBg;
|
||||
lv_obj_t *ui_LabelReplyQuestion;
|
||||
lv_obj_t *ui_ImageRelyBody;
|
||||
lv_obj_t *ui_ImageReplyBodyShadow;
|
||||
lv_obj_t *ui_ContainerReplyContent;
|
||||
lv_obj_t *ui_LabelReplyContent;
|
||||
lv_obj_t *ui_ImageReplyLogo;
|
||||
lv_obj_t *ui_LabelListenSpeak;
|
||||
void ui_event_ImageListenSettings(lv_event_t *e);
|
||||
lv_obj_t *ui_ImageListenSettings;
|
||||
|
||||
// SCREEN: ui_ScreenSettings
|
||||
void ui_ScreenSettings_screen_init(void);
|
||||
lv_obj_t * ui_ScreenSettings;
|
||||
lv_obj_t * ui_LabelSettingsTile;
|
||||
lv_obj_t * ui_PanelSettings;
|
||||
lv_obj_t * ui_PanelSettingsSplitBar;
|
||||
lv_obj_t * ui_PanelSettingsSplitBarLeft;
|
||||
lv_obj_t * ui_SettingsSettingsSplitBarRight;
|
||||
lv_obj_t * ui_PanelSettingsRegion;
|
||||
lv_obj_t * ui_LabelSettingsRegion;
|
||||
void ui_event_DropdownSettingsRegion(lv_event_t * e);
|
||||
lv_obj_t * ui_DropdownSettingsRegion;
|
||||
void ui_event_ImageSettingsBack(lv_event_t * e);
|
||||
lv_obj_t * ui_ImageSettingsBack;
|
||||
void ui_event_ImageSettingsReset(lv_event_t * e);
|
||||
lv_obj_t * ui_ImageSettingsReset;
|
||||
lv_obj_t *ui_ScreenSettings;
|
||||
lv_obj_t *ui_LabelSettingsTile;
|
||||
lv_obj_t *ui_PanelSettings;
|
||||
lv_obj_t *ui_PanelSettingsSplitBar;
|
||||
lv_obj_t *ui_PanelSettingsSplitBarLeft;
|
||||
lv_obj_t *ui_SettingsSettingsSplitBarRight;
|
||||
lv_obj_t *ui_PanelSettingsRegion;
|
||||
lv_obj_t *ui_LabelSettingsRegion;
|
||||
void ui_event_DropdownSettingsRegion(lv_event_t *e);
|
||||
lv_obj_t *ui_DropdownSettingsRegion;
|
||||
void ui_event_ImageSettingsBack(lv_event_t *e);
|
||||
lv_obj_t *ui_ImageSettingsBack;
|
||||
void ui_event_ImageSettingsReset(lv_event_t *e);
|
||||
lv_obj_t *ui_ImageSettingsReset;
|
||||
|
||||
// SCREEN: ui_ScreenReset
|
||||
void ui_ScreenReset_screen_init(void);
|
||||
lv_obj_t * ui_ScreenReset;
|
||||
lv_obj_t * ui_LabelResetTitle;
|
||||
lv_obj_t * ui_LabelResetContent;
|
||||
void ui_event_ButtonResetConfirm(lv_event_t * e);
|
||||
lv_obj_t * ui_ButtonResetConfirm;
|
||||
lv_obj_t * ui_LabelSetupBtn2;
|
||||
void ui_event_ImageResetBack(lv_event_t * e);
|
||||
lv_obj_t * ui_ImageResetBack;
|
||||
void ui_event____initial_actions0(lv_event_t * e);
|
||||
lv_obj_t * ui____initial_actions0;
|
||||
const lv_img_dsc_t * ui_imgset_listen_body_eyes_[2] = {&ui_img_listen_body_eyes_1_png, &ui_img_listen_body_eyes_2_png};
|
||||
lv_obj_t *ui_ScreenReset;
|
||||
lv_obj_t *ui_LabelResetTitle;
|
||||
lv_obj_t *ui_LabelResetContent;
|
||||
void ui_event_ButtonResetConfirm(lv_event_t *e);
|
||||
lv_obj_t *ui_ButtonResetConfirm;
|
||||
lv_obj_t *ui_LabelSetupBtn2;
|
||||
void ui_event_ImageResetBack(lv_event_t *e);
|
||||
lv_obj_t *ui_ImageResetBack;
|
||||
void ui_event____initial_actions0(lv_event_t *e);
|
||||
lv_obj_t *ui____initial_actions0;
|
||||
const lv_img_dsc_t *ui_imgset_listen_body_eyes_[2] = {&ui_img_listen_body_eyes_1_png, &ui_img_listen_body_eyes_2_png};
|
||||
|
||||
|
||||
static lv_group_t *g_btn_op_group = NULL;
|
||||
|
||||
///////////////////// TEST LVGL SETTINGS ////////////////////
|
||||
#if LV_COLOR_DEPTH != 16
|
||||
#error "LV_COLOR_DEPTH should be 16bit to match SquareLine Studio's settings"
|
||||
#error "LV_COLOR_DEPTH should be 16bit to match SquareLine Studio's settings"
|
||||
#endif
|
||||
#if LV_COLOR_16_SWAP !=1
|
||||
#error "LV_COLOR_16_SWAP should be 1 to match SquareLine Studio's settings"
|
||||
#error "LV_COLOR_16_SWAP should be 1 to match SquareLine Studio's settings"
|
||||
#endif
|
||||
|
||||
lv_group_t *ui_get_btn_op_group(void)
|
||||
@@ -119,9 +120,9 @@ lv_group_t *ui_get_btn_op_group(void)
|
||||
}
|
||||
|
||||
///////////////////// ANIMATIONS ////////////////////
|
||||
void sleep_body_up_down_Animation(lv_obj_t * TargetObject, int delay)
|
||||
void sleep_body_up_down_Animation(lv_obj_t *TargetObject, int delay)
|
||||
{
|
||||
ui_anim_user_data_t * PropertyAnimation_0_user_data = lv_mem_alloc(sizeof(ui_anim_user_data_t));
|
||||
ui_anim_user_data_t *PropertyAnimation_0_user_data = lv_mem_alloc(sizeof(ui_anim_user_data_t));
|
||||
PropertyAnimation_0_user_data->target = TargetObject;
|
||||
PropertyAnimation_0_user_data->val = -1;
|
||||
lv_anim_t PropertyAnimation_0;
|
||||
@@ -142,9 +143,9 @@ void sleep_body_up_down_Animation(lv_obj_t * TargetObject, int delay)
|
||||
lv_anim_start(&PropertyAnimation_0);
|
||||
|
||||
}
|
||||
void listen_eye_blink_Animation(lv_obj_t * TargetObject, int delay)
|
||||
void listen_eye_blink_Animation(lv_obj_t *TargetObject, int delay)
|
||||
{
|
||||
ui_anim_user_data_t * PropertyAnimation_0_user_data = lv_mem_alloc(sizeof(ui_anim_user_data_t));
|
||||
ui_anim_user_data_t *PropertyAnimation_0_user_data = lv_mem_alloc(sizeof(ui_anim_user_data_t));
|
||||
PropertyAnimation_0_user_data->target = TargetObject;
|
||||
PropertyAnimation_0_user_data->val = -1;
|
||||
lv_anim_t PropertyAnimation_0;
|
||||
@@ -165,9 +166,9 @@ void listen_eye_blink_Animation(lv_obj_t * TargetObject, int delay)
|
||||
lv_anim_start(&PropertyAnimation_0);
|
||||
|
||||
}
|
||||
void listen_eye_screen_move_Animation(lv_obj_t * TargetObject, int delay)
|
||||
void listen_eye_screen_move_Animation(lv_obj_t *TargetObject, int delay)
|
||||
{
|
||||
ui_anim_user_data_t * PropertyAnimation_0_user_data = lv_mem_alloc(sizeof(ui_anim_user_data_t));
|
||||
ui_anim_user_data_t *PropertyAnimation_0_user_data = lv_mem_alloc(sizeof(ui_anim_user_data_t));
|
||||
PropertyAnimation_0_user_data->target = TargetObject;
|
||||
PropertyAnimation_0_user_data->val = -1;
|
||||
lv_anim_t PropertyAnimation_0;
|
||||
@@ -188,9 +189,9 @@ void listen_eye_screen_move_Animation(lv_obj_t * TargetObject, int delay)
|
||||
lv_anim_start(&PropertyAnimation_0);
|
||||
|
||||
}
|
||||
void get_eye_blink_Animation(lv_obj_t * TargetObject, int delay)
|
||||
void get_eye_blink_Animation(lv_obj_t *TargetObject, int delay)
|
||||
{
|
||||
ui_anim_user_data_t * PropertyAnimation_0_user_data = lv_mem_alloc(sizeof(ui_anim_user_data_t));
|
||||
ui_anim_user_data_t *PropertyAnimation_0_user_data = lv_mem_alloc(sizeof(ui_anim_user_data_t));
|
||||
PropertyAnimation_0_user_data->target = TargetObject;
|
||||
PropertyAnimation_0_user_data->val = -1;
|
||||
lv_anim_t PropertyAnimation_0;
|
||||
@@ -213,22 +214,32 @@ void get_eye_blink_Animation(lv_obj_t * TargetObject, int delay)
|
||||
}
|
||||
|
||||
///////////////////// FUNCTIONS ////////////////////
|
||||
void ui_event_ImageSetupWifiReset(lv_event_t * e)
|
||||
void ui_event_ImageSetupWifiReset(lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t event_code = lv_event_get_code(e);
|
||||
if(event_code == LV_EVENT_CLICKED) {
|
||||
|
||||
if (event_code == LV_EVENT_CLICKED) {
|
||||
_ui_screen_change(ui_ScreenWifiReset, LV_SCR_LOAD_ANIM_NONE, 0, 0);
|
||||
if (ui_get_btn_op_group()) {
|
||||
lv_group_remove_all_objs(ui_get_btn_op_group());
|
||||
lv_group_add_obj(ui_get_btn_op_group(), ui_ButtonWifiResetConfirm);
|
||||
lv_group_add_obj(ui_get_btn_op_group(), ui_ImageWifiResetBack);
|
||||
}
|
||||
}
|
||||
}
|
||||
void ui_event_ButtonSetup(lv_event_t * e)
|
||||
|
||||
void ui_event_ButtonSetup(lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t event_code = lv_event_get_code(e);
|
||||
if(event_code == LV_EVENT_CLICKED) {
|
||||
if (event_code == LV_EVENT_CLICKED) {
|
||||
_ui_screen_change(ui_ScreenListen, LV_SCR_LOAD_ANIM_NONE, 0, 0);
|
||||
if(ui_get_btn_op_group()) {
|
||||
|
||||
if (ui_get_btn_op_group()) {
|
||||
lv_group_remove_all_objs(ui_get_btn_op_group());
|
||||
lv_group_add_obj(ui_get_btn_op_group(), ui_PanelSleep);
|
||||
lv_group_add_obj(ui_get_btn_op_group(), ui_ImageListenSettings);
|
||||
}
|
||||
|
||||
sleep_body_up_down_Animation(ui_ImageSleepBody, 0);
|
||||
listen_eye_blink_Animation(ui_ImageListenEye, 0);
|
||||
listen_eye_screen_move_Animation(ui_ImageListenEyeScreen, 0);
|
||||
@@ -240,85 +251,130 @@ void ui_event_ButtonSetup(lv_event_t * e)
|
||||
_ui_flag_modify(ui_PanelReply, LV_OBJ_FLAG_HIDDEN, _UI_MODIFY_FLAG_ADD);
|
||||
}
|
||||
}
|
||||
void ui_event_ButtonWifiResetConfirm(lv_event_t * e)
|
||||
|
||||
void ui_event_ButtonWifiResetConfirm(lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t event_code = lv_event_get_code(e);
|
||||
if(event_code == LV_EVENT_CLICKED) {
|
||||
if (event_code == LV_EVENT_CLICKED) {
|
||||
EventWifiResetConfirmClick(e);
|
||||
}
|
||||
}
|
||||
void ui_event_ImageWifiResetBack(lv_event_t * e)
|
||||
|
||||
void ui_event_ImageWifiResetBack(lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t event_code = lv_event_get_code(e);
|
||||
if(event_code == LV_EVENT_CLICKED) {
|
||||
if (event_code == LV_EVENT_CLICKED) {
|
||||
_ui_screen_change(ui_ScreenSetup, LV_SCR_LOAD_ANIM_NONE, 0, 0);
|
||||
}
|
||||
}
|
||||
void ui_event_PanelSleep(lv_event_t * e)
|
||||
{
|
||||
lv_event_code_t event_code = lv_event_get_code(e);
|
||||
|
||||
if(true == lv_obj_has_flag(ui_PanelSleep, LV_OBJ_FLAG_HIDDEN)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(event_code == LV_EVENT_SHORT_CLICKED) {
|
||||
_ui_flag_modify(ui_PanelListen, LV_OBJ_FLAG_HIDDEN, _UI_MODIFY_FLAG_REMOVE);
|
||||
_ui_flag_modify(ui_PanelSleep, LV_OBJ_FLAG_HIDDEN, _UI_MODIFY_FLAG_ADD);
|
||||
EventPanelSleepClickCb(e);
|
||||
} else if(event_code == LV_EVENT_LONG_PRESSED) {
|
||||
#if CONFIG_BSP_BOARD_ESP32_S3_BOX_Lite
|
||||
lv_event_send(ui_ImageListenSettings, LV_EVENT_CLICKED, NULL);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
void ui_event_ImageListenSettings(lv_event_t * e)
|
||||
{
|
||||
lv_event_code_t event_code = lv_event_get_code(e);
|
||||
if(event_code == LV_EVENT_CLICKED) {
|
||||
_ui_screen_change(ui_ScreenSettings, LV_SCR_LOAD_ANIM_NONE, 0, 0);
|
||||
if(ui_get_btn_op_group()) {
|
||||
if (ui_get_btn_op_group()) {
|
||||
lv_group_remove_all_objs(ui_get_btn_op_group());
|
||||
lv_group_add_obj(ui_get_btn_op_group(), ui_DropdownSettingsRegion);
|
||||
lv_group_add_obj(ui_get_btn_op_group(), ui_ImageSetupWifiReset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ui_event_DropdownSettingsRegion(lv_event_t * e)
|
||||
{
|
||||
}
|
||||
void ui_event_ImageSettingsBack(lv_event_t * e)
|
||||
void ui_event_PanelSleep(lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t event_code = lv_event_get_code(e);
|
||||
if(event_code == LV_EVENT_CLICKED) {
|
||||
|
||||
if (true == lv_obj_has_flag(ui_PanelSleep, LV_OBJ_FLAG_HIDDEN)) {
|
||||
return;
|
||||
}
|
||||
if (event_code == LV_EVENT_SHORT_CLICKED) {
|
||||
_ui_flag_modify(ui_PanelListen, LV_OBJ_FLAG_HIDDEN, _UI_MODIFY_FLAG_REMOVE);
|
||||
_ui_flag_modify(ui_PanelSleep, LV_OBJ_FLAG_HIDDEN, _UI_MODIFY_FLAG_ADD);
|
||||
EventPanelSleepClickCb(e);
|
||||
}
|
||||
}
|
||||
|
||||
void ui_event_ImageListenSettings(lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t event_code = lv_event_get_code(e);
|
||||
|
||||
if (event_code == LV_EVENT_CLICKED) {
|
||||
_ui_screen_change(ui_ScreenSettings, LV_SCR_LOAD_ANIM_NONE, 0, 0);
|
||||
if (ui_get_btn_op_group()) {
|
||||
lv_group_remove_all_objs(ui_get_btn_op_group());
|
||||
lv_group_add_obj(ui_get_btn_op_group(), ui_ImageSettingsBack);
|
||||
lv_group_add_obj(ui_get_btn_op_group(), ui_ImageSettingsReset);
|
||||
check = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*This function is for Server selection currently not using*/
|
||||
void ui_event_DropdownSettingsRegion(lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t event_code = lv_event_get_code(e);
|
||||
// lv_obj_t *target = lv_event_get_target(e);
|
||||
|
||||
if (event_code == LV_EVENT_VALUE_CHANGED) {
|
||||
// EventSettingsRegionValueChange(e);
|
||||
} else if (event_code == LV_EVENT_LONG_PRESSED_REPEAT) {
|
||||
#if CONFIG_BSP_BOARD_ESP32_S3_BOX_Lite
|
||||
lv_event_send(ui_ImageSettingsBack, LV_EVENT_CLICKED, NULL);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void ui_event_ImageSettingsBack(lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t event_code = lv_event_get_code(e);
|
||||
|
||||
if (event_code == LV_EVENT_CLICKED) {
|
||||
_ui_screen_change(ui_ScreenListen, LV_SCR_LOAD_ANIM_NONE, 0, 0);
|
||||
|
||||
lv_obj_clear_flag(ui_PanelSleep, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_add_flag(ui_PanelListen, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_add_flag(ui_PanelReply, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_add_flag(ui_PanelGet, LV_OBJ_FLAG_HIDDEN);
|
||||
|
||||
if (ui_get_btn_op_group()) {
|
||||
lv_group_remove_all_objs(ui_get_btn_op_group());
|
||||
lv_group_add_obj(ui_get_btn_op_group(), ui_PanelSleep);
|
||||
lv_group_add_obj(ui_get_btn_op_group(), ui_ImageListenSettings);
|
||||
}
|
||||
}
|
||||
}
|
||||
void ui_event_ImageSettingsReset(lv_event_t * e)
|
||||
|
||||
void ui_event_ImageSettingsReset(lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t event_code = lv_event_get_code(e);
|
||||
if(event_code == LV_EVENT_CLICKED) {
|
||||
|
||||
if (event_code == LV_EVENT_CLICKED) {
|
||||
_ui_screen_change(ui_ScreenReset, LV_SCR_LOAD_ANIM_NONE, 0, 0);
|
||||
if (ui_get_btn_op_group()) {
|
||||
lv_group_remove_all_objs(ui_get_btn_op_group());
|
||||
lv_group_add_obj(ui_get_btn_op_group(), ui_ButtonResetConfirm);
|
||||
lv_group_add_obj(ui_get_btn_op_group(), ui_ImageResetBack);
|
||||
}
|
||||
}
|
||||
}
|
||||
void ui_event_ButtonResetConfirm(lv_event_t * e)
|
||||
|
||||
void ui_event_ButtonResetConfirm(lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t event_code = lv_event_get_code(e);
|
||||
if(event_code == LV_EVENT_CLICKED) {
|
||||
if (event_code == LV_EVENT_CLICKED) {
|
||||
EventResetConfirm(e);
|
||||
}
|
||||
}
|
||||
void ui_event_ImageResetBack(lv_event_t * e)
|
||||
|
||||
void ui_event_ImageResetBack(lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t event_code = lv_event_get_code(e);
|
||||
if(event_code == LV_EVENT_CLICKED) {
|
||||
|
||||
if (event_code == LV_EVENT_CLICKED) {
|
||||
_ui_screen_change(ui_ScreenSettings, LV_SCR_LOAD_ANIM_NONE, 0, 0);
|
||||
if (ui_get_btn_op_group()) {
|
||||
lv_group_remove_all_objs(ui_get_btn_op_group());
|
||||
lv_group_add_obj(ui_get_btn_op_group(), ui_ImageSettingsBack);
|
||||
lv_group_add_obj(ui_get_btn_op_group(), ui_ImageSettingsReset);
|
||||
}
|
||||
}
|
||||
}
|
||||
void ui_event____initial_actions0(lv_event_t * e)
|
||||
|
||||
void ui_event____initial_actions0(lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t event_code = lv_event_get_code(e);
|
||||
if(event_code == LV_EVENT_SCREEN_LOAD_START) {
|
||||
if (event_code == LV_EVENT_SCREEN_LOAD_START) {
|
||||
_ui_flag_modify(ui_PanelSetupWifi, LV_OBJ_FLAG_HIDDEN, _UI_MODIFY_FLAG_REMOVE);
|
||||
_ui_flag_modify(ui_PanelSetupSteps, LV_OBJ_FLAG_HIDDEN, _UI_MODIFY_FLAG_ADD);
|
||||
}
|
||||
@@ -328,14 +384,16 @@ void ui_event____initial_actions0(lv_event_t * e)
|
||||
|
||||
void ui_init(void)
|
||||
{
|
||||
lv_disp_t * dispp = lv_disp_get_default();
|
||||
lv_theme_t * theme = lv_theme_default_init(dispp, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED),
|
||||
false, LV_FONT_DEFAULT);
|
||||
lv_disp_t *dispp = lv_disp_get_default();
|
||||
lv_theme_t *theme = lv_theme_default_init(dispp, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED),
|
||||
false, LV_FONT_DEFAULT);
|
||||
|
||||
lv_indev_t *indev = lv_indev_get_next(NULL);
|
||||
if (lv_indev_get_type(indev) == LV_INDEV_TYPE_ENCODER) {
|
||||
g_btn_op_group = lv_group_create();
|
||||
lv_indev_set_group(indev, g_btn_op_group);
|
||||
g_btn_op_group = lv_group_create();
|
||||
lv_indev_set_group(indev, g_btn_op_group);
|
||||
indev->driver->long_press_time = 1000;
|
||||
indev->driver->long_press_repeat_time = 5 * 1000;
|
||||
}
|
||||
|
||||
lv_disp_set_theme(dispp, theme);
|
||||
|
||||
@@ -14,94 +14,94 @@ extern "C" {
|
||||
|
||||
#include "ui_helpers.h"
|
||||
#include "ui_events.h"
|
||||
void sleep_body_up_down_Animation(lv_obj_t * TargetObject, int delay);
|
||||
void listen_eye_blink_Animation(lv_obj_t * TargetObject, int delay);
|
||||
void listen_eye_screen_move_Animation(lv_obj_t * TargetObject, int delay);
|
||||
void get_eye_blink_Animation(lv_obj_t * TargetObject, int delay);
|
||||
void sleep_body_up_down_Animation(lv_obj_t *TargetObject, int delay);
|
||||
void listen_eye_blink_Animation(lv_obj_t *TargetObject, int delay);
|
||||
void listen_eye_screen_move_Animation(lv_obj_t *TargetObject, int delay);
|
||||
void get_eye_blink_Animation(lv_obj_t *TargetObject, int delay);
|
||||
// SCREEN: ui_ScreenSetup
|
||||
void ui_ScreenSetup_screen_init(void);
|
||||
extern lv_obj_t * ui_ScreenSetup;
|
||||
extern lv_obj_t * ui_ImageSetupTextBg;
|
||||
extern lv_obj_t * ui_PanelSetupWifi;
|
||||
extern lv_obj_t * ui_LabelSetupWifi;
|
||||
void ui_event_ImageSetupWifiReset(lv_event_t * e);
|
||||
extern lv_obj_t * ui_ImageSetupWifiReset;
|
||||
extern lv_obj_t * ui_PanelSetupSteps;
|
||||
extern lv_obj_t * ui_LabelSetupStepContent;
|
||||
extern lv_obj_t * ui_LabelSetupStepTile;
|
||||
void ui_event_ButtonSetup(lv_event_t * e);
|
||||
extern lv_obj_t * ui_ButtonSetup;
|
||||
extern lv_obj_t * ui_LabelSetupBtn;
|
||||
extern lv_obj_t *ui_ScreenSetup;
|
||||
extern lv_obj_t *ui_ImageSetupTextBg;
|
||||
extern lv_obj_t *ui_PanelSetupWifi;
|
||||
extern lv_obj_t *ui_LabelSetupWifi;
|
||||
void ui_event_ImageSetupWifiReset(lv_event_t *e);
|
||||
extern lv_obj_t *ui_ImageSetupWifiReset;
|
||||
extern lv_obj_t *ui_PanelSetupSteps;
|
||||
extern lv_obj_t *ui_LabelSetupStepContent;
|
||||
extern lv_obj_t *ui_LabelSetupStepTile;
|
||||
void ui_event_ButtonSetup(lv_event_t *e);
|
||||
extern lv_obj_t *ui_ButtonSetup;
|
||||
extern lv_obj_t *ui_LabelSetupBtn;
|
||||
// SCREEN: ui_ScreenWifiReset
|
||||
void ui_ScreenWifiReset_screen_init(void);
|
||||
extern lv_obj_t * ui_ScreenWifiReset;
|
||||
extern lv_obj_t * ui_LabelWifiResetTitle;
|
||||
void ui_event_ButtonWifiResetConfirm(lv_event_t * e);
|
||||
extern lv_obj_t * ui_ButtonWifiResetConfirm;
|
||||
extern lv_obj_t * ui_LabelSetupBtn1;
|
||||
void ui_event_ImageWifiResetBack(lv_event_t * e);
|
||||
extern lv_obj_t * ui_ImageWifiResetBack;
|
||||
extern lv_obj_t * ui_LabelWifiResetContent;
|
||||
extern lv_obj_t *ui_ScreenWifiReset;
|
||||
extern lv_obj_t *ui_LabelWifiResetTitle;
|
||||
void ui_event_ButtonWifiResetConfirm(lv_event_t *e);
|
||||
extern lv_obj_t *ui_ButtonWifiResetConfirm;
|
||||
extern lv_obj_t *ui_LabelSetupBtn1;
|
||||
void ui_event_ImageWifiResetBack(lv_event_t *e);
|
||||
extern lv_obj_t *ui_ImageWifiResetBack;
|
||||
extern lv_obj_t *ui_LabelWifiResetContent;
|
||||
// SCREEN: ui_ScreenListen
|
||||
void ui_ScreenListen_screen_init(void);
|
||||
extern lv_obj_t * ui_ScreenListen;
|
||||
extern lv_obj_t * ui_ImageBodyShadow;
|
||||
void ui_event_PanelSleep(lv_event_t * e);
|
||||
extern lv_obj_t * ui_PanelSleep;
|
||||
extern lv_obj_t * ui_ImageSleepBody;
|
||||
extern lv_obj_t * ui_Image3;
|
||||
extern lv_obj_t * ui_ImageSleepEye;
|
||||
extern lv_obj_t * ui_ContainerBigZ;
|
||||
extern lv_obj_t * ui_ContainerSmallZ;
|
||||
extern lv_obj_t * ui_PanelListen;
|
||||
extern lv_obj_t * ui_ImageListenBackGlow;
|
||||
extern lv_obj_t * ui_ImageListenBody;
|
||||
extern lv_obj_t * ui_ImageListenEyeScreen;
|
||||
extern lv_obj_t * ui_ImageListenEye;
|
||||
extern lv_obj_t * ui_PanelGet;
|
||||
extern lv_obj_t * ui_ImageGetBackGlow;
|
||||
extern lv_obj_t * ui_ImageGetBody;
|
||||
extern lv_obj_t * ui_ImageGetEyeScreen;
|
||||
extern lv_obj_t * ui_ImageGetEye;
|
||||
extern lv_obj_t * ui_PanelReply;
|
||||
extern lv_obj_t * ui_ImageReplyBg;
|
||||
extern lv_obj_t * ui_LabelReplyQuestion;
|
||||
extern lv_obj_t * ui_ImageRelyBody;
|
||||
extern lv_obj_t * ui_ImageReplyBodyShadow;
|
||||
extern lv_obj_t * ui_ContainerReplyContent;
|
||||
extern lv_obj_t * ui_LabelReplyContent;
|
||||
extern lv_obj_t * ui_ImageReplyLogo;
|
||||
extern lv_obj_t * ui_LabelListenSpeak;
|
||||
void ui_event_ImageListenSettings(lv_event_t * e);
|
||||
extern lv_obj_t * ui_ImageListenSettings;
|
||||
extern lv_obj_t *ui_ScreenListen;
|
||||
extern lv_obj_t *ui_ImageBodyShadow;
|
||||
void ui_event_PanelSleep(lv_event_t *e);
|
||||
extern lv_obj_t *ui_PanelSleep;
|
||||
extern lv_obj_t *ui_ImageSleepBody;
|
||||
extern lv_obj_t *ui_Image3;
|
||||
extern lv_obj_t *ui_ImageSleepEye;
|
||||
extern lv_obj_t *ui_ContainerBigZ;
|
||||
extern lv_obj_t *ui_ContainerSmallZ;
|
||||
extern lv_obj_t *ui_PanelListen;
|
||||
extern lv_obj_t *ui_ImageListenBackGlow;
|
||||
extern lv_obj_t *ui_ImageListenBody;
|
||||
extern lv_obj_t *ui_ImageListenEyeScreen;
|
||||
extern lv_obj_t *ui_ImageListenEye;
|
||||
extern lv_obj_t *ui_PanelGet;
|
||||
extern lv_obj_t *ui_ImageGetBackGlow;
|
||||
extern lv_obj_t *ui_ImageGetBody;
|
||||
extern lv_obj_t *ui_ImageGetEyeScreen;
|
||||
extern lv_obj_t *ui_ImageGetEye;
|
||||
extern lv_obj_t *ui_PanelReply;
|
||||
extern lv_obj_t *ui_ImageReplyBg;
|
||||
extern lv_obj_t *ui_LabelReplyQuestion;
|
||||
extern lv_obj_t *ui_ImageRelyBody;
|
||||
extern lv_obj_t *ui_ImageReplyBodyShadow;
|
||||
extern lv_obj_t *ui_ContainerReplyContent;
|
||||
extern lv_obj_t *ui_LabelReplyContent;
|
||||
extern lv_obj_t *ui_ImageReplyLogo;
|
||||
extern lv_obj_t *ui_LabelListenSpeak;
|
||||
void ui_event_ImageListenSettings(lv_event_t *e);
|
||||
extern lv_obj_t *ui_ImageListenSettings;
|
||||
// SCREEN: ui_ScreenSettings
|
||||
void ui_ScreenSettings_screen_init(void);
|
||||
extern lv_obj_t * ui_ScreenSettings;
|
||||
extern lv_obj_t * ui_LabelSettingsTile;
|
||||
extern lv_obj_t * ui_PanelSettings;
|
||||
extern lv_obj_t * ui_PanelSettingsSplitBar;
|
||||
extern lv_obj_t * ui_PanelSettingsSplitBarLeft;
|
||||
extern lv_obj_t * ui_SettingsSettingsSplitBarRight;
|
||||
extern lv_obj_t * ui_PanelSettingsRegion;
|
||||
extern lv_obj_t * ui_LabelSettingsRegion;
|
||||
void ui_event_DropdownSettingsRegion(lv_event_t * e);
|
||||
extern lv_obj_t * ui_DropdownSettingsRegion;
|
||||
void ui_event_ImageSettingsBack(lv_event_t * e);
|
||||
extern lv_obj_t * ui_ImageSettingsBack;
|
||||
void ui_event_ImageSettingsReset(lv_event_t * e);
|
||||
extern lv_obj_t * ui_ImageSettingsReset;
|
||||
extern lv_obj_t *ui_ScreenSettings;
|
||||
extern lv_obj_t *ui_LabelSettingsTile;
|
||||
extern lv_obj_t *ui_PanelSettings;
|
||||
extern lv_obj_t *ui_PanelSettingsSplitBar;
|
||||
extern lv_obj_t *ui_PanelSettingsSplitBarLeft;
|
||||
extern lv_obj_t *ui_SettingsSettingsSplitBarRight;
|
||||
extern lv_obj_t *ui_PanelSettingsRegion;
|
||||
extern lv_obj_t *ui_LabelSettingsRegion;
|
||||
void ui_event_DropdownSettingsRegion(lv_event_t *e);
|
||||
extern lv_obj_t *ui_DropdownSettingsRegion;
|
||||
void ui_event_ImageSettingsBack(lv_event_t *e);
|
||||
extern lv_obj_t *ui_ImageSettingsBack;
|
||||
void ui_event_ImageSettingsReset(lv_event_t *e);
|
||||
extern lv_obj_t *ui_ImageSettingsReset;
|
||||
// SCREEN: ui_ScreenReset
|
||||
void ui_ScreenReset_screen_init(void);
|
||||
extern lv_obj_t * ui_ScreenReset;
|
||||
extern lv_obj_t * ui_LabelResetTitle;
|
||||
extern lv_obj_t * ui_LabelResetContent;
|
||||
void ui_event_ButtonResetConfirm(lv_event_t * e);
|
||||
extern lv_obj_t * ui_ButtonResetConfirm;
|
||||
extern lv_obj_t * ui_LabelSetupBtn2;
|
||||
void ui_event_ImageResetBack(lv_event_t * e);
|
||||
extern lv_obj_t * ui_ImageResetBack;
|
||||
void ui_event____initial_actions0(lv_event_t * e);
|
||||
extern lv_obj_t * ui____initial_actions0;
|
||||
extern lv_obj_t *ui_ScreenReset;
|
||||
extern lv_obj_t *ui_LabelResetTitle;
|
||||
extern lv_obj_t *ui_LabelResetContent;
|
||||
void ui_event_ButtonResetConfirm(lv_event_t *e);
|
||||
extern lv_obj_t *ui_ButtonResetConfirm;
|
||||
extern lv_obj_t *ui_LabelSetupBtn2;
|
||||
void ui_event_ImageResetBack(lv_event_t *e);
|
||||
extern lv_obj_t *ui_ImageResetBack;
|
||||
void ui_event____initial_actions0(lv_event_t *e);
|
||||
extern lv_obj_t *ui____initial_actions0;
|
||||
|
||||
// EVENT: event for ESP32_S3_BOX_Lite
|
||||
lv_group_t *ui_get_btn_op_group(void);
|
||||
|
||||
@@ -13,7 +13,7 @@ extern "C" {
|
||||
void EventBtnSetupClick(lv_event_t * e);
|
||||
void EventWifiResetConfirmClick(lv_event_t * e);
|
||||
void EventPanelSleepClickCb(lv_event_t * e);
|
||||
// void EventSettingsRegionValueChange(lv_event_t * e);
|
||||
// void EventSettingsRegionValueChange(lv_event_t * e); /*This function is for server selection currently not supported*/
|
||||
void EventResetConfirm(lv_event_t * e);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
+171181
-171181
File diff suppressed because it is too large
Load Diff
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"codename": "KaiTiCN20",
|
||||
"ttf_path": "\\assets\\KaiTi.ttf",
|
||||
"bin_path": "\\assets\\ui_font_KaiTiCN20.bin",
|
||||
"c_path": "\\assets\\ui_font_KaiTiCN20.c",
|
||||
"cfg_path": "\\assets\\ui_font_KaiTiCN20.fcfg",
|
||||
"size": 20,
|
||||
"bpp": 4,
|
||||
"letters": 0,
|
||||
"ranges": [
|
||||
"0x4E00-0x9FA5",
|
||||
"0x20-0x7F",
|
||||
"0xFF01-0xFF5E"
|
||||
],
|
||||
"symbols": "·~!@#¥%……&*()——+-=【{】}、|;:’“,《。》/?",
|
||||
"customparams": "--no-compress --no-prefilter",
|
||||
"uploaded": false
|
||||
{
|
||||
"codename": "KaiTiCN20",
|
||||
"ttf_path": "\\assets\\KaiTi.ttf",
|
||||
"bin_path": "\\assets\\ui_font_KaiTiCN20.bin",
|
||||
"c_path": "\\assets\\ui_font_KaiTiCN20.c",
|
||||
"cfg_path": "\\assets\\ui_font_KaiTiCN20.fcfg",
|
||||
"size": 20,
|
||||
"bpp": 4,
|
||||
"letters": 0,
|
||||
"ranges": [
|
||||
"0x4E00-0x9FA5",
|
||||
"0x20-0x7F",
|
||||
"0xFF01-0xFF5E"
|
||||
],
|
||||
"symbols": "·~!@#¥%……&*()——+-=【{】}、|;:’“,《。》/?",
|
||||
"customparams": "--no-compress --no-prefilter",
|
||||
"uploaded": false
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"codename": "PingFangEN14",
|
||||
"ttf_path": "\\assets\\pingfang.otf",
|
||||
"bin_path": "\\assets\\ui_font_PingFangEN14.bin",
|
||||
"c_path": "\\assets\\ui_font_PingFangEN14.c",
|
||||
"cfg_path": "\\assets\\ui_font_PingFangEN14.fcfg",
|
||||
"size": 14,
|
||||
"bpp": 4,
|
||||
"letters": 0,
|
||||
"ranges": [
|
||||
"0x20-0x7f"
|
||||
],
|
||||
"symbols": "",
|
||||
"customparams": "--no-compress --no-prefilter",
|
||||
"uploaded": false
|
||||
{
|
||||
"codename": "PingFangEN14",
|
||||
"ttf_path": "\\assets\\pingfang.otf",
|
||||
"bin_path": "\\assets\\ui_font_PingFangEN14.bin",
|
||||
"c_path": "\\assets\\ui_font_PingFangEN14.c",
|
||||
"cfg_path": "\\assets\\ui_font_PingFangEN14.fcfg",
|
||||
"size": 14,
|
||||
"bpp": 4,
|
||||
"letters": 0,
|
||||
"ranges": [
|
||||
"0x20-0x7f"
|
||||
],
|
||||
"symbols": "",
|
||||
"customparams": "--no-compress --no-prefilter",
|
||||
"uploaded": false
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"codename": "PingFangEN16",
|
||||
"ttf_path": "\\assets\\pingfang.otf",
|
||||
"bin_path": "\\assets\\ui_font_PingFangEN16.bin",
|
||||
"c_path": "\\assets\\ui_font_PingFangEN16.c",
|
||||
"cfg_path": "\\assets\\ui_font_PingFangEN16.fcfg",
|
||||
"size": 16,
|
||||
"bpp": 4,
|
||||
"letters": 0,
|
||||
"ranges": [
|
||||
"0x20-0x7f"
|
||||
],
|
||||
"symbols": "",
|
||||
"customparams": "--no-compress --no-prefilter",
|
||||
"uploaded": false
|
||||
{
|
||||
"codename": "PingFangEN16",
|
||||
"ttf_path": "\\assets\\pingfang.otf",
|
||||
"bin_path": "\\assets\\ui_font_PingFangEN16.bin",
|
||||
"c_path": "\\assets\\ui_font_PingFangEN16.c",
|
||||
"cfg_path": "\\assets\\ui_font_PingFangEN16.fcfg",
|
||||
"size": 16,
|
||||
"bpp": 4,
|
||||
"letters": 0,
|
||||
"ranges": [
|
||||
"0x20-0x7f"
|
||||
],
|
||||
"symbols": "",
|
||||
"customparams": "--no-compress --no-prefilter",
|
||||
"uploaded": false
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"codename": "PingFangEN20",
|
||||
"ttf_path": "\\assets\\pingfang.otf",
|
||||
"bin_path": "\\assets\\ui_font_PingFangEN20.bin",
|
||||
"c_path": "\\assets\\ui_font_PingFangEN20.c",
|
||||
"cfg_path": "\\assets\\ui_font_PingFangEN20.fcfg",
|
||||
"size": 20,
|
||||
"bpp": 4,
|
||||
"letters": 0,
|
||||
"ranges": [
|
||||
"0x20-0x7f"
|
||||
],
|
||||
"symbols": "",
|
||||
"customparams": "--no-compress --no-prefilter",
|
||||
"uploaded": false
|
||||
{
|
||||
"codename": "PingFangEN20",
|
||||
"ttf_path": "\\assets\\pingfang.otf",
|
||||
"bin_path": "\\assets\\ui_font_PingFangEN20.bin",
|
||||
"c_path": "\\assets\\ui_font_PingFangEN20.c",
|
||||
"cfg_path": "\\assets\\ui_font_PingFangEN20.fcfg",
|
||||
"size": 20,
|
||||
"bpp": 4,
|
||||
"letters": 0,
|
||||
"ranges": [
|
||||
"0x20-0x7f"
|
||||
],
|
||||
"symbols": "",
|
||||
"customparams": "--no-compress --no-prefilter",
|
||||
"uploaded": false
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
+20465
-16103
File diff suppressed because it is too large
Load Diff
+8
-2
@@ -1,7 +1,7 @@
|
||||
esp_toml_version = 1.0
|
||||
firmware_images_url = "https://dl.espressif.com/AE/esp-box/"
|
||||
|
||||
supported_apps = ["ESP-BOX_Demo_EN_V0_3_0", "ESP-BOX_Demo_CN_V0_3_0", "ESP-BOX_USB_Headset_V0_0_1", "ESP-BOX_ChatGPT_Demo_V1_0"]
|
||||
supported_apps = ["ESP-BOX_Demo_EN_V0_3_0", "ESP-BOX_Demo_CN_V0_3_0", "ESP-BOX_USB_Headset_V0_0_1", "ESP-BOX_ChatGPT_Demo_V1_0","ESP-BOX_Lite_ChatGPT_Demo_V1_0"]
|
||||
|
||||
[ESP-BOX_Demo_EN_V0_3_0]
|
||||
chipsets = ["ESP32-S3"]
|
||||
@@ -25,4 +25,10 @@ ios_app_url = ""
|
||||
chipsets = ["ESP32-S3"]
|
||||
image.esp32-s3 = "ESP-BOX_ChatGPT_Demo_V1.0.bin"
|
||||
android_app_url = ""
|
||||
ios_app_url = ""
|
||||
ios_app_url = ""
|
||||
|
||||
[ESP-BOX_Lite_ChatGPT_Demo_V1_0]
|
||||
chipsets = ["ESP32-S3"]
|
||||
image.esp32-s3 = "ESP-BOX_Lite_ChatGPT_Demo_V1.0.bin"
|
||||
android_app_url = ""
|
||||
ios_app_url = ""
|
||||
|
||||
Reference in New Issue
Block a user