mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 10:53:17 +00:00
Fixes
This commit is contained in:
parent
b9c01c339a
commit
819e3ac966
@ -142,7 +142,7 @@ static error_t initSound(::Device* i2c_controller) {
|
|||||||
constexpr auto IO_EXPANDER1_ADDRESS = 0x43;
|
constexpr auto IO_EXPANDER1_ADDRESS = 0x43;
|
||||||
constexpr auto AMP_REGISTER = 0x05;
|
constexpr auto AMP_REGISTER = 0x05;
|
||||||
// Note: to disable the amplifier, reset the bits
|
// Note: to disable the amplifier, reset the bits
|
||||||
error = i2c_controller_register8_set_bits(i2c_controller, IO_EXPANDER1_ADDRESS, AMP_REGISTER, 0b00000010 , pdMS_TO_TICKS(100));
|
error = i2c_controller_register8_set_bits(i2c_controller, IO_EXPANDER1_ADDRESS, AMP_REGISTER, 0b00000010, pdMS_TO_TICKS(100));
|
||||||
if (error != ERROR_NONE) {
|
if (error != ERROR_NONE) {
|
||||||
LOG_E(TAG, "Failed to enable amplifier: %s", error_to_string(error));
|
LOG_E(TAG, "Failed to enable amplifier: %s", error_to_string(error));
|
||||||
return error;
|
return error;
|
||||||
@ -156,7 +156,7 @@ static bool initBoot() {
|
|||||||
check(i2c0, "i2c0 not found");
|
check(i2c0, "i2c0 not found");
|
||||||
|
|
||||||
auto error = initPower(i2c0);
|
auto error = initPower(i2c0);
|
||||||
if (initPower(i2c0) != ERROR_NONE) {
|
if (error != ERROR_NONE) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,6 @@ if (DEFINED ENV{ESP_IDF_VERSION})
|
|||||||
GET_PROPERTY_VALUE(sdkconfig_text "CONFIG_TT_LVGL_STATUSBAR_ICON_SIZE" statusbar_symbol_size)
|
GET_PROPERTY_VALUE(sdkconfig_text "CONFIG_TT_LVGL_STATUSBAR_ICON_SIZE" statusbar_symbol_size)
|
||||||
GET_PROPERTY_VALUE(sdkconfig_text "CONFIG_TT_LVGL_LAUNCHER_ICON_SIZE" launcher_symbol_size)
|
GET_PROPERTY_VALUE(sdkconfig_text "CONFIG_TT_LVGL_LAUNCHER_ICON_SIZE" launcher_symbol_size)
|
||||||
GET_PROPERTY_VALUE(sdkconfig_text "CONFIG_TT_LVGL_SHARED_ICON_SIZE" shared_symbol_size)
|
GET_PROPERTY_VALUE(sdkconfig_text "CONFIG_TT_LVGL_SHARED_ICON_SIZE" shared_symbol_size)
|
||||||
GET_PROPERTY_VALUE(sdkconfig_text "CONFIG_TT_LVGL_SHARED_ICON_SIZE" shared_symbol_size)
|
|
||||||
else ()
|
else ()
|
||||||
# Default values for simulator
|
# Default values for simulator
|
||||||
set(font_size_small 10)
|
set(font_size_small 10)
|
||||||
@ -47,16 +46,19 @@ READ_PROPERTIES_TO_MAP(
|
|||||||
# Read UI density
|
# Read UI density
|
||||||
GET_VALUE_FROM_MAP(device_properties "[lvgl]uiDensity" ui_density)
|
GET_VALUE_FROM_MAP(device_properties "[lvgl]uiDensity" ui_density)
|
||||||
# Define UiDensity enum value
|
# Define UiDensity enum value
|
||||||
if (ui_scale)
|
if (ui_density)
|
||||||
if (ui_scale == "default")
|
if (ui_density STREQUAL "default")
|
||||||
set(ui_density "LVGL_UI_DENSITY_DEFAULT")
|
set(ui_density_variable "LVGL_UI_DENSITY_DEFAULT")
|
||||||
elif (ui_scale == "compact")
|
elseif (ui_density STREQUAL "compact")
|
||||||
set(ui_density "LVGL_UI_DENSITY_COMPACT")
|
set(ui_density_variable "LVGL_UI_DENSITY_COMPACT")
|
||||||
else ()
|
else ()
|
||||||
message(FATAL_ERROR "Invalid [lvgl]uiDensity: '${ui_density}'. Must be either 'default' or 'compact'")
|
message(FATAL_ERROR "Invalid [lvgl]uiDensity: '${ui_density}'. Must be either 'default' or 'compact'")
|
||||||
endif ()
|
endif ()
|
||||||
|
message("UI density set to '${ui_density}' via properties")
|
||||||
else ()
|
else ()
|
||||||
set(ui_density "LVGL_UI_DENSITY_DEFAULT")
|
set(ui_density "default")
|
||||||
|
set(ui_density_variable "LVGL_UI_DENSITY_DEFAULT")
|
||||||
|
message("UI density set to default: ${ui_density}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# ####################################
|
# ####################################
|
||||||
@ -109,5 +111,5 @@ target_compile_definitions(${MODULE_NAME} PUBLIC
|
|||||||
"-DTT_LVGL_SHARED_FONT_ICON_SIZE=${shared_symbol_size}"
|
"-DTT_LVGL_SHARED_FONT_ICON_SIZE=${shared_symbol_size}"
|
||||||
"-DTT_LVGL_SHARED_FONT_ICON_SYMBOL=material_symbols_shared_${shared_symbol_size}"
|
"-DTT_LVGL_SHARED_FONT_ICON_SYMBOL=material_symbols_shared_${shared_symbol_size}"
|
||||||
# UiDensity
|
# UiDensity
|
||||||
"-DTT_LVGL_UI_DENSITY=${ui_density}"
|
"-DTT_LVGL_UI_DENSITY=${ui_density_variable}"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -97,7 +97,7 @@ bool lvgl_is_running(void);
|
|||||||
/**
|
/**
|
||||||
* @brief Gets the desired UI density for the target hardware.
|
* @brief Gets the desired UI density for the target hardware.
|
||||||
* The density is defined in the `device.properties` of a hardware device.
|
* The density is defined in the `device.properties` of a hardware device.
|
||||||
* This setting is read by CMakeLists.txt and passed as a target compile definition of the LVLG module.
|
* This setting is read by CMakeLists.txt and passed as a target compile definition of the LVGL module.
|
||||||
* @return the UI density
|
* @return the UI density
|
||||||
*/
|
*/
|
||||||
enum UiDensity lvgl_get_ui_density(void);
|
enum UiDensity lvgl_get_ui_density(void);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user