Compare commits

...

4 Commits

Author SHA1 Message Date
Siyuan Miao fb166e9d58 remove build_afpacket from Makefile 2025-06-22 20:10:52 +00:00
Siyuan Miao 5051829c50 feat: update github actions 2025-06-22 15:39:48 +00:00
Siyuan Miao 8c225ce18f feat: remove lvgl examples and demos 2025-06-22 10:38:19 +00:00
Siyuan Miao 365a419164 chore: add LV_STATE_DISABLED to obj set state 2025-06-21 23:43:45 +00:00
16 changed files with 1874 additions and 298 deletions

View File

@ -16,6 +16,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Cmake cache
uses: buildjet/cache@v4
with:
path: internal/native/cgo/build
key: jetkvm-cgo-${{ hashFiles('internal/native/cgo/**/*.c', 'internal/native/cgo/**/*.h', 'internal/native/cgo/**/*.patch', 'internal/native/cgo/**/*.txt', 'internal/native/cgo/**/*.sh', '!internal/native/cgo/build/**') }}
restore-keys: |
jetkvm-cgo-${{ hashFiles('internal/native/cgo/**/*.c', 'internal/native/cgo/**/*.h', 'internal/native/cgo/**/*.patch', 'internal/native/cgo/**/*.txt', 'internal/native/cgo/**/*.sh', '!internal/native/cgo/build/**') }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:

View File

@ -2,6 +2,5 @@
"tailwindCSS.classFunctions": [
"cva",
"cx"
],
"cmake.sourceDirectory": "/workspaces/ymjk/jetkvm-native"
]
}

View File

@ -49,13 +49,6 @@ build_dev: build_native
$(GO_RELEASE_BUILD_ARGS) \
-o $(BIN_DIR)/jetkvm_app -v cmd/main.go
build_afpacket:
@echo "Building..."
$(GO_CMD) build \
-ldflags="$(GO_LDFLAGS) -X $(KVM_PKG_NAME).builtAppVersion=$(VERSION_DEV)" \
$(GO_RELEASE_BUILD_ARGS) \
-o $(BIN_DIR)/afpacket internal/lldp/cmd/afp.go
build_test2json:
$(GO_CMD) build -o $(BIN_DIR)/test2json cmd/test2json

View File

