Skip to content

Commit

Permalink
Updated readme to redirect to cfs-tools/cfs-basecamp
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccomas committed Aug 30, 2022
1 parent 460e3ae commit 36b0146
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 88 deletions.
72 changes: 1 addition & 71 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,71 +1 @@
# core Flight System(cFS) Application Toolkit(cFSAT) - Beta Release
A distribution of the cFS that includes the [cfe-eds-framework](https://github.com/jphickey/cfe-eds-framework) which includes NASA's core Flight Executive(cFE) and CCSDS Electronic Data Sheets(EDS) support. A custom python application provides a user interface to a cFS target communicating over UDP. Each cFS application interface is defined using EDS and the cfe-eds-framework build toolchain generates artifacts that are used by both the flight and ground software systems.

This is a beta-release made in time for the [FSW Workshop](http://flightsoftware.jhuapl.edu/workshop/FSW2022). The following features should work.
- Send commands and receive telemetry
- Create an application from the menu's *Apps->Create*
- Run a tutorial from the menu's *Tutorial*

If you have any issues installing or using the above features please submit an issue.

# Getting Started

## Prerequisites
The system can be developed on any GNU/Linux development host. The following commands install the development packages for
a Debian/Ubuntu environment. Other Linux distributions should provide a similar set of packages but, the package names and
installation tool names may vary.

sudo apt-get update -y
sudo apt-get install build-essential
sudo apt-get install cmake
sudo apt-get install libexpat1-dev
sudo apt-get install liblua5.3-dev
sudo apt-get install libjson-c-dev
sudo apt-get install python3-dev
sudo apt-get install python3-pip
sudo apt-get install python3-tk

Package Notes:
- *sudo apt-get update* updates a platform's current package respositories
- *build-essential* contains a C developer tool suite including gcc, libc-dev, make, etc.*
- *cmake* must be at least v2.8.12
- *liblua5.3-dev* must be at least v5.1
- *You can skip installing pip and replace the 'pip3 install' below with 'python3 -m pip install'

The python appplication uses [PySimpleGUI](https://pysimplegui.readthedocs.io/en/latest/) which can be installed with the following command:

pip3 install PySimpleGUI requests paho-mqtt numpy

## Clone cFSAT Repository
git clone https://github.com/OpenSatKit/cfsat.git

## Build and Run Flight Software
Prepare build tree, build binaries, and install executable in cfsat/cfe-eds-framework/build/exe/cpu1:

cd cfsat/cfe-eds-framework
make SIMULATION=native prep
make install

Run the flight software on the development host:

cd build/exe/cpu1
./core-cpu1

If the cFS fails to start and you get a message like *Aborted (core dumped)* then try running in privileged mode and refer to the *cFSAT Quick Start Guide* for potential reasons why unprivilged mode failed.
sudo ./core-cpu1

## Run Python Ground System Applcation
In a new terminal window, starting in the directory where you issued the git clone, run the Ground System application and establish telemetry flow:

cd cfsat/gnd-sys/app
. ./setvars.sh
python3 cfsat.py

- From the 'cFS Config' dropdown menu select 'Enable Telemetry'

## Next Steps
In the docs folder refer to
- *cFSAT Quick Start Guide* (coming soon)
- [OpenSatKit Application Developer's Guide](https://github.com/OpenSatKit-Apps/osk_c_fw/blob/main/docs/OSK-App-Dev-Guide.pdf)


## This project has been replaced with [cfs-basecamp](https://github.com/cfs-tools/cfs-basecamp)
31 changes: 14 additions & 17 deletions gnd-sys/app/cfsat.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ def update(self, tlm_msg: TelemetryMessage) -> None:

self.current_msg = tlm_msg
if not self.paused:
"""
logger.debug("%s %s received at %s" % (tlm_msg.app_name, tlm_msg.msg_name, str(tlm_msg.sec_hdr().Seconds)))
self.window['-APP_ID-'].update(tlm_msg.pri_hdr().AppId)
self.window['-LENGTH-'].update(tlm_msg.pri_hdr().Length)
Expand All @@ -471,6 +472,7 @@ def update(self, tlm_msg: TelemetryMessage) -> None:
self.payload_text = ""
self.format_payload_text(tlm_msg.eds_obj, tlm_msg.eds_entry.Name)
self.window['-PAYLOAD_TEXT-'].update(self.payload_text)
"""
self.window['-TLM_UPDATE-'].click()
self.lock.release()

Expand Down Expand Up @@ -515,7 +517,7 @@ def payload_str_max(self, base_object, base_name):

def gui(self):
print("TelemetryGuiClient() starting gui")
thread = threading.currentThread()
thread = threading.current_thread()

hdr_label_font = ('Arial bold',12)
hdr_value_font = ('Arial',12)
Expand Down Expand Up @@ -560,21 +562,16 @@ def gui(self):
self.window['-PAUSED-'].update('')

if self.event == '-TLM_UPDATE-':
#Keep hook becuase may need event loop context for updates
#Keep hook because may need event loop context for updates
#print("telemetry update click")
"""
if not self.paused:
logger.debug("%s %s received at %s" % (tlm_msg.app_name, tlm_msg.msg_name, str(tlm_msg.sec_hdr().Seconds)))
self.window['-APP_ID-'].update(tlm_msg.pri_hdr().AppId)
self.window['-LENGTH-'].update(tlm_msg.pri_hdr().Length)
self.window['-SEQ_CNT-'].update(tlm_msg.pri_hdr().Sequence)
self.window['-TIME-'].update(str(tlm_msg.sec_hdr().Seconds))
self.payload_text = ""
self.format_payload_text(tlm_msg.eds_obj, tlm_msg.eds_entry.Name)
self.window['-PAYLOAD_TEXT-'].update(self.payload_text)
pass
"""
logger.debug("%s %s received at %s" % (self.current_msg.app_name, self.current_msg.msg_name, str(self.current_msg.sec_hdr().Seconds)))
self.window['-APP_ID-'].update(self.current_msg.pri_hdr().AppId)
self.window['-LENGTH-'].update(self.current_msg.pri_hdr().Length)
self.window['-SEQ_CNT-'].update(self.current_msg.pri_hdr().Sequence)
self.window['-TIME-'].update(str(self.current_msg.sec_hdr().Seconds))
self.payload_text = ""
self.format_payload_text(self.current_msg.eds_obj, self.current_msg.eds_entry.Name)
self.window['-PAYLOAD_TEXT-'].update(self.payload_text)
self.tlm_server.remove_msg_observer(self.tlm_msg, self)
self.window.close()

Expand Down Expand Up @@ -1351,7 +1348,7 @@ def create_window(self, sys_target_str, sys_comm_str):

#sg.Button('Send Cmd', enable_events=True, key='-SEND_CMD-', pad=(10,1)),
#sg.Button('View Tlm', enable_events=True, key='-VIEW_TLM-', pad=(10,1)),
window = sg.Window('cFS Application Toolkit', layout, auto_size_text=True, finalize=True)
window = sg.Window('Base Camp - cFS Application Toolkit', layout, auto_size_text=True, finalize=True)
return window

def execute(self):
Expand Down Expand Up @@ -1395,7 +1392,7 @@ def execute(self):
# --- Loop taking in user input --- #
while True:

self.event, self.values = self.window.read(timeout=100)
self.event, self.values = self.window.read(timeout=50)
logger.debug("App Window Read()\nEvent: %s\nValues: %s" % (self.event, self.values))

if self.event in (sg.WIN_CLOSED, 'Exit') or self.event is None:
Expand Down

0 comments on commit 36b0146

Please sign in to comment.