]> rtime.felk.cvut.cz Git - coffee/main.git/blobdiff - README.md
terminal/src/mt-apps: Fix compilation errors
[coffee/main.git] / README.md
index 86f33923f83d099df194e27699dc2c7f236091af..c79059b5ebb2800bc903434ee24f6c1c3f1fe749 100644 (file)
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ terminal. Fetch it with:
        git submodule update --init
 
 The `coffee-flask`  directory contains the server application, which
-runs on rtime.felk.cvut.cz server.
+runs on [rtime](https://rtime.felk.cvut.cz/coffee) server.
 
 `terminal` directory is the code running on the terminal. It is a
 standard buildroot distribution. The most importat piece of code here
@@ -14,3 +14,32 @@ is the `mtaio` application from `terminal/src/mt-apps`.
 
 A more detailed documentation is available in [Jiří Matěják's Master
 thesis](https://dspace.cvut.cz/handle/10467/76276).
+
+## Collected data
+
+Data collected by the terminal are stored in an sqlite database on the
+rtime server. Users with SSH access to that server have read-only
+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.