Display brightness support (#26)
* cleanup * brightness control and app * cleanup * persistant storage of display settings * fix for missing include * header cleanup * fix pc build * add docs * move display app to tactility project
This commit is contained in:
committed by
GitHub
parent
ae5c828f42
commit
d171b9a231
@@ -2,11 +2,10 @@ cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
set(BOARD_COMPONENTS esp_wifi)
|
||||
|
||||
file(GLOB_RECURSE SOURCE_FILES src/*.c)
|
||||
|
||||
idf_component_register(
|
||||
SRC_DIRS "src"
|
||||
"src/apps/system/wifi_connect"
|
||||
"src/apps/system/wifi_manage"
|
||||
"src/services/wifi"
|
||||
SRCS ${SOURCE_FILES}
|
||||
INCLUDE_DIRS "src/"
|
||||
REQUIRES esp_wifi nvs_flash spiffs
|
||||
)
|
||||
|
||||
@@ -115,7 +115,7 @@ AppManifest wifi_connect_app = {
|
||||
.id = "wifi_connect",
|
||||
.name = "Wi-Fi Connect",
|
||||
.icon = NULL,
|
||||
.type = AppTypeSystem,
|
||||
.type = AppTypeSettings,
|
||||
.on_start = &app_start,
|
||||
.on_stop = &app_stop,
|
||||
.on_show = &app_show,
|
||||
|
||||
@@ -67,13 +67,9 @@ void wifi_connect_view_create_bottom_buttons(WifiConnect* wifi, lv_obj_t* parent
|
||||
void wifi_connect_view_create(App app, void* wifi, lv_obj_t* parent) {
|
||||
WifiConnect* wifi_connect = (WifiConnect*)wifi;
|
||||
WifiConnectView* view = &wifi_connect->view;
|
||||
// TODO: Standardize this into "window content" function?
|
||||
// TODO: It can then be dynamically determined based on screen res and size
|
||||
|
||||
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
|
||||
lv_obj_set_style_pad_top(parent, 8, 0);
|
||||
lv_obj_set_style_pad_bottom(parent, 8, 0);
|
||||
lv_obj_set_style_pad_left(parent, 16, 0);
|
||||
lv_obj_set_style_pad_right(parent, 16, 0);
|
||||
tt_lv_obj_set_style_auto_padding(parent);
|
||||
|
||||
view->root = parent;
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ AppManifest wifi_manage_app = {
|
||||
.id = "wifi_manage",
|
||||
.name = "Wi-Fi",
|
||||
.icon = NULL,
|
||||
.type = AppTypeSystem,
|
||||
.type = AppTypeSettings,
|
||||
.on_start = &app_start,
|
||||
.on_stop = &app_stop,
|
||||
.on_show = &app_show,
|
||||
|
||||
@@ -150,13 +150,8 @@ static void update_connected_ap(WifiManageView* view, WifiManageState* state, Wi
|
||||
void wifi_manage_view_create(WifiManageView* view, WifiManageBindings* bindings, lv_obj_t* parent) {
|
||||
view->root = parent;
|
||||
|
||||
// TODO: Standardize this into "window content" function?
|
||||
// TODO: It can then be dynamically determined based on screen res and size
|
||||
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
|
||||
lv_obj_set_style_pad_top(parent, 8, 0);
|
||||
lv_obj_set_style_pad_bottom(parent, 8, 0);
|
||||
lv_obj_set_style_pad_left(parent, 16, 0);
|
||||
lv_obj_set_style_pad_right(parent, 16, 0);
|
||||
tt_lv_obj_set_style_auto_padding(parent);
|
||||
|
||||
// Top row: enable/disable
|
||||
lv_obj_t* switch_container = lv_obj_create(parent);
|
||||
|
||||
Reference in New Issue
Block a user