From 1086991f0bebf2ba63fe219e21ec90a73cc07825 Mon Sep 17 00:00:00 2001 From: Marc Lepage <67919234+mlepage-google@users.noreply.github.com> Date: Thu, 30 Mar 2023 11:07:04 -0400 Subject: [PATCH] Clean up the menus on the M5Stack (#25886) * Clean up the menus on the M5Stack No longer need screen to demonstrate custom drawing (QR Code screen does this) or non-functional menu items to demonstrate menu scrolling (other menus are now long enough to scroll). * Restyle --- .../esp32/main/DeviceWithDisplay.cpp | 30 +++---------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp index 0694c091cb3787..cf5a5aa1cb1980 100644 --- a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp @@ -545,18 +545,6 @@ class SetupListModel : public TouchesMatterStackModel private: std::vector options; }; -class CustomScreen : public Screen -{ -public: - virtual void Display() - { - TFT_drawCircle(0.3 * DisplayWidth, 0.3 * DisplayHeight, 8, TFT_BLUE); - TFT_drawCircle(0.7 * DisplayWidth, 0.3 * DisplayHeight, 8, TFT_BLUE); - TFT_drawLine(0.2 * DisplayWidth, 0.6 * DisplayHeight, 0.3 * DisplayWidth, 0.7 * DisplayHeight, TFT_BLUE); - TFT_drawLine(0.3 * DisplayWidth, 0.7 * DisplayHeight, 0.7 * DisplayWidth, 0.7 * DisplayHeight, TFT_BLUE); - TFT_drawLine(0.7 * DisplayWidth, 0.7 * DisplayHeight, 0.8 * DisplayWidth, 0.6 * DisplayHeight, TFT_BLUE); - } -}; void SetupPretendDevices() { @@ -729,20 +717,10 @@ esp_err_t InitM5Stack(std::string qrCodeText) ESP_LOGI(TAG, "Opening Setup list"); ScreenManager::PushScreen(chip::Platform::New(chip::Platform::New())); }) - ->Item("Status", - [=]() { - ESP_LOGI(TAG, "Opening Status screen"); - ScreenManager::PushScreen(chip::Platform::New()); - }) - ->Item("Custom", - []() { - ESP_LOGI(TAG, "Opening custom screen"); - ScreenManager::PushScreen(chip::Platform::New()); - }) - ->Item("More") - ->Item("Items") - ->Item("For") - ->Item("Demo"))); + ->Item("Status", [=]() { + ESP_LOGI(TAG, "Opening Status screen"); + ScreenManager::PushScreen(chip::Platform::New()); + }))); return ESP_OK; } #endif