Document rasppi setup for MCDU displays
Signed-off-by: fly <merspieler@alwaysdata.net>
This commit is contained in:
parent
aea022735a
commit
95220e9b60
3 changed files with 102 additions and 1 deletions
|
@ -1,3 +1,27 @@
|
|||
# Flightgear Integration
|
||||
This directory contains the configuration files to make this work out of the box with the flightgear A320.
|
||||
This directory contains the configuration files and instructions to make this work out of the box with the flightgear A320.
|
||||
Copy or Symlink the config files into the respective directory in `$FGHOME/Input/`.
|
||||
|
||||
## MCDU Display
|
||||
The displays get run by a raspberry pi or similar SBC, These instructions have been tested on a pi 2 and pi 3, you may need to adapt them if you use a different SBC.
|
||||
|
||||
Install latest raspbian lite image onto the pi: https://www.raspberrypi.com/software/operating-systems/
|
||||
Run `sudo raspi-config` and set the following:
|
||||
* Set a recognizable host name under System Options
|
||||
* Enable ssh under Interface Options
|
||||
* Expand the file system under Advanced Options
|
||||
Reboot so it gets the new name also on the network
|
||||
SSH into the pi `ssh -o PubkeyAuthentication=no -o PreferredAuthentications=password <user>@<hostname>`
|
||||
Install needed packages for the setup and build tools for FGQCanvas: `sudo apt-get update && sudo apt-get install git cmake make gcc qtbase5-dev qtbase5-private-dev libqt5websockets5-dev qtdeclarative5-dev qtdeclarative5-private-dev qtquickcontrols2-5-dev qtquickcontrols2-5-private-dev xbanish lightdm i3 accountsservice qml-module-qtquick2`
|
||||
Run `sudo raspi-config` again and set the following:
|
||||
* Setup autologin into desktop under System Options
|
||||
Clone the flightgear repo: `git clone https://gitlab.com/flightgear/flightgear.git`
|
||||
Go into the `flightgear/utils/fgqcanvas` and run:
|
||||
* `cmake .`
|
||||
* `make -j$(nproc)`
|
||||
* `sudo make install`
|
||||
Copy the following files to the pi:
|
||||
* `pi-files/MCDU/i3.config` to `~/.config/i3/config`
|
||||
* `pi-files/MCDU/MCDU.json` to `~/MCDU.json`
|
||||
Depending on the orientation of your display, you may need to change the xrandr command in the i3 config file.
|
||||
Edit the `MCDU.json` file and change `simhost` to the host name or IP of the PC where flightgear runs on. If you don't use port 8080, change that too. In there you can also fine tune size and position of where the display will be rendered (first `rect` section in the file).
|
||||
|
|
27
Simulators/flightgear/pi-files/MCDU/MCDU.json
Normal file
27
Simulators/flightgear/pi-files/MCDU/MCDU.json
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"canvases": [
|
||||
{
|
||||
"path": "/canvas/by-index/texture[15]",
|
||||
"rect": [
|
||||
0,
|
||||
12,
|
||||
480,
|
||||
480
|
||||
],
|
||||
"url": "ws://simhost:8080/PropertyTreeMirror/canvas/by-index/texture[15]",
|
||||
"window": 0
|
||||
}
|
||||
],
|
||||
"configName": "MCDU Capt",
|
||||
"windows": [
|
||||
{
|
||||
"rect": [
|
||||
0,
|
||||
0,
|
||||
1024,
|
||||
768
|
||||
],
|
||||
"state": 0
|
||||
}
|
||||
]
|
||||
}
|
50
Simulators/flightgear/pi-files/MCDU/i3.config
Normal file
50
Simulators/flightgear/pi-files/MCDU/i3.config
Normal file
|
@ -0,0 +1,50 @@
|
|||
set $mod Mod4
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec i3-sensible-terminal
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
bindsym $mod+d exec --no-startup-id dmenu_run
|
||||
|
||||
# change focus
|
||||
bindsym $mod+j focus left
|
||||
bindsym $mod+k focus down
|
||||
bindsym $mod+l focus up
|
||||
bindsym $mod+semicolon focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+j move left
|
||||
bindsym $mod+Shift+k move down
|
||||
bindsym $mod+Shift+l move up
|
||||
bindsym $mod+Shift+semicolon move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
|
||||
hide_edge_borders smart
|
||||
default_border none
|
||||
|
||||
exec_always --no-startup-id xset dpms 0 0 0
|
||||
exec_always --no-startup-id xset dpms force on
|
||||
exec_always --no-startup-id xset s off -dpms
|
||||
exec_always --no-startup-id xrandr --output HDMI-1 --rotate left
|
||||
exec_always fgqcanvas /home/fly/MCDU.json
|
||||
exec xbanish -a &
|
||||
|
Loading…
Add table
Reference in a new issue