Difference between revisions of "GTK demo launcher"

[quality revision] [quality revision]
m



SUMMARY

This article gives information about the Demo Launcher application. The Demo Launcher starts by default in the Starter Package. This application is written in python3[1] and uses GTK[2] to display the user interface. A touchscreen is required to control the application.


1 Main menu[edit]

The main menu is composed of six different demos:

Main menu
Netdata perf monitor Gives information in how to connect to the board through ethernet or wifi (if available) in order to connect to netdata
Camera preview Displays the preview camera
Video playback Displays the video playback
Artificial intelligence Handwriting character recognition (use M4 firmware)
3D GPU Displays a rotating 3D cube
Bluetooth speaker Allows the connection to a bluetooth headset


To exit from this window, tap on the top-right corner cross. To launch it again, tap or click on the icon of Weston launcher with nine blue squares.

2 Netdata perf monitor[edit]

Netdata perf monitor

netdata is a tool started on boot which provides all monitoring information on a web page accessible at the IP address of the board. This window helps to connect to the network of the board to get netdata information.

If Ethernet network is available, the URL to connect to netdata is displayed.
If wireless network is available, a cursor button is displayed to enable hotspot wifi.
If wifi hotspot is enabled with default configuration, two QR-code are displayed on screen:

  • The first one gives parameters to connect to wifi hotspot
  • The second one provides the URL to connect to netdata

To exit from this window, double tap anywhere on the screen.

3 Camera preview[edit]

Display the preview from /dev/video0.

  • On STM32MP157C-DKX boards, a USB webcam can be used
  • On STM32MP157C-EVX boards, either a MB1379 camera daughter board or a USB webcam can be used.

Ensure that the webcam is compatible with Linux®.

The available actions to control the camera preview are:

  • first tap: as preview is composed by Wayland, the first tap has to be done outside the camera preview window to recover the GTK focus
  • simple tap: pause-resume the camera preview
  • double tap: exit from this window, double tap anywhere on the screen.

4 Video playback[edit]

Video Playback

Here are the available actions to control the video playback:

  • first tap: as video is composed by Wayland, the first tap has to be done outside the video playback window to recover the GTK focus
  • simple tap: pause-resume the video
  • double tap: exit from this window, double tap anywhere on the screen.

5 Artificial Intelligence[edit]

Artificial Intelligence

This is a handwriting character recognition application:
1) Draw a character on the screen which will be analysed by the firmware running on M4 side
2) If the character is recognized, it is displayed on the left (else a question mark is displayed)
3) If the recognized character is associated with an application, the application is launched:

  • A: launch audio playback
  • C: launch camera preview
  • P: display a picture
  • V: launch a video playback
  • S: stop launched application
  • Q: exit from the Artificial Intelligence demo
Warning.png It is possible to start several times the same application (for example three audio playbacks at the same time) which is not recommended

6 3D GPU[edit]

3D GPU

A cube rotates on the screen.

The available actions to control the video playback are:

  • continuous tap : a continuous press on screen will drag the cube.
  • double tap: exit from this window, double tap anywhere on the screen.

7 Bluetooth speaker[edit]

Bluetooth speaker

This application is able to discover bluetooth devices, and pair/connect to them. If an audio capable device is connected, the message The audio BT device <your device> is connected is displayed.

First use:
1) Tap on start scan button: a scan of discoverable devices is done during 15 seconds: the scroll bar progression is displayed
2) Select the device in the list, and tap on connect

If the device is already connected, the connect button is renamed to disconnect.

To exit from this window, double tap anywhere on the screen.

8 Info menu[edit]

Info menu

This menu (which appears after clicking on i icon on the right) explains how to use the demos by providing the basic information needed to use them. To exit from this window, double tap anywhere on the screen.

9 References[edit]

<noinclude>

{{ArticleMainWriter | ChristopheG}}
[[Category:OpenSTLinux_distribution]]
__NOTOC__</noinclude>


'''SUMMARY'''

This article gives information about the Demo Launcher application. The Demo Launcher starts by default in the Starter Package.
This application is written in '''python3'''<ref name=python3url>https://www.python.org</ref> and uses '''GTK'''<ref name=gtkurl>https://www.gtk.org</ref> to display the user interface.
A touchscreen is required to control the application.
<onlyinclude>

== Main menu ==
The main menu is composed of six different demos:
[[File: STM32MP15_launcher_main_menu.png|thumb|upright=2|center|link=|Main menu]]

{|class="contenttable" 
| Netdata perf monitor || Gives information in how to connect to the board through ethernet or wifi (if available) in order to connect to netdata
|-
| Camera preview || Displays the preview camera
|-
| Video playback || Displays the video playback
|-
| Artificial intelligence || Handwriting character recognition (use M4 firmware)
|-
| 3D GPU || Displays a rotating 3D cube 
|-
| Bluetooth speaker || Allows the connection to a bluetooth headset
|}<br>


To exit from this window, tap on the top-right corner cross.
To launch it again, tap or click on the icon of Weston launcher with nine blue squares.

== Netdata perf monitor ==
[[File: STM32MP15_launcher_netdata.png|thumb|upright=2|center|link=|Netdata perf monitor]]

[[netdata]] is a tool started on boot which provides all monitoring information on a web page accessible at the IP address of the board. 
This window helps to connect to the network of the board to get [[netdata]] information.

If Ethernet network is available, the URL to connect to [[netdata]] is displayed.<br>

If wireless network is available, a cursor button is displayed to enable hotspot wifi.<br>

If wifi hotspot is enabled with default configuration, two QR-code are displayed on screen:
* The first one gives parameters to connect to wifi hotspot 
* The second one provides the URL to connect to [[netdata]]

To exit from this window, double tap anywhere on the screen.

== Camera preview ==
Display the preview from /dev/video0.<br>

* On STM32MP157C-DKX boards, a USB webcam can be used <br>

* On STM32MP157C-EVX boards, either a [[MB1379]] camera daughter board or a USB webcam can be used.<br>

Ensure that the webcam is compatible with Linux<sup>&reg;</sup>.

The available actions to control the camera preview are:
* first tap: as preview is composed by Wayland, the first tap has to be done outside the camera preview window to recover the GTK focus
* simple tap: pause-resume the camera preview
* double tap: exit from this window, double tap anywhere on the screen.

== Video playback ==
[[File: STM32MP15_launcher_video_playback.png|thumb|upright=2|center|link=|Video Playback]]

Here are the available actions to control the video playback:
* first tap: as video is composed by Wayland, the first tap has to be done outside the video playback window to recover the GTK focus
* simple tap: pause-resume the video
* double tap: exit from this window, double tap anywhere on the screen.

== Artificial Intelligence ==
[[File: STM32MP15_launcher_AI.png|thumb|upright=2|center|link=|Artificial Intelligence]]

This is a handwriting character recognition application:<br/>

1) Draw a character on the screen which will be analysed by the firmware running on M4 side<br/>

2) If the character is recognized, it is displayed on the left (else a question mark is displayed)<br/>

3) If the recognized character is associated with an application, the application is launched:
* A: launch audio playback
* C: launch camera preview
* P: display a picture
* V: launch a video playback
* S: stop launched application
* Q: exit from the Artificial Intelligence demo
{{Warning | It is possible to start several times the same application (for example three audio playbacks at the same time) which is not recommended}}

== 3D GPU ==
[[File: STM32MP15_launcher_3D_GPU.png|thumb|upright=2|center|link=|3D GPU]]

A cube rotates on the screen.

The available actions to control the video playback are:
* continuous tap : a continuous press on screen will drag the cube.
* double tap: exit from this window, double tap anywhere on the screen.

== Bluetooth speaker ==
[[File: STM32MP15_launcher_bluetooth.png|thumb|upright=2|center|link=|Bluetooth speaker]]

This application is able to discover bluetooth devices, and pair/connect to them.
If an audio capable device is connected, the message ''The audio BT device <your device> is connected'' is displayed.

First use:<br>

1) Tap on ''start scan'' button: a scan of discoverable devices is done during 15 seconds: the scroll bar progression is displayed<br>

2) Select the device in the list, and tap on ''connect''<br>


If the device is already connected, the ''connect'' button is renamed to ''disconnect''.

To exit from this window, double tap anywhere on the screen.

== Info menu ==
[[File: STM32MP15_launcher_info.png|thumb|upright=2|center|link=|Info menu]]

This menu (which appears after clicking on ''i'' icon on the right) explains how to use the demos by providing the basic information needed to use them.
To exit from this window, double tap anywhere on the screen.</onlyinclude>

== References ==<references />
Line 64: Line 64:
 
Here are the available actions to control the video playback:
 
Here are the available actions to control the video playback:
 
* first tap: as video is composed by Wayland, the first tap has to be done outside the video playback window to recover the GTK focus
 
* first tap: as video is composed by Wayland, the first tap has to be done outside the video playback window to recover the GTK focus
* simple tap: pause-resume the video
 
 
* double tap: exit from this window, double tap anywhere on the screen.
 
* double tap: exit from this window, double tap anywhere on the screen.
   

Attachments

Discussions