Skip to content

Latest commit

 

History

History
48 lines (29 loc) · 2 KB

File metadata and controls

48 lines (29 loc) · 2 KB

Python BT82x Development Flightdeck Example

Back

Flightdeck Example

The flightdeck.py example demonstrates drawing multiple scissored areas, handling overlapped drawing, and gradients for skeuomorphism.

It uses the eveflightcontrols.py snippet to draw the indicators.

The example is intended to show an aircraft attitude and altitude instruments. The attitude instrument has bank/roll and pitch displays. The physical control for this would be a gyroscopic device with rotating gimbals for pitch and roll. The altitude instrument has a graduations at 200ft and reads up to 10000ft. A real altitude gauge typically uses barometeric pressure.

The attitude drawing comprises four parts: the bezel which uses gradients to shade the outer and inner edges of the bezel; the bank/roll area which is the outer circle of the drawing; the pitch area which is the inner part; a reference overlay which is fixed in position. The stencilling is used to make sure that graphical elements of each part do not spill over into the other parts. The altitude drawing uses the same bezel method and internal graduation lines clipped with a stencil. The reading needle is outlined in a single pixel of black for clarity.

Flightdeck Example

Running the Example

The format of the command call is as follows:

MPSSE example:

python flightdeck.py --connector ft232h 

FT4222 example in single mode (--mode 0):

python flightdeck.py --connector ft4222module 

FT4222 example in dual mode (--mode 1) or quad mode (--mode 2):

python flightdeck.py --connector ft4222module --mode 2

Files and Folders

The example contains a single file which comprises all the demo functionality.

File/Folder Description
flightdeck.py Example source code file for the flightdeck demo
eveflightcontrols.py Snippet source code for altitude and attitude indicators
docs Documentation support files