@ -33,14 +33,7 @@ var (
func updateDisplay() {
nativeInstance.UpdateLabelIfChanged("home_info_ipv4_addr", networkState.IPv4String())
ipv6 := networkState.IPv6String()
if ipv6 != "" {
nativeInstance.UpdateLabelIfChanged("home_info_ipv6_addr", ipv6)
nativeInstance.ObjShow("home_info_ipv6_addr")
} else {
nativeInstance.UpdateLabelIfChanged("home_info_ipv6_addr", "")
nativeInstance.ObjHide("home_info_ipv6_addr")
}
nativeInstance.UpdateLabelAndChangeVisibility("home_info_ipv6_addr", networkState.IPv6String())
nativeInstance.ObjHide("menu_btn_network")
nativeInstance.ObjHide("menu_btn_access")
@ -52,14 +45,14 @@ func updateDisplay() {
_, _ = nativeInstance.ObjSetState("usb_status", "LV_STATE_DEFAULT")
} else {
nativeInstance.UpdateLabelIfChanged("usb_status_label", "Disconnected")
_, _ = nativeInstance.ObjSetState("usb_status", "LV_STATE_USER_2")
_, _ = nativeInstance.ObjSetState("usb_status", "LV_STATE_DISABLED")
}
if lastVideoState.Ready {
nativeInstance.UpdateLabelIfChanged("hdmi_status_label", "Connected")
_, _ = nativeInstance.ObjSetState("hdmi_status", "LV_STATE_DEFAULT")
} else {
nativeInstance.UpdateLabelIfChanged("hdmi_status_label", "Disconnected")
_, _ = nativeInstance.ObjSetState("hdmi_status", "LV_STATE_USER_2")
_, _ = nativeInstance.ObjSetState("hdmi_status", "LV_STATE_DISABLED")
}
nativeInstance.UpdateLabelIfChanged("cloud_status_label", fmt.Sprintf("%d active", actionSessions))
@ -164,8 +157,8 @@ func updateStaticContents() {
if err == nil {
nativeInstance.UpdateLabelIfChanged("boot_screen_version", systemVersion.String())
nativeInstance.UpdateLabelIfChanged("boot_screen_app_version", appVersion.String())
nativeInstance.UpdateLabelIfChanged("system_version_label", systemVersion.String())
nativeInstance.UpdateLabelIfChanged("app_version_label", appVersion.String())
nativeInstance.UpdateLabelAndChangeVisibility("system_version", systemVersion.String())
nativeInstance.UpdateLabelAndChangeVisibility("app_version", appVersion.String())
}
// get cpu info
@ -174,7 +167,7 @@ func updateStaticContents() {
for _, line := range strings.Split(string(cpuInfo), "\n") {
if strings.HasPrefix(line, "Serial") {
serial := strings.SplitN(line, ":", 2)[1]
nativeInstance.UpdateLabelIfChanged("cpu_serial_label", strings.TrimSpace(serial))
nativeInstance.UpdateLabelAndChangeVisibility("cpu_serial", strings.TrimSpace(serial))
break
}
}
@ -184,14 +177,14 @@ func updateStaticContents() {
if err == nil {
kernelVersion := strings.TrimPrefix(string(kernelVersion), "Linux version ")
kernelVersion = strings.SplitN(kernelVersion, " ", 2)[0]
nativeInstance.UpdateLabelIfChanged("kernel_version_label", kernelVersion)
nativeInstance.UpdateLabelAndChangeVisibility("kernel_version", kernelVersion)
}
nativeInstance.UpdateLabelIfChanged("build_branch_label", version.Branch)
nativeInstance.UpdateLabelIfChanged("build_date_label", version.BuildDate)
nativeInstance.UpdateLabelIfChanged("golang_version_label", version.GoVersion)
nativeInstance.UpdateLabelAndChangeVisibility("build_branch", version.Branch)
nativeInstance.UpdateLabelAndChangeVisibility("build_date", version.BuildDate)
nativeInstance.UpdateLabelAndChangeVisibility("golang_version", version.GoVersion)
nativeInstance.UpdateLabelIfChanged("boot_screen_device_id", GetDeviceID())
// nativeInstance.UpdateLabelAndChangeVisibility("boot_screen_device_id", GetDeviceID())
}
// setDisplayBrightness sets /sys/class/backlight/backlight/brightness to alter

View File

@ -24,11 +24,18 @@ set(RK_MEDIA_OUTPUT "${RK_SDK_BASE}/media/out")
set(RK_MEDIA_INCLUDE_PATH "${RK_MEDIA_OUTPUT}/include")
set(RK_APP_MEDIA_LIBS_PATH "${RK_MEDIA_OUTPUT}/lib")
set(LV_BUILD_EXAMPLES 0 CACHE BOOL "" FORCE)
# Fetch LVGL from GitHub
FetchContent_Declare(
lvgl
GIT_REPOSITORY https://github.com/lvgl/lvgl.git
GIT_TAG v8.3.11
GIT_SHALLOW 1
UPDATE_DISCONNECTED 1
PATCH_COMMAND
git apply ${CMAKE_CURRENT_SOURCE_DIR}/lvgl-no-examples.patch
COMMAND rm -rf demos examples
)
FetchContent_MakeAvailable(lvgl)
@ -37,6 +44,7 @@ FetchContent_Declare(
lv_drivers
GIT_REPOSITORY https://github.com/lvgl/lv_drivers.git
GIT_TAG v8.3.0
UPDATE_DISCONNECTED 1
)
FetchContent_MakeAvailable(lv_drivers)

View File

@ -14,5 +14,6 @@ VERBOSE=1 cmake -B build \
-DCMAKE_CROSSCOMPILING=1 \
-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE \
-DSKIP_GLIBC_NAMES=ON \
-DCMAKE_BUILD_TYPE=Release
cmake --build build

View File

@ -12,6 +12,7 @@
#include "edid.h"
#include "ctrl.h"
#include <lvgl.h>
#include "ui/vars.h"
#include "log.h"
#include "log_handler.h"
@ -29,7 +30,7 @@ void jetkvm_set_video_handler(jetkvm_video_handler_t *handler) {
video_handler = handler;
}
void report_video_format(bool ready, const char *error, u_int16_t width, u_int16_t height, double frame_per_second)
void video_report_format(bool ready, const char *error, u_int16_t width, u_int16_t height, double frame_per_second)
{
state.ready = ready;
state.error = error;
@ -41,7 +42,7 @@ void report_video_format(bool ready, const char *error, u_int16_t width, u_int16
}
}
int socket_send_frame(const uint8_t *frame, ssize_t len)
int video_send_frame(const uint8_t *frame, ssize_t len)
{
if (video_handler != NULL) {
(*video_handler)(frame, len);
@ -49,11 +50,6 @@ int socket_send_frame(const uint8_t *frame, ssize_t len)
log_error("video handler is not set");
}
return 0;
// if (video_client_fd <= 0)
// {
// return -1;
// }
// return send(video_client_fd, frame, len, 0);
}
/**
@ -158,6 +154,10 @@ lv_obj_flag_t str_to_lv_obj_flag(const char *flag)
}
}
void jetkvm_set_app_version(const char *version) {
set_var_app_version(version);
}
void jetkvm_ui_init() {
lvgl_init();
}
@ -237,7 +237,20 @@ void jetkvm_ui_set_state(const char *obj_name, const char *state_name) {
{
state_val = LV_STATE_USER_2;
}
lv_obj_clear_state(obj, LV_STATE_USER_1 | LV_STATE_USER_2);
else if (strcmp(state_name, "LV_STATE_USER_3") == 0)
{
state_val = LV_STATE_USER_3;
}
else if (strcmp(state_name, "LV_STATE_USER_4") == 0)
{
state_val = LV_STATE_USER_4;
}
else if (strcmp(state_name, "LV_STATE_DISABLED") == 0)
{
state_val = LV_STATE_DISABLED;
}
// TODO: use LV_STATE_USER_* once eez supports it
lv_obj_clear_state(obj, LV_STATE_USER_1 | LV_STATE_USER_2 | LV_STATE_USER_3 | LV_STATE_USER_4 | LV_STATE_DISABLED);
lv_obj_add_state(obj, state_val);
}

View File

@ -22,6 +22,8 @@ typedef void (jetkvm_video_handler_t)(const uint8_t *frame, ssize_t len);
void jetkvm_set_log_handler(jetkvm_log_handler_t *handler);
void jetkvm_set_video_handler(jetkvm_video_handler_t *handler);
void jetkvm_set_app_version(const char *version);
void jetkvm_ui_init();
void jetkvm_ui_tick();
@ -49,4 +51,7 @@ int jetkvm_video_set_edid(const char *edid_hex);
char *jetkvm_video_get_edid_hex();
jetkvm_video_state_t *jetkvm_video_get_status();
void video_report_format(bool ready, const char *error, u_int16_t width, u_int16_t height, double frame_per_second);
int video_send_frame(const uint8_t *frame, ssize_t len);
#endif //VIDEO_DAEMON_CTRL_H

View File

@ -16,44 +16,12 @@
void jetkvm_log(const char *message);
/* Log to screen */
#define emit_log(level, file, func, line, ...) do { \
/* call the log handler */ \
char msg_buffer[1024]; \
sprintf(msg_buffer, __VA_ARGS__); \
log_message(level, file, func, line, msg_buffer); \
#define emit_log(level, file, func, line, ...) do { \
/* call the log handler */ \
char msg_buffer[1024]; \
sprintf(msg_buffer, __VA_ARGS__); \
log_message(level, file, func, line, msg_buffer); \
} while (0)
// /* display the level */ \
// printf("%10s%s", level, " "); \
// \
// /* display the function doing the logging */ \
// printf("%s%s", func, " " : ""); \
// \
// /* display the file and/or the line number */ \
// printf( \
// "%s%s%s%.d%s%s", \
// DISPLAY_FUNC && (DISPLAY_FILE || DISPLAY_LINE) ? "(" : "", \
// DISPLAY_FILE ? file : "", \
// DISPLAY_FILE && DISPLAY_LINE ? ":" : "", \
// DISPLAY_LINE ? line : 0, \
// DISPLAY_FUNC && (DISPLAY_FILE || DISPLAY_LINE) ? ") " : "", \
// !DISPLAY_FUNC && (DISPLAY_FILE || DISPLAY_LINE) ? " " : "" \
// ); \
// \
// /* display message border */ \
// printf("%s%s", DISPLAY_BORDER ? BORDER : "", DISPLAY_BORDER ? " " : ""); \
// \
// /* display the callee's message */ \
// if (DISPLAY_MESSAGE) printf(__VA_ARGS__); \
// \
// /* add the message ending (usually '\n') */ \
// printf("%s", DISPLAY_ENDING ? MSG_ENDING : ""); \
// \
// /* reset the colour */ \
// printf("%s", DISPLAY_RESET ? RESET_COLOUR : ""); \
// \
// /* add a newline */ \
// printf("\n"); \
// fflush(stdout); \
/* Level enum */
#define LEVEL_PANIC 5
@ -65,66 +33,66 @@ void jetkvm_log(const char *message);
#define LEVEL_TRACE -1
/* TRACE LOG */
#define log_trace(...) do { \
if (LOG_LEVEL <= LEVEL_TRACE) { \
emit_log( \
LEVEL_TRACE, __FILENAME__, __func__, __LINE__, __VA_ARGS__ \
); \
} \
#define log_trace(...) do { \
if (LOG_LEVEL <= LEVEL_TRACE) { \
emit_log( \
LEVEL_TRACE, __FILENAME__, __func__, __LINE__, __VA_ARGS__ \
); \
} \
} while (0)
/* DEBUG LOG */
#define log_debug(...) do { \
if (LOG_LEVEL <= LEVEL_DEBUG) { \
emit_log( \
LEVEL_DEBUG, __FILENAME__, __func__, __LINE__, __VA_ARGS__ \
); \
} \
#define log_debug(...) do { \
if (LOG_LEVEL <= LEVEL_DEBUG) { \
emit_log( \
LEVEL_DEBUG, __FILENAME__, __func__, __LINE__, __VA_ARGS__ \
); \
} \
} while (0)
/* INFO LOG */
#define log_info(...) do { \
if (LOG_LEVEL <= LEVEL_INFO) { \
emit_log( \
LEVEL_INFO, __FILENAME__, __func__, __LINE__, __VA_ARGS__ \
); \
} \
#define log_info(...) do { \
if (LOG_LEVEL <= LEVEL_INFO) { \
emit_log( \
LEVEL_INFO, __FILENAME__, __func__, __LINE__, __VA_ARGS__ \
); \
} \
} while (0)
/* NOTICE LOG */
#define log_notice(...) do { \
if (LOG_LEVEL <= LEVEL_NOTICE) { \
emit_log( \
LEVEL_NOTICE, __FILENAME__, __func__, __LINE__, __VA_ARGS__ \
); \
} \
#define log_notice(...) do { \
if (LOG_LEVEL <= LEVEL_INFO) { \
emit_log( \
LEVEL_INFO, __FILENAME__, __func__, __LINE__, __VA_ARGS__ \
); \
} \
} while (0)
/* WARN LOG */
#define log_warn(...) do { \
if (LOG_LEVEL <= LEVEL_WARN) { \
emit_log( \
LEVEL_WARN, __FILENAME__, __func__, __LINE__, __VA_ARGS__ \
); \
} \
#define log_warn(...) do { \
if (LOG_LEVEL <= LEVEL_WARN) { \
emit_log( \
LEVEL_WARN, __FILENAME__, __func__, __LINE__, __VA_ARGS__ \
); \
} \
} while (0)
/* ERROR LOG */
#define log_error(...) do { \
if (LOG_LEVEL <= LEVEL_ERROR) { \
emit_log( \
LEVEL_ERROR, __FILENAME__, __func__, __LINE__, __VA_ARGS__ \
); \
} \
#define log_error(...) do { \
if (LOG_LEVEL <= LEVEL_ERROR) { \
emit_log( \
LEVEL_ERROR, __FILENAME__, __func__, __LINE__, __VA_ARGS__ \
); \
} \
} while (0)
/* PANIC LOG */
#define log_panic(...) do { \
if (LOG_LEVEL <= LEVEL_PANIC) { \
emit_log( \
LEVEL_PANIC, __FILENAME__, __func__, __LINE__, __VA_ARGS__\
); \
} \
#define log_panic(...) do { \
if (LOG_LEVEL <= LEVEL_PANIC) { \
emit_log( \
LEVEL_PANIC, __FILENAME__, __func__, __LINE__, __VA_ARGS__ \
); \
} \
} while (0)
#endif //VIDEO_DAEMON_LOG_H

