Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add screen manager and virtual sensors to app #1453

Merged
merged 1 commit into from
Jul 7, 2020

Conversation

mlepage-google
Copy link
Contributor

  • add simple UI framework for tiny screens and few buttons
  • add README documenting simple UI framework
  • add screens for list of items, QR code
  • add demo devices/endpoints/clusters/attributes
  • add VLEDs (virtual LEDs)
  • improve display wake behaviour

Problem

Summary of Changes

<what's in this PR>

fixes #<issue number, or numbers. if no issue, please create one>

- add simple UI framework for tiny screens and few buttons
- add README documenting simple UI framework
- add screens for list of items, QR code
- add demo devices/endpoints/clusters/attributes
- add VLEDs (virtual LEDs)
- improve display wake behaviour
@CLAassistant
Copy link

CLAassistant commented Jul 6, 2020

CLA assistant check
All committers have signed the CLA.

@woody-apple
Copy link
Contributor

@sagar-apple?

@sagar-apple
Copy link
Contributor

@sagar-apple?

I'll try it out first thing tomorrow and report back. Is that okay with you @mlepage-google ?

@mlepage-google
Copy link
Contributor Author

mlepage-google commented Jul 6, 2020 via email

@sagar-apple
Copy link
Contributor

sagar-apple commented Jul 7, 2020

@mlepage , what’s the second LED on the screen for ? I see the top one reacts to the virtual light commands but what about the one below that?

Overall I think the UI is pretty slick, the only comment I have is about that virtual light. I think it should have its own screen under Devices->Lights. It can have a larger more visible status display in there as well. Right now displaying its status on the screen and not having it listed/controllable in the virtual devices screen is a little odd.

Copy link
Contributor

@woody-apple woody-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving pending @sagar-apple's comment

@mlepage-google
Copy link
Contributor Author

The LEDWidget appears to control a real LED (via GPIO) but also control a virtual version of it. This is the green one. The LEDWidget also has an ability to flash the onscreen virtual version as red upon error, but not the real/GPIO LED, just the displayed version. For now I made the VLEDs be single colour LEDs, so hooked up two to the LEDWidget, green for normal and red for error. We could in future work make the LEDWidget more able to use multiple LEDs (both real and virtual), or make the ScreenManager able to have both simple and RGB virtual LEDs. But for now, I'm trying to just get feature parity with the existing demo, so this PR can be merged and then the screen framework can be componentized into a common location in the repo, as an immediate goal.

@sagar-apple
Copy link
Contributor

The LEDWidget appears to control a real LED (via GPIO) but also control a virtual version of it. This is the green one. The LEDWidget also has an ability to flash the onscreen virtual version as red upon error, but not the real/GPIO LED, just the displayed version. For now I made the VLEDs be single colour LEDs, so hooked up two to the LEDWidget, green for normal and red for error. We could in future work make the LEDWidget more able to use multiple LEDs (both real and virtual), or make the ScreenManager able to have both simple and RGB virtual LEDs. But for now, I'm trying to just get feature parity with the existing demo, so this PR can be merged and then the screen framework can be componentized into a common location in the repo, as an immediate goal.

Understood. I would still like the widget to be a little larger for demos but that's not a reason to hold up this PR anymore. It's at parity with the current implementation and brings in the groundwork for a lot more. :)

LGTM!

@mlepage-google
Copy link
Contributor Author

Regarding organization of the menu items, some are currently just dummy items, and the devices are "pretend" and not yet real. For the VLEDs, I like having them omnipresent on the left, but there is of course nothing preventing a more detailed/visible/user-friendly screen providing another view of them, including control.

I envision ultimately having the list of devices show all the available CHIP devices, and being able to toggle them on/off, to emulate doors opening/closing, temperatures changing, etc. Maybe some would be "sources" and some would be "sinks", if that seems helpful. So the question of whether the LEDWidget's LEDs appear in the devices list would depend on whether it's a CHIP device, or something else.

I also envision being able to use the menus to edit devices, to add attributes or re-configure them for development and testing. This is not ideal with just three buttons, but it's do-able. I also envision being able to load configuration from a file (e.g. on SD card) but I'd like not to require an SD card (hence the value of being able to edit on-device in a pinch).

@mlepage-google
Copy link
Contributor Author

In terms of roadmap, I'd like to get this in, then move it to a common location (could use help with that as the build system is currently mysterious to me), and then spend some time hardening the code and improving it, as well as adding some features. I could add a better virtual light screen at that point if desired. Note that how much hardening we desire is a bit up for discussion. Right now there's not a lot but it's debatable how much we need for a demo app.

@sagar-apple
Copy link
Contributor

@vivien-apple Does this impact you in any way right now ?

@vivien-apple
Copy link
Contributor

@vivien-apple Does this impact you in any way right now ?

Not really.

@woody-apple woody-apple merged commit 6350c46 into project-chip:master Jul 7, 2020
@mlepage-google mlepage-google deleted the screen-manager branch February 15, 2022 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants