]> rtime.felk.cvut.cz Git - coffee/main.git/summary
 
descriptionCoffee terminal sources
last changeWed, 1 Sep 2021 14:20:17 +0000 (16:20 +0200)
readme

IID Coffee Terminal

This repo contains git submodules with all source code of this coffee terminal. Fetch it with:

git submodule update --init

The coffee-flask directory contains the server application, which runs on rtime server.

terminal directory contains the code running on the terminal. It is based on a standard buildroot distribution. The most important piece of code here is the mtaio application from terminal/src/mt-apps, which contains the web server powering the GUI of the terminal – a web browser. Among other things, it informs the browser about physical events captured by the terminal from the card reader and coffee machine buttons.

A more detailed documentation is available in Jiří Matěják’s Master thesis.

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 prerequisites:

apt install python3-flask libev-dev cmake
pip3 install flask_cors

Alternatively, you can install Nix package manager and run nix-shell in the main directory. This ensures that correct version of all needed dependencies are available in the shell (until you exit).

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.py FLASK_DEBUG=1 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.

The size of the terminal window is 960×560 px.

Submitting patches

Send patches by email (preferably with git send-email) to coffee@rtime.felk.cvut.cz mailing list. You can subscribe the mailing list to discuss the patches sent by others.

It is recommended to run the setup_git script in your local repository to configure git optimally for patch submission.

shortlog
2021-09-01 Michal SojkaREADME: Document how to use nix-shell for development master
2021-09-01 Michal Sojkanix: Add pkg-config to dependency
2021-09-01 Michal Sojkanix: Update dependencies to match versions on updated...
2021-09-01 Michal Sojkanix: Update niv by running `niv init`
2020-08-25 Michal SojkaDocument the size of the terminal window
2020-08-20 Michal SojkaEnable ntpd
2020-08-20 Michal SojkaTry to fix a link to other repo
2020-08-20 Michal SojkaExtend README
2020-08-19 Michal Sojkanix: Add flake8
2020-08-18 Michal Sojkanix: Use the same Jinja2 version as on rtime
2020-08-18 Michal SojkaUse Niv to get perfectly reproducible Nix development...
2020-08-02 Michal SojkaUpdate submodules
2020-08-02 Michal SojkaAdd Nix expression for rtime-like environment
2018-09-03 Michal Sojkacoffee-flask: Fix coffee graph for start of the month
2018-09-02 Michal SojkaREADME: Document where and how to send patches
2018-09-02 Michal SojkaREADME: Fix typos
...
heads
2 years ago master