View File

@ -428,7 +428,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
#define LV_USE_CHECKBOX 1
#define LV_USE_DROPDOWN 1 /*Requires: lv_label*/
#define LV_USE_DROPDOWN 0 /*Requires: lv_label*/
#define LV_USE_IMG 1 /*Requires: lv_label*/
@ -440,7 +440,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
#define LV_USE_LINE 1
#define LV_USE_ROLLER 1 /*Requires: lv_label*/
#define LV_USE_ROLLER 0 /*Requires: lv_label*/
#if LV_USE_ROLLER
# define LV_ROLLER_INF_PAGES 7 /*Number of extra "pages" when the roller is infinite*/
#endif
@ -454,7 +454,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
# define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500 /*ms*/
#endif
#define LV_USE_TABLE 1
#define LV_USE_TABLE 0
/*==================
* EXTRA COMPONENTS
@ -463,7 +463,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
/*-----------
* Widgets
*----------*/
#define LV_USE_CALENDAR 1
#define LV_USE_CALENDAR 0
#if LV_USE_CALENDAR
# define LV_CALENDAR_WEEK_STARTS_MONDAY 0
# if LV_CALENDAR_WEEK_STARTS_MONDAY
@ -477,31 +477,31 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
# define LV_USE_CALENDAR_HEADER_DROPDOWN 1
#endif /*LV_USE_CALENDAR*/
#define LV_USE_CHART 1
#define LV_USE_CHART 0
#define LV_USE_COLORWHEEL 1
#define LV_USE_COLORWHEEL 0
#define LV_USE_IMGBTN 1
#define LV_USE_KEYBOARD 1
#define LV_USE_LED 1
#define LV_USE_LED 0
#define LV_USE_LIST 1
#define LV_USE_METER 1
#define LV_USE_METER 0
#define LV_USE_MSGBOX 1
#define LV_USE_MSGBOX 0
#define LV_USE_SPINBOX 1
#define LV_USE_SPINBOX 0
#define LV_USE_SPINNER 1
#define LV_USE_SPINNER 0
#define LV_USE_TABVIEW 1
#define LV_USE_TABVIEW 0
#define LV_USE_TILEVIEW 1
#define LV_USE_TILEVIEW 0
#define LV_USE_WIN 1
#define LV_USE_WIN 0
#define LV_USE_SPAN 1
#if LV_USE_SPAN
@ -531,7 +531,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
#define LV_USE_THEME_BASIC 1
/*A theme designed for monochrome displays*/
#define LV_USE_THEME_MONO 1
#define LV_USE_THEME_MONO 0
/*-----------
* Layouts

View File

@ -0,0 +1,207 @@
diff --git a/env_support/cmake/custom.cmake b/env_support/cmake/custom.cmake
index 7da68124b..1fbe2d3de 100644
--- a/env_support/cmake/custom.cmake
+++ b/env_support/cmake/custom.cmake
@@ -15,8 +15,6 @@ get_filename_component(LV_CONF_DIR ${LV_CONF_PATH} DIRECTORY)
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
file(GLOB_RECURSE SOURCES ${LVGL_ROOT_DIR}/src/*.c)
-file(GLOB_RECURSE EXAMPLE_SOURCES ${LVGL_ROOT_DIR}/examples/*.c)
-file(GLOB_RECURSE DEMO_SOURCES ${LVGL_ROOT_DIR}/demos/*.c)
if (BUILD_SHARED_LIBS)
add_library(lvgl SHARED ${SOURCES})
@@ -25,10 +23,6 @@ else()
endif()
add_library(lvgl::lvgl ALIAS lvgl)
-add_library(lvgl_examples STATIC ${EXAMPLE_SOURCES})
-add_library(lvgl::examples ALIAS lvgl_examples)
-add_library(lvgl_demos STATIC ${DEMO_SOURCES})
-add_library(lvgl::demos ALIAS lvgl_demos)
target_compile_definitions(
lvgl PUBLIC $<$<BOOL:${LV_LVGL_H_INCLUDE_SIMPLE}>:LV_LVGL_H_INCLUDE_SIMPLE>
@@ -37,15 +31,6 @@ target_compile_definitions(
# Include root and optional parent path of LV_CONF_PATH
target_include_directories(lvgl SYSTEM PUBLIC ${LVGL_ROOT_DIR} ${LV_CONF_DIR})
-# Include /examples folder
-target_include_directories(lvgl_examples SYSTEM
- PUBLIC ${LVGL_ROOT_DIR}/examples)
-target_include_directories(lvgl_demos SYSTEM
- PUBLIC ${LVGL_ROOT_DIR}/demos)
-
-target_link_libraries(lvgl_examples PUBLIC lvgl)
-target_link_libraries(lvgl_demos PUBLIC lvgl)
-
# Lbrary and headers can be installed to system using make install
file(GLOB LVGL_PUBLIC_HEADERS "${CMAKE_SOURCE_DIR}/lv_conf.h"
"${CMAKE_SOURCE_DIR}/lvgl.h")
diff --git a/lvgl.mk b/lvgl.mk
index 0ea126daa..300fb6cbe 100644
--- a/lvgl.mk
+++ b/lvgl.mk
@@ -1,5 +1,3 @@
-include $(LVGL_DIR)/$(LVGL_DIR_NAME)/demos/lv_demos.mk
-include $(LVGL_DIR)/$(LVGL_DIR_NAME)/examples/lv_examples.mk
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/core/lv_core.mk
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/lv_draw.mk
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/extra/lv_extra.mk
diff --git a/src/font/lv_font.h b/src/font/lv_font.h
index e3b670c87..4cceffc45 100644
--- a/src/font/lv_font.h
+++ b/src/font/lv_font.h
@@ -132,114 +132,10 @@ static inline lv_coord_t lv_font_get_line_height(const lv_font_t * font_p)
#define LV_FONT_DECLARE(font_name) extern const lv_font_t font_name;
-#if LV_FONT_MONTSERRAT_8
-LV_FONT_DECLARE(lv_font_montserrat_8)
-#endif
-
-#if LV_FONT_MONTSERRAT_10
-LV_FONT_DECLARE(lv_font_montserrat_10)
-#endif
-
-#if LV_FONT_MONTSERRAT_12
-LV_FONT_DECLARE(lv_font_montserrat_12)
-#endif
-
#if LV_FONT_MONTSERRAT_14
LV_FONT_DECLARE(lv_font_montserrat_14)
#endif
-#if LV_FONT_MONTSERRAT_16
-LV_FONT_DECLARE(lv_font_montserrat_16)
-#endif
-
-#if LV_FONT_MONTSERRAT_18
-LV_FONT_DECLARE(lv_font_montserrat_18)
-#endif
-
-#if LV_FONT_MONTSERRAT_20
-LV_FONT_DECLARE(lv_font_montserrat_20)
-#endif
-
-#if LV_FONT_MONTSERRAT_22
-LV_FONT_DECLARE(lv_font_montserrat_22)
-#endif
-
-#if LV_FONT_MONTSERRAT_24
-LV_FONT_DECLARE(lv_font_montserrat_24)
-#endif
-
-#if LV_FONT_MONTSERRAT_26
-LV_FONT_DECLARE(lv_font_montserrat_26)
-#endif
-
-#if LV_FONT_MONTSERRAT_28
-LV_FONT_DECLARE(lv_font_montserrat_28)
-#endif
-
-#if LV_FONT_MONTSERRAT_30
-LV_FONT_DECLARE(lv_font_montserrat_30)
-#endif
-
-#if LV_FONT_MONTSERRAT_32
-LV_FONT_DECLARE(lv_font_montserrat_32)
-#endif
-
-#if LV_FONT_MONTSERRAT_34
-LV_FONT_DECLARE(lv_font_montserrat_34)
-#endif
-
-#if LV_FONT_MONTSERRAT_36
-LV_FONT_DECLARE(lv_font_montserrat_36)
-#endif
-
-#if LV_FONT_MONTSERRAT_38
-LV_FONT_DECLARE(lv_font_montserrat_38)
-#endif
-
-#if LV_FONT_MONTSERRAT_40
-LV_FONT_DECLARE(lv_font_montserrat_40)
-#endif
-
-#if LV_FONT_MONTSERRAT_42
-LV_FONT_DECLARE(lv_font_montserrat_42)
-#endif
-
-#if LV_FONT_MONTSERRAT_44
-LV_FONT_DECLARE(lv_font_montserrat_44)
-#endif
-
-#if LV_FONT_MONTSERRAT_46
-LV_FONT_DECLARE(lv_font_montserrat_46)
-#endif
-
-#if LV_FONT_MONTSERRAT_48
-LV_FONT_DECLARE(lv_font_montserrat_48)
-#endif
-
-#if LV_FONT_MONTSERRAT_12_SUBPX
-LV_FONT_DECLARE(lv_font_montserrat_12_subpx)
-#endif
-
-#if LV_FONT_MONTSERRAT_28_COMPRESSED
-LV_FONT_DECLARE(lv_font_montserrat_28_compressed)
-#endif
-
-#if LV_FONT_DEJAVU_16_PERSIAN_HEBREW
-LV_FONT_DECLARE(lv_font_dejavu_16_persian_hebrew)
-#endif
-
-#if LV_FONT_SIMSUN_16_CJK
-LV_FONT_DECLARE(lv_font_simsun_16_cjk)
-#endif
-
-#if LV_FONT_UNSCII_8
-LV_FONT_DECLARE(lv_font_unscii_8)
-#endif
-
-#if LV_FONT_UNSCII_16
-LV_FONT_DECLARE(lv_font_unscii_16)
-#endif
-
/*Declare the custom (user defined) fonts*/
#ifdef LV_FONT_CUSTOM_DECLARE
LV_FONT_CUSTOM_DECLARE
diff --git a/src/font/lv_font.mk b/src/font/lv_font.mk
index 2201b73f2..7b2707da4 100644
--- a/src/font/lv_font.mk
+++ b/src/font/lv_font.mk
@@ -2,33 +2,7 @@ CSRCS += lv_font.c
CSRCS += lv_font_fmt_txt.c
CSRCS += lv_font_loader.c
-CSRCS += lv_font_dejavu_16_persian_hebrew.c
-CSRCS += lv_font_montserrat_8.c
-CSRCS += lv_font_montserrat_10.c
-CSRCS += lv_font_montserrat_12.c
-CSRCS += lv_font_montserrat_12_subpx.c
CSRCS += lv_font_montserrat_14.c
-CSRCS += lv_font_montserrat_16.c
-CSRCS += lv_font_montserrat_18.c
-CSRCS += lv_font_montserrat_20.c
-CSRCS += lv_font_montserrat_22.c
-CSRCS += lv_font_montserrat_24.c
-CSRCS += lv_font_montserrat_26.c
-CSRCS += lv_font_montserrat_28.c
-CSRCS += lv_font_montserrat_28_compressed.c
-CSRCS += lv_font_montserrat_30.c
-CSRCS += lv_font_montserrat_32.c
-CSRCS += lv_font_montserrat_34.c
-CSRCS += lv_font_montserrat_36.c
-CSRCS += lv_font_montserrat_38.c
-CSRCS += lv_font_montserrat_40.c
-CSRCS += lv_font_montserrat_42.c
-CSRCS += lv_font_montserrat_44.c
-CSRCS += lv_font_montserrat_46.c
-CSRCS += lv_font_montserrat_48.c
-CSRCS += lv_font_simsun_16_cjk.c
-CSRCS += lv_font_unscii_8.c
-CSRCS += lv_font_unscii_16.c
DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/font
VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/font

View File

@ -3,6 +3,7 @@
#include <time.h>
#include <rk_type.h>
#include <rk_mpi_venc.h>
#include <rk_mpi_sys.h>
#include <string.h>
#include <rk_debug.h>
#include <malloc.h>
@ -276,7 +277,7 @@ static void *venc_read_stream(void *arg)
// loopCount, stFrame.u32Seq, stFrame.pstPack->u32Len,
// stFrame.pstPack->u64PTS, nowUs - stFrame.pstPack->u64PTS);
pData = RK_MPI_MB_Handle2VirAddr(stFrame.pstPack->pMbBlk);
socket_send_frame(pData, (ssize_t)stFrame.pstPack->u32Len);
video_send_frame(pData, (ssize_t)stFrame.pstPack->u32Len);
s32Ret = RK_MPI_VENC_ReleaseStream(VENC_CHANNEL, &stFrame);
if (s32Ret != RK_SUCCESS)
{
@ -645,19 +646,19 @@ void *run_detect_format(void *arg)
{
// No timings could be detected because no signal was found.
log_info("HDMI status: no signal");
report_video_format(false, "no_signal", 0, 0, 0);
video_report_format(false, "no_signal", 0, 0, 0);
}
else if (errno == ENOLCK)
{
// The signal was unstable and the hardware could not lock on to it.
log_info("HDMI status: no lock");
report_video_format(false, "no_lock", 0, 0, 0);
video_report_format(false, "no_lock", 0, 0, 0);
}
else if (errno == ERANGE)
{
// Timings were found, but they are out of range of the hardware capabilities.
printf("HDMI status: out of range\n");
report_video_format(false, "out_of_range", 0, 0, 0);
video_report_format(false, "out_of_range", 0, 0, 0);
}
else
{
@ -679,7 +680,7 @@ void *run_detect_format(void *arg)
detected_width = dv_timings.bt.width;
detected_height = dv_timings.bt.height;
detected_signal = true;
report_video_format(true, NULL, detected_width, detected_height, frames_per_second);
video_report_format(true, NULL, detected_width, detected_height, frames_per_second);
if (streaming_flag == true)
{
log_info("restarting on going video streaming");

View File

@ -124,6 +124,8 @@ func (n *Native) StartNativeVideo() {
setLogHandler()
setVideoHandler()
C.jetkvm_set_app_version(C.CString(n.appVersion.String()))
C.jetkvm_ui_init()
n.UpdateLabelIfChanged("boot_screen_version", n.appVersion.String())

View File

@ -18,6 +18,19 @@ func (n *Native) UpdateLabelIfChanged(objName string, newText string) {
}
}
func (n *Native) UpdateLabelAndChangeVisibility(objName string, newText string) {
containerName := objName + "_container"
if newText == "" {
_, _ = n.ObjHide(objName)
_, _ = n.ObjHide(containerName)
} else {
_, _ = n.ObjShow(objName)
_, _ = n.ObjShow(containerName)
}
n.UpdateLabelIfChanged(objName, newText)
}
func (n *Native) SwitchToScreenIf(screenName string, shouldSwitch []string) {
currentScreen := n.GetCurrentScreen()
if currentScreen == screenName {

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,9 @@
{
"navigation": {
"selectedUserPageObject": "[jetkvm.eez-project]:/userPages/2",
"selectedActionObject": "[jetkvm.eez-project]:/actions/1",
"selectedUserPageObject": "[jetkvm.eez-project]:/userPages/0",
"selectedUserWidgetObject": "[jetkvm.eez-project]:/userWidgets/-1",
"selectedActionObject": "[jetkvm.eez-project]:/actions/7",
"selectedGlobalVariableObject": "[jetkvm.eez-project]:/variables/globalVariables/0",
"selectedStyleObject": "[jetkvm.eez-project]:/lvglStyles/styles/0",
"selectedThemeObject": "[jetkvm.eez-project]:/themes/0",
"selectedFontObject": "[jetkvm.eez-project]:/fonts/1",
@ -28,7 +30,7 @@
{
"type": "border",
"selected": 4,
"size": 253.5,
"size": 113.5,
"location": "right",
"children": [
{
@ -122,13 +124,13 @@
{
"type": "row",
"id": "#3ab81c80-448e-41ff-9159-e5a7ecb1936c",
"weight": 20.250356691846424,
"weight": 25.73707052518943,
"children": [
{
"type": "tabset",
"id": "#2e3d9a08-c69c-42b5-b434-525109f2a5a7",
"weight": 1,
"selected": 2,
"selected": 1,
"enableClose": false,
"children": [
{
@ -139,14 +141,6 @@
"enableClose": false,
"icon": "svg:pages"
},
{
"type": "tab",
"id": "WIDGETS",
"name": "User Widgets",
"component": "widgets",
"enableClose": false,
"icon": "svg:user_widgets"
},
{
"type": "tab",
"id": "ACTIONS",
@ -154,6 +148,14 @@
"component": "actions",
"enableClose": false,
"icon": "material:code"
},
{
"type": "tab",
"id": "WIDGETS",
"name": "User Widgets",
"component": "widgets",
"enableClose": false,
"icon": "svg:user_widgets"
}
]
},
@ -194,22 +196,44 @@
{
"type": "tabset",
"id": "EDITORS",
"weight": 63.667074907133006,
"selected": 3,
"weight": 49.31058517127421,
"selected": 1,
"enableDeleteWhenEmpty": false,
"enableClose": false,
"children": [
{
"type": "tab",
"id": "#b444e818-4663-4332-ab40-a34acb670c8c",
"name": "HomeScreen",
"id": "#467ae6a9-0f08-4392-a580-25f8916524e4",
"name": "BootScreen",
"component": "editor",
"config": {
"objectPath": "[jetkvm.eez-project]:/userPages/1",
"objectPath": "[jetkvm.eez-project]:/userPages/0",
"permanent": false
},
"icon": "svg:page"
},
{
"type": "tab",
"id": "#d1704ae1-993d-4a7d-bade-0903bb61e9c6",
"name": "AboutScreen",
"component": "editor",
"config": {
"objectPath": "[jetkvm.eez-project]:/userPages/5",
"permanent": true
},
"icon": "svg:page"
},
{
"type": "tab",
"id": "#b444e818-4663-4332-ab40-a34acb670c8c",
"name": "MenuAdvancedScreen",
"component": "editor",
"config": {
"objectPath": "[jetkvm.eez-project]:/userPages/4",
"permanent": true
},
"icon": "svg:page"
},
{
"type": "tab",
"id": "#f8258cf3-e12a-4be9-8021-33199674dbe6",
@ -221,17 +245,6 @@
},
"icon": "svg:page"
},
{
"type": "tab",
"id": "#ab5bf7de-d982-416b-b26b-8fffecd56449",
"name": "FontBook16",
"component": "editor",
"config": {
"objectPath": "[jetkvm.eez-project]:/fonts/1",
"permanent": false
},
"icon": "material:font_download"
},
{
"type": "tab",
"id": "#5dcfc8a4-36a7-4dea-a0cc-8dbeb4aab914",
@ -250,7 +263,7 @@
{
"type": "row",
"id": "#ee319cf9-6145-49e4-b40e-1d999be897c8",
"weight": 16.082568401020577,
"weight": 24.95234430353635,
"children": [
{
"type": "tabset",
@ -1077,12 +1090,12 @@
"0": {
"0": {
"0": {
"1": {}
"1": {
"0": {}
}
},
"1": {
"0": {
"$selected": true
}
"0": {}
},
"2": {},
"3": {
@ -1131,7 +1144,8 @@
"2": {},
"3": {},
"4": {
"0": {}
"0": {},
"$selected": true
}
}
}
@ -1151,6 +1165,107 @@
"secondToPx": 200,
"scrollLeft": 0
}
},
"[jetkvm.eez-project]:/userPages/3[flow-state]": {
"selection": {
"0": {
"0": {
"0": {
"0": {
"$selected": true
}
},
"1": {
"0": {
"0": {},
"1": {},
"2": {},
"3": {}
}
}
}
}
},
"transform": {
"translate": {
"x": -150,
"y": -120
},
"scale": 1
},
"timeline": {
"isEditorActive": false,
"position": 0,
"secondToPx": 200,
"scrollLeft": 0
}
},
"[jetkvm.eez-project]:/userPages/4[flow-state]": {
"selection": {},
"transform": {
"translate": {
"x": -150,
"y": -120
},
"scale": 1
},
"timeline": {
"isEditorActive": false,
"position": 0,
"secondToPx": 200,
"scrollLeft": 0
}
},
"[jetkvm.eez-project]:/userPages/5[flow-state]": {
"selection": {
"0": {
"0": {
"0": {
"0": {}
},
"1": {
"0": {
"0": {},
"1": {},
"2": {},
"3": {},
"4": {},
"5": {},
"6": {}
}
}
}
}
},
"transform": {
"translate": {
"x": -150,
"y": -120
},
"scale": 1
},
"timeline": {
"isEditorActive": false,
"position": 0,
"secondToPx": 200,
"scrollLeft": 0
}
},
"[jetkvm.eez-project]:/userWidgets/0[flow-state]": {
"selection": {},
"transform": {
"translate": {
"x": -150,
"y": -120
},
"scale": 1
},
"timeline": {
"isEditorActive": false,
"position": 0,
"secondToPx": 200,
"scrollLeft": 0
}
}
},
"activeOutputSection": 0,
@ -1170,7 +1285,9 @@
"lvglExpandedPropertiesGroup": [
"POSITION AND SIZE",
"PADDING",
"MARGIN"
"MARGIN",
"TEXT",
"BACKGROUND"
],
"showInactiveFlowsInDebugger": true,
"globalFlowZoom": true,