From 76042f657ce9734109236d08df32ff69ee63815d Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Wed, 8 Aug 2018 16:06:13 +0200 Subject: [PATCH 1/1] Make it easier to hack on the code and document it --- README.md | 20 ++++++++++++++++++++ terminal/src/buildroot | 2 +- terminal/src/mt-apps | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0719f11..c79059b 100644 --- a/README.md +++ b/README.md @@ -23,3 +23,23 @@ access to the database. For example, the whole database can be dumped with this command: sqlite3 /home/coffee/coffee-flask/coffee.db .dump + +## Hacking on the code + +To improve the terminal, you can run all the relevant code on your +Linux computer. + +First install all prerequisities: + + apt install python3-flask libev-dev cmake + pip3 install flask_cors + +Then compile and run all the software components: + +1. Compile _mtaio_ simulator: `make -C terminal/src/mt-apps SIM=1` +2. Run mtaio: `cd terminal/src/mt-apps && ./build/mtaio` +3. Run the server application: `cd coffee-flask && FLASK_APP=app flask run` +4. Point your web browser to http://localhost:8080/ +5. Pressing keys in _mtaio_ window simulates various activities. + Numbers are cards of different users, letters A through F are + different coffee machine buttons. diff --git a/terminal/src/buildroot b/terminal/src/buildroot index 4befb61..75cb61a 160000 --- a/terminal/src/buildroot +++ b/terminal/src/buildroot @@ -1 +1 @@ -Subproject commit 4befb6169fb9472c8b3fb4661ffcb1439dba346f +Subproject commit 75cb61a4912d084dccc57836de4f1d4ebec8440a diff --git a/terminal/src/mt-apps b/terminal/src/mt-apps index c8964b7..0c05f9b 160000 --- a/terminal/src/mt-apps +++ b/terminal/src/mt-apps @@ -1 +1 @@ -Subproject commit c8964b7eca07b7e22447e7496605f4570030bddb +Subproject commit 0c05f9be4b220e28918c43473e44d4189edf3894 -- 2.39.2