Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Apps/WebServer/manifest.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ manifest.version=0.3
target.sdk=0.8.0-dev
target.platforms=esp32,esp32s3,esp32c6,esp32p4
id=tactility.webserver
version.name=0.2.0
version.code=2
version.name=0.3.0
version.code=3
name=Web Server
description=Web dashboard with a file browser, app manager and system information
app.0.id=tactility.webserver
Expand Down
13 changes: 8 additions & 5 deletions Apps/WebServer/webserver/main/Source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,12 @@ lv_obj_t* createTextArea(lv_obj_t* row, const char* text, uint32_t maxLength, bo
return textArea;
}

void addWifiModeChip(Context* ctx, const char* name) {
auto* chip = lvgl_chip_create(ctx->wifiModeChips);
lv_label_set_text(lv_label_create(chip), name);
lv_obj_add_event_cb(chip, onWifiModeChip, LV_EVENT_SHORT_CLICKED, ctx);
}

// Called with the LVGL lock held
void createWidgets(lv_obj_t* parent, void* userData) {
auto* ctx = static_cast<Context*>(userData);
Expand Down Expand Up @@ -287,11 +293,8 @@ void createWidgets(lv_obj_t* parent, void* userData) {
lv_obj_set_style_pad_all(ctx->wifiModeChips, 0, LV_STATE_DEFAULT);
lv_obj_set_style_pad_column(ctx->wifiModeChips, 0, LV_STATE_DEFAULT);
// In WebServerWifiMode order
for (const char* name : { "Station", "Access point" }) {
auto* chip = lvgl_chip_create(ctx->wifiModeChips);
lv_label_set_text(lv_label_create(chip), name);
lv_obj_add_event_cb(chip, onWifiModeChip, LV_EVENT_SHORT_CLICKED, ctx);
}
addWifiModeChip(ctx, "Station");
addWifiModeChip(ctx, "Access point");
lvgl_grid_navigation_add(ctx->wifiModeChips);

ctx->apGroup = createGroup(wifiCard);
Expand Down
Loading