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 a sample UI for linux apps - lighting app #24979

Merged
merged 6 commits into from
Feb 13, 2023

Conversation

andy31415
Copy link
Contributor

@andy31415 andy31415 commented Feb 10, 2023

Viewing app state during testing on linux is very tedious when using just the console.
Added an example UI that can be optionally compiled for linux apps and enabled it for the light example.

Specifically this does:

  • adds a 'imgui' submodule for linux. I hard-coded SDL2 + opengl3 for rendering to not do more exec_script at runtime for now. It should mostly compile out of the box if used

  • optionally enable a ui for lighting app

  • Added the following bindings to it:

    1. Show a QR code
    2. Show real-time light on/off state from endpoint 1 (which is the light endpoint as far as I can tell)
  • Fixed linux shutdown bug: CONTROL + C would just cancel the app without doing a chip event loop stop. Updated to add signal handlers to the shared chip main loop app for linux.

Ideally I would like to also device state (commissioning, commissioned, fabrics, active sessions etc) however for now adding the bare minimum to have something.

image

Also fixed linux app shutdown to handle signals
by loop terminating instead of app killing.
@github-actions
Copy link

PR #24979: Size comparison from 5ad70f6 to fb9c267

Increases (1 build for cc32xx)
platform target config section 5ad70f6 fb9c267 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20194394 20194395 1 0.0
Full report (1 build for cc32xx)
platform target config section 5ad70f6 fb9c267 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 640233 640233 0 0.0
(read/write) 204084 204084 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197488 197488 0 0.0
.comment 194 194 0 0.0
.data 1476 1476 0 0.0
.debug_abbrev 928439 928439 0 0.0
.debug_aranges 87352 87352 0 0.0
.debug_frame 299840 299840 0 0.0
.debug_info 20194394 20194395 1 0.0
.debug_line 2649797 2649797 0 0.0
.debug_loc 2785922 2785922 0 0.0
.debug_ranges 280720 280720 0 0.0
.debug_str 3001474 3001474 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105585 105585 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 375840 375840 0 0.0
.symtab 255856 255856 0 0.0
.text 532524 532524 0 0.0

@github-actions
Copy link

PR #24979: Size comparison from 5ad70f6 to d840e82

Increases (1 build for cc32xx)
platform target config section 5ad70f6 d840e82 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20194394 20194395 1 0.0
Full report (1 build for cc32xx)
platform target config section 5ad70f6 d840e82 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 640233 640233 0 0.0
(read/write) 204084 204084 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197488 197488 0 0.0
.comment 194 194 0 0.0
.data 1476 1476 0 0.0
.debug_abbrev 928439 928439 0 0.0
.debug_aranges 87352 87352 0 0.0
.debug_frame 299840 299840 0 0.0
.debug_info 20194394 20194395 1 0.0
.debug_line 2649797 2649797 0 0.0
.debug_loc 2785922 2785922 0 0.0
.debug_ranges 280720 280720 0 0.0
.debug_str 3001474 3001474 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105585 105585 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 375840 375840 0 0.0
.symtab 255856 255856 0 0.0
.text 532524 532524 0 0.0

@github-actions
Copy link

PR #24979: Size comparison from 5ad70f6 to 9eb3991

Increases (1 build for cc32xx)
platform target config section 5ad70f6 9eb3991 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20194394 20194444 50 0.0
.debug_line 2649797 2649822 25 0.0
.debug_loc 2785922 2785969 47 0.0
Decreases (1 build for cc32xx)
platform target config section 5ad70f6 9eb3991 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_ranges 280720 280696 -24 -0.0
Full report (1 build for cc32xx)
platform target config section 5ad70f6 9eb3991 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 640233 640233 0 0.0
(read/write) 204084 204084 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197488 197488 0 0.0
.comment 194 194 0 0.0
.data 1476 1476 0 0.0
.debug_abbrev 928439 928439 0 0.0
.debug_aranges 87352 87352 0 0.0
.debug_frame 299840 299840 0 0.0
.debug_info 20194394 20194444 50 0.0
.debug_line 2649797 2649822 25 0.0
.debug_loc 2785922 2785969 47 0.0
.debug_ranges 280720 280696 -24 -0.0
.debug_str 3001474 3001474 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105585 105585 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 375840 375840 0 0.0
.symtab 255856 255856 0 0.0
.text 532524 532524 0 0.0

@andy31415 andy31415 merged commit 9402e16 into project-chip:master Feb 13, 2023
vivien-apple added a commit to vivien-apple/connectedhomeip-1 that referenced this pull request Feb 14, 2023
vivien-apple added a commit to vivien-apple/connectedhomeip-1 that referenced this pull request Feb 14, 2023
vivien-apple added a commit to vivien-apple/connectedhomeip-1 that referenced this pull request Feb 14, 2023
vivien-apple added a commit to vivien-apple/connectedhomeip-1 that referenced this pull request Feb 14, 2023
lecndav pushed a commit to lecndav/connectedhomeip that referenced this pull request Mar 22, 2023
* Initial version of a imgui UI in light app for linux.

Also fixed linux app shutdown to handle signals
by loop terminating instead of app killing.

* remove some fixme comments

* Fix unit tests ... with-ui variant was added

* Restyle

* Update text and remove some commented out code

* Restyle

---------

Co-authored-by: Andrei Litvin <andreilitvin@google.com>
lecndav pushed a commit to lecndav/connectedhomeip that referenced this pull request Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants