Skip to content

Commit

Permalink
Clean up the menus on the M5Stack
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
mlepage-google committed Mar 29, 2023
1 parent 2aefaa6 commit 0c81357
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,18 +545,6 @@ class SetupListModel : public TouchesMatterStackModel
private:
std::vector<std::string> 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()
{
Expand Down Expand Up @@ -733,16 +721,7 @@ esp_err_t InitM5Stack(std::string qrCodeText)
[=]() {
ESP_LOGI(TAG, "Opening Status screen");
ScreenManager::PushScreen(chip::Platform::New<StatusScreen>());
})
->Item("Custom",
[]() {
ESP_LOGI(TAG, "Opening custom screen");
ScreenManager::PushScreen(chip::Platform::New<CustomScreen>());
})
->Item("More")
->Item("Items")
->Item("For")
->Item("Demo")));
})));
return ESP_OK;
}
#endif
Expand Down

0 comments on commit 0c81357

Please sign in to comment.