-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
684a3b5
commit 1435c0c
Showing
40 changed files
with
776 additions
and
586 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
[ | ||
{ | ||
"label": "Robot Controls", | ||
"button_panels": [ | ||
{ | ||
"label": "SSTV Controls", | ||
"buttons": [ | ||
{ | ||
"label": "BW (robot)", | ||
"price": 0, | ||
"command": "B" | ||
}, | ||
{ | ||
"label": "Color (robot)", | ||
"price": 10, | ||
"command": "C" | ||
} | ||
] | ||
}, | ||
{ | ||
"label": "Movement Controls (vote based)", | ||
"buttons": [ | ||
{ | ||
"label": "Left", | ||
"price": 0, | ||
"command": "L", | ||
"keycode": 37 | ||
}, | ||
{ | ||
"label": "Right", | ||
"price": 0, | ||
"command": "R", | ||
"keycode": 39 | ||
}, | ||
{ | ||
"label": "Forward", | ||
"price": 0, | ||
"command": "F", | ||
"keycode": 38 | ||
}, | ||
{ | ||
"label": "Back", | ||
"price": 0, | ||
"command": "B", | ||
"keycode": 40 | ||
} | ||
] | ||
}, | ||
{ | ||
"label": "Misc", | ||
"buttons": [ | ||
{ | ||
"label": "Version", | ||
"price": 0, | ||
"command": "V", | ||
"keycode": 41 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
# Pipenv | ||
Pipfile* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,17 @@ | ||
FROM debian:latest | ||
FROM python:3.10 | ||
|
||
# Setup home | ||
ARG HOME="/app" | ||
ENV HOME=${HOME} | ||
LABEL maintainer="[email protected]" | ||
|
||
# Set the working directory to app home | ||
WORKDIR ${HOME} | ||
COPY . /app | ||
|
||
# Set environment variables | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
WORKDIR /app | ||
|
||
# Install deps | ||
RUN apt update \ | ||
&& apt install -y postgresql gcc python3-dev musl-dev python3-pip gunicorn | ||
|
||
# Python deps | ||
RUN pip install --upgrade pip | ||
COPY requirements.txt requirements.txt | ||
RUN pip install -r requirements.txt | ||
|
||
COPY . . | ||
# Git commit | ||
ARG GIT_COMMIT | ||
ENV GIT_COMMIT=$GIT_COMMIT | ||
|
||
EXPOSE 5000 | ||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ./entrypoint.sh | ||
ENTRYPOINT ["./entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,30 @@ | ||
test: | ||
#export FLASK_APP="app/app.py" && flask run | ||
flask --app app/app.py --debug run | ||
.PHONY: help clean run build | ||
|
||
# Help | ||
help: | ||
@echo " help - Prints this help." | ||
@echo " clean - Shortcut for git clean -fdX" | ||
@echo " build - Builds the required containers locally" | ||
@echo " run - Build and run the app locally" | ||
@echo " docker - Build and run the app using docker" | ||
|
||
# For local development pipenv | ||
run: | ||
pipenv run flask --app MissionController/main.py --debug run | ||
|
||
# For local development (docker) | ||
docker: build | ||
# docker-compose -f docker-compose.yml build && docker-compose -f docker-compose.yml up | ||
docker-compose -f docker-compose.yml up | ||
|
||
# Build container locally | ||
build: | ||
# Generate tag | ||
echo TAG=$(shell git rev-parse --abbrev-ref HEAD | sed 's/[^a-zA-Z0-9]/-/g') > .env | ||
|
||
# Build | ||
docker-compose build --build-arg GIT_COMMIT=$(shell git describe --abbrev=8 --always --tags --dirty) --build-arg DEBUG=True | ||
|
||
|
||
clean: | ||
git clean -fdx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Some general consts, consider moving to YAML | ||
|
||
MISSION_EPOCH = 1696118400 |
Oops, something went wrong.