Skip to content

Commit

Permalink
Fix #123, #121, Make into package and close all windows on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
zachar1a committed Mar 9, 2021
1 parent 5e879b9 commit 18cbb52
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 6 deletions.
18 changes: 12 additions & 6 deletions GroundSystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
import shlex
import subprocess
import sys
from pathlib import Path
import os
import signal
import pathlib

from PyQt5.QtWidgets import QApplication, QMainWindow, QMessageBox

Expand All @@ -36,8 +38,8 @@

__version__ = _version


ROOTDIR = Path(sys.argv[0]).resolve().parent
#ROOTDIR = Path(sys.argv[0]).resolve().parent
ROOTDIR = pathlib.Path(__file__).parent.absolute()


#
Expand Down Expand Up @@ -71,7 +73,7 @@ def closeEvent(self, evnt):
if self.RoutingService:
self.RoutingService.stop()
print("Stopped routing service")

os.kill(0, signal.SIGKILL)
super().closeEvent(evnt)

# Read the selected spacecraft from combo box on GUI
Expand Down Expand Up @@ -171,9 +173,10 @@ def initRoutingService(self):

#
# Main

#
if __name__ == "__main__":
def main():

# Report Version Number upon startup
print(_version_string)

Expand All @@ -193,3 +196,6 @@ def initRoutingService(self):

# Execute the app
sys.exit(app.exec_())

if __name__ == "__main__":
main()
Empty file added Subsystems/__init__.py
Empty file.
Empty file.
Empty file added Subsystems/cmdGui/__init__.py
Empty file.
Empty file added Subsystems/cmdUtil/__init__.py
Empty file.
Empty file added Subsystems/tlmGUI/__init__.py
Empty file.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
setuptools
13 changes: 13 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from setuptools import setup

setup(
name='GroundSystem',
packages=['Subsystems','Subsystems.tlmGUI','Subsystems.cmdGui','Subsystems.cmdUtil'],
include_package_data=True,
version='0.0.0',
entry_points={
'console_scripts':[
'startg=GroundSystem:main'
]
},
)

0 comments on commit 18cbb52

Please sign in to comment.