Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ test/DAQexperimental/__pycache__

# Output data
output/*

build/*
liquid_engine_gui.egg-info
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "sdec"]
path = sdec
url = git@github.com:SunDevilRocketry/sdec.git
url = https://github.com/SunDevilRocketry/sdec
branch = pip-packaging
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
Empty file added liquid_engine_gui/__init__.py
Empty file.
28 changes: 14 additions & 14 deletions main.py → liquid_engine_gui/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import sys
import datetime
import math
from importlib.resources import files

# Serial (USB)
import serial
Expand All @@ -54,20 +55,17 @@
sys.path.insert(0, './sdec')

# Imports
import solenoid
import gauge as SDR_gauge
import valve as SDR_valve
import engine_display as SDR_engine_display
import sequence as SDR_sequence
import buttons as SDR_buttons
import sensor as SDR_sensor
from liquid_engine_gui.plumbing import solenoid
from liquid_engine_gui import gauge as SDR_gauge
from liquid_engine_gui import valve as SDR_valve
from liquid_engine_gui import engine_display as SDR_engine_display
from liquid_engine_gui import sequence as SDR_sequence
from liquid_engine_gui import buttons as SDR_buttons
from liquid_engine_gui import sensor as SDR_sensor

# SDEC
import sdec
import commands
import hw_commands
import sensor_conv
import engineController
import sdec.__main__ as sdec
from sdec import commands, hw_commands, sensor_conv, engineController


####################################################################################
Expand Down Expand Up @@ -514,8 +512,10 @@ def update_valve_states( valve_states ):
)

# Program icon
SDRlogo = tk.PhotoImage(file='images/SDRLogo5.png')
SDRImage = Image.open("images/SDRlogont2.png")
# SDRlogo = tk.PhotoImage(file='images/SDRLogo5.png')
# SDRImage = Image.open("images/SDRlogont2.png")
SDRlogo = tk.PhotoImage(files("liquid_engine_gui").joinpath("images").joinpath("SDRLogo5.png"))
SDRImage = Image.open(files("liquid_engine_gui").joinpath("images").joinpath("SDRlogont2.png"))
SDRImage = SDRImage.resize(
(int(0.8*140),int(0.8*125)),
Image.Resampling.LANCZOS
Expand Down
File renamed without changes.
20 changes: 10 additions & 10 deletions engine_display.py → liquid_engine_gui/engine_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
###############################################################
# Project Modules #
###############################################################
import component_template
import solenoid as SDR_solenoid
import ball_valve as SDR_ball_valve
import orifice as SDR_orifice
import pressure_sensor as SDR_pressure_sensor
import temp_sensor as SDR_temp_sensor
import tank as SDR_tank
import pipe as SDR_pipe
import nozzle as SDR_nozzle
import main
from liquid_engine_gui.plumbing import component_template
from liquid_engine_gui.plumbing import solenoid as SDR_solenoid
from liquid_engine_gui.plumbing import ball_valve as SDR_ball_valve
from liquid_engine_gui.plumbing import orifice as SDR_orifice
from liquid_engine_gui.plumbing import pressure_sensor as SDR_pressure_sensor
from liquid_engine_gui.plumbing import temp_sensor as SDR_temp_sensor
from liquid_engine_gui.plumbing import tank as SDR_tank
from liquid_engine_gui.plumbing import pipe as SDR_pipe
from liquid_engine_gui.plumbing import nozzle as SDR_nozzle
# import main


###############################################################
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
###############################################################
# Standard Imports #
###############################################################
import component_template as SDR_component_template
from liquid_engine_gui.plumbing import component_template as SDR_component_template


class Ball_Valve(SDR_component_template.Component):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
###############################################################
# Project Imports #
###############################################################
import component_template as SDR_component_template
from liquid_engine_gui.plumbing import component_template as SDR_component_template


class Nozzle:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
###############################################################
# Standard Imports #
###############################################################
import component_template as SDR_component_template
from liquid_engine_gui.plumbing import component_template as SDR_component_template


class Orifice(SDR_component_template.Component):
Expand Down
2 changes: 1 addition & 1 deletion plumbing/pipe.py → liquid_engine_gui/plumbing/pipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
###############################################################
# Project Imports #
###############################################################
import component_template as SDR_component_template
from liquid_engine_gui.plumbing import component_template as SDR_component_template


###############################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
###############################################################
# Standard Imports #
###############################################################
import component_template as SDR_component_template
from liquid_engine_gui.plumbing import component_template as SDR_component_template


class PressureSensor(SDR_component_template.Component):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
###############################################################
# Project Imports #
###############################################################
import component_template as SDR_component_template
from liquid_engine_gui.plumbing import component_template as SDR_component_template


class Solenoid(SDR_component_template.Component):
Expand Down
2 changes: 1 addition & 1 deletion plumbing/tank.py → liquid_engine_gui/plumbing/tank.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
###############################################################
# Project Imports #
###############################################################
import component_template as SDR_component_template
from liquid_engine_gui.plumbing import component_template as SDR_component_template


class Tank:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
###############################################################
# Standard Imports #
###############################################################
import component_template as SDR_component_template
from liquid_engine_gui.plumbing import component_template as SDR_component_template


class TempSensor(SDR_component_template.Component):
Expand Down
2 changes: 1 addition & 1 deletion sensor.py → liquid_engine_gui/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
####################################################################################
# Imports #
####################################################################################
import controller as SDR_controller
from sdec import controller as SDR_controller


####################################################################################
Expand Down
4 changes: 2 additions & 2 deletions sequence.py → liquid_engine_gui/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
####################################################################################
# Project Imports #
####################################################################################
import engineController
import valveController
from sdec import engineController
from sdec import valveController


####################################################################################
Expand Down
2 changes: 1 addition & 1 deletion valve.py → liquid_engine_gui/valve.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
####################################################################################
# Project Imports #
####################################################################################
import buttons as SDR_buttons
from liquid_engine_gui import buttons as SDR_buttons


####################################################################################
Expand Down
24 changes: 24 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages]
find = {where=["."], include=["liquid_engine_gui*"], exclude = ["Extras"]}

[tool.setuptools.package-data]
liquid_engine_gui = ["images/*"]

[project]
name = "liquid_engine_gui"
authors = [
{name = "Nitish Chennoju"},
{name = "Ian Chandra"},
{name = "Colton Acosta"},
{name = "Nick Nguyen"}
]
version = "2024.9.0+packagingdev"
dependencies = [
"pillow",
"sdec@git+https://github.com/SunDevilRocketry/sdec"
]
readme = "readme.md"
30 changes: 22 additions & 8 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
# Rocket Engine GUI
## Getting Started
1) Open cmd / terminal
2) Navigate into the project folder
3) Ensure all required libraries are downloaded (pip install -r requirements.txt)
4) Run main program (python SDR_LiquidGUI.py)
5) Connect Arduino running SDR_DataLogger_Analog.ino via USB port
![A screenshot of the sdec gui](liquid_engine_gui/images/engine_gui_2023.png)

The Liquid Engine GUI is a visual control and monitoring software for the SDR Liquid Engine Valve controller, written in Python using Tk and our [sdec](https://github.com/SunDevilRocketry/sdec) library.

The following code on this repository has been designed to control the SDR Liquid Engine Switchbox to:
- Automate Rocket Engine Startup
- Display Rocket Engine State
- Log Sensor Data
- Have Pre-programmed actions to execute (i.e. Startup)

## GUI Layout
<img src="images/engine_gui_2023.png">
## Installation
> In the near future, we intend to have an installer application for, at the minimum, Microsoft Windows. For now, the installation process
1. Make sure you have a working Python installation with pip.
2. Install the GUI with pip.

pip install git+https://github.com/SunDevilRocketry/liquid_engine_gui
3. Run the GUI with the following command:

python -m liquid_engine_gui
> If you are developing the software, make sure you don't execute this command in the same directory as the repository, or you may experience bugs.

## Development
The source code is under the directory liquid_engine_gui. The versioning convention is the same as SDEC.

Normally, sdec is automatically pulled with pip. However, it is also included as a submodule in this repo should you be working on sdec development. To test changes to sdec and/or liquids gui, pull your submodules, then use the repo as the current directory and run:

```python3 -m liquid_engine_gui```

This project uses Tk and sdec as a library.