LeStarch / fprime-python-examples

An examples repository to pair with fprime-python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fprime-python-examples

If you don't know what this is, start with: fprime-python. This example takes the SignalGen component and implements it in Python. There are four key files to reference:

  1. PyApp/SignalGen/SignalGen.py: an implementation of the component in Python!
  2. PyApp/SignalGen/CMakeLists.txt: the CMakeLists.txt for integrating a component with fprime-python bindings
  3. PyApp/CMakeLists.txt: the CMakeLists.txt deployment setup for running fprime-python applications
  4. PyApp/Top/Main.cpp: the main file including the initialization for fprime-python

Setup This Example

In order to setup this example, run the following commands.

git clone https://github.com/LeStarch/fprime-python-examples.git
cd fprime-python-examples/
git submodule update --init --recursive

Building This Example

To run, follow the standard generate and build steps for fprime deployments. The deployment is in the PyApp folder.

cd PyApp
fprime-util generate
fprime-util build

Running This Example

Running this example should be easy as long as PYTHONPATH is set. Python files end up in the build-artifacts/python and thus this folder must be on the PYTHONPATH when running.

cd PyApp
PYTHONPATH=`pwd`/build-artifacts/python fprime-gds

About

An examples repository to pair with fprime-python.

License:Apache License 2.0


Languages

Language:C++ 66.7%Language:Python 17.0%Language:CMake 16.4%