]> rtime.felk.cvut.cz Git - coffee/mt-apps.git/log
coffee/mt-apps.git
3 years agomt_server: Use "%s" format string in syslog() master
Michal Sojka [Sun, 2 Aug 2020 18:52:17 +0000 (20:52 +0200)]
mt_server: Use "%s" format string in syslog()

This fixes potential security problem reported by
-Werror=format-security:

    error: format not a string literal and no format arguments

4 years agoUses letters in test identifiers, not only numbers
Michal Sojka [Mon, 19 Aug 2019 10:47:33 +0000 (12:47 +0200)]
Uses letters in test identifiers, not only numbers

This helps in catching errors where strings (IDs) are incorrectly used
as numbers.

5 years agoMake it easier to call showOfflineQueue() from remote scripts
Michal Sojka [Thu, 16 Aug 2018 21:52:06 +0000 (23:52 +0200)]
Make it easier to call showOfflineQueue() from remote scripts

5 years agoReplace tabs with spaces
Michal Sojka [Thu, 16 Aug 2018 21:49:58 +0000 (23:49 +0200)]
Replace tabs with spaces

5 years agoDo not generate "empty" messages
Michal Sojka [Thu, 16 Aug 2018 21:48:47 +0000 (23:48 +0200)]
Do not generate "empty" messages

They were probably not used for anything useful. They cluttered logs
and made debugging harder.

5 years agoRework offline mode
Michal Sojka [Thu, 16 Aug 2018 17:42:53 +0000 (19:42 +0200)]
Rework offline mode

In offline mode, we now show the collected data and inform the user
that she can still make a coffee :)

The main idea is that when the server is offline, no leftovers from
remote UI is shown, only local div is shown. Hiding and showing of
local/remote UI has to be implemented in remote-provided
javascript (in coffee-flask repo).

5 years agoStore offline data in an array rather than in a hash
Michal Sojka [Thu, 16 Aug 2018 16:10:01 +0000 (18:10 +0200)]
Store offline data in an array rather than in a hash

This has several reasons:

1) The hash (i.e. localStorage) used timestamps as keys. When doing
   automated testing, multiple events can happen to have the same key,
   which causes problems - see the next point.

2) Events from localStorage has to be sent to the web server in the
   order of their creation. This means that before sending, we had to
   convert the hash into an array and sort it according to the
   timestamp. This can be avoided if we use an array from the
   beginning.

5 years agoUse more distinguishable user ids for simulated users
Michal Sojka [Thu, 16 Aug 2018 16:06:33 +0000 (18:06 +0200)]
Use more distinguishable user ids for simulated users

5 years agoReplace tabs with spaces
Michal Sojka [Thu, 16 Aug 2018 15:37:58 +0000 (17:37 +0200)]
Replace tabs with spaces

5 years agoMake Makefile cleaner
Michal Sojka [Wed, 8 Aug 2018 15:27:46 +0000 (17:27 +0200)]
Make Makefile cleaner

5 years agoFix compilation errors
Michal Sojka [Wed, 8 Aug 2018 15:18:18 +0000 (17:18 +0200)]
Fix compilation errors

5 years agoUse server at localhost
Michal Sojka [Wed, 8 Aug 2018 13:50:13 +0000 (15:50 +0200)]
Use server at localhost

This makes it easier to hack on the terminal. When we build the mtaio
for the terminal, buildroot patches the correct URL in.

5 years agoMakefile: Remove all autodetection
Michal Sojka [Wed, 8 Aug 2018 13:42:58 +0000 (15:42 +0200)]
Makefile: Remove all autodetection

Simulator is now compiled as

    make SIM=1

5 years agoCompile our version of libwebsockets if not found in the system
Michal Sojka [Wed, 8 Aug 2018 13:34:29 +0000 (15:34 +0200)]
Compile our version of libwebsockets if not found in the system

This is mainly for simulator purpuses.

5 years agoAdd charset to the html document
Michal Sojka [Wed, 8 Aug 2018 11:47:02 +0000 (13:47 +0200)]
Add charset to the html document

Without it, the strings produced by javascript are not treated as UTF-8.

5 years agoLog to syslog
Michal Sojka [Wed, 8 Aug 2018 10:59:19 +0000 (12:59 +0200)]
Log to syslog

5 years agoAdd simulator mode (for debugging without terminal)
Michal Sojka [Wed, 8 Aug 2018 10:58:57 +0000 (12:58 +0200)]
Add simulator mode (for debugging without terminal)

5 years agoConvert keys JSON printing to a function
Michal Sojka [Wed, 8 Aug 2018 10:10:31 +0000 (12:10 +0200)]
Convert keys JSON printing to a function

... so that we can use it in a simulator.

5 years agoConvert RFID printing to a function
Michal Sojka [Wed, 8 Aug 2018 09:31:52 +0000 (11:31 +0200)]
Convert RFID printing to a function

... so that we can use it in a simulator.

5 years agoUse correct URL of the rtime server
Michal Sojka [Tue, 7 Aug 2018 11:04:43 +0000 (13:04 +0200)]
Use correct URL of the rtime server

We use plain IP address in an attempt to avoid CIIRC's NAT, which
would prevent us knowing the source IP address. The idea is that we
will allow the request only from the IP address of the terminal.

5 years agoChange blank time
Michal Sojka [Tue, 7 Aug 2018 09:21:15 +0000 (11:21 +0200)]
Change blank time

5 years agoMove the server to rtime
Michal Sojka [Tue, 7 Aug 2018 08:43:15 +0000 (10:43 +0200)]
Move the server to rtime

5 years agoFix Makefile to work under buildroot
Michal Sojka [Tue, 7 Aug 2018 08:39:18 +0000 (10:39 +0200)]
Fix Makefile to work under buildroot

5 years agoBlank the screen during inactivity
Michal Sojka [Mon, 6 Aug 2018 22:15:22 +0000 (00:15 +0200)]
Blank the screen during inactivity

5 years agoPeriodically attempt to load server script until it succeeds
Michal Sojka [Mon, 6 Aug 2018 15:34:46 +0000 (17:34 +0200)]
Periodically attempt to load server script until it succeeds

5 years agoImprove web page
Michal Sojka [Mon, 6 Aug 2018 15:33:53 +0000 (17:33 +0200)]
Improve web page

5 years agoTry to reconnect the disconnected socket every 10 seconds
Michal Sojka [Mon, 6 Aug 2018 14:39:28 +0000 (16:39 +0200)]
Try to reconnect the disconnected socket every 10 seconds

5 years agoAllow using different input event source
Michal Sojka [Mon, 6 Aug 2018 11:55:27 +0000 (13:55 +0200)]
Allow using different input event source

Useful for testing on different hardware (e.g. my laptop).

5 years agoCheck open() errors correctly
Michal Sojka [Mon, 6 Aug 2018 11:48:46 +0000 (13:48 +0200)]
Check open() errors correctly

5 years agoAutodetect RFID support and allow compiling without it
Michal Sojka [Mon, 6 Aug 2018 11:45:47 +0000 (13:45 +0200)]
Autodetect RFID support and allow compiling without it

5 years agoUse GCC's designated initializers to initialize structure fields
Michal Sojka [Mon, 6 Aug 2018 11:14:34 +0000 (13:14 +0200)]
Use GCC's designated initializers to initialize structure fields

This results in more meaningful error messages when one tries to compile
it against incompatible version of libwebsockets.

5 years agoMake error message more useful
Michal Sojka [Mon, 6 Aug 2018 10:59:46 +0000 (12:59 +0200)]
Make error message more useful

5 years ago<hr> in "local"
Jiří Matěják [Wed, 23 May 2018 23:20:56 +0000 (01:20 +0200)]
<hr> in "local"

5 years agoreload button
Jiří Matěják [Tue, 22 May 2018 14:14:54 +0000 (16:14 +0200)]
reload button

5 years agodata stored in context
Jiří Matěják [Tue, 22 May 2018 08:42:21 +0000 (10:42 +0200)]
data stored in context

5 years agoeach line is sent only once, default is empty
Jiří Matěják [Mon, 21 May 2018 19:05:44 +0000 (21:05 +0200)]
each line is sent only once, default is empty

5 years agofree and destroy
Jiří Matěják [Fri, 18 May 2018 09:45:10 +0000 (11:45 +0200)]
free and destroy

5 years agoline length equals buffer size
Jiří Matěják [Fri, 18 May 2018 08:58:37 +0000 (10:58 +0200)]
line length equals buffer size

5 years agofree line on error
Jiří Matěják [Fri, 18 May 2018 08:56:00 +0000 (10:56 +0200)]
free line on error

5 years agoqueue improved
Jiří Matěják [Fri, 18 May 2018 02:32:58 +0000 (04:32 +0200)]
queue improved

5 years agoqueue input events
Jiří Matěják [Fri, 18 May 2018 01:08:14 +0000 (03:08 +0200)]
queue input events

5 years agonew index.html stable
Jiří Matěják [Fri, 18 May 2018 00:47:07 +0000 (02:47 +0200)]
new index.html

5 years ago.gitignore
Jiří Matěják [Fri, 18 May 2018 00:46:08 +0000 (02:46 +0200)]
.gitignore

5 years agowtf resolved, was missing LWS_PRE
Jiří Matěják [Wed, 16 May 2018 11:35:43 +0000 (13:35 +0200)]
wtf resolved, was missing LWS_PRE

5 years agoremote
Jiří Matěják [Tue, 15 May 2018 15:34:59 +0000 (17:34 +0200)]
remote

5 years agoremove gpio from Makefile
Jiří Matěják [Fri, 4 May 2018 10:18:59 +0000 (12:18 +0200)]
remove gpio from Makefile

5 years agomt_gpio.h, trigger happy keys, mt_gpio in Makefile
Jiří Matěják [Fri, 4 May 2018 10:16:45 +0000 (12:16 +0200)]
mt_gpio.h, trigger happy keys, mt_gpio in Makefile

5 years agomt_gpio.c (libgpiod example, unusable - no debouncing)
Jiří Matěják [Fri, 4 May 2018 10:13:13 +0000 (12:13 +0200)]
mt_gpio.c (libgpiod example, unusable - no debouncing)

5 years agokey
Jiří Matěják [Thu, 3 May 2018 18:01:58 +0000 (20:01 +0200)]
key

5 years agogpio started
Jiří Matěják [Thu, 3 May 2018 08:25:44 +0000 (10:25 +0200)]
gpio started

5 years agoMakefile improved
Jiří Matěják [Fri, 27 Apr 2018 10:21:40 +0000 (12:21 +0200)]
Makefile improved

5 years agosafer error checking and more doc
Jiří Matěják [Fri, 27 Apr 2018 08:58:52 +0000 (10:58 +0200)]
safer error checking and more doc

5 years agohtml dir changed
Jiří Matěják [Fri, 27 Apr 2018 08:47:34 +0000 (10:47 +0200)]
html dir changed

5 years agono, one more rename
Jiří Matěják [Fri, 27 Apr 2018 08:35:54 +0000 (10:35 +0200)]
no, one more rename

5 years agohopefully the last mistake gone
Jiří Matěják [Fri, 27 Apr 2018 08:34:53 +0000 (10:34 +0200)]
hopefully the last mistake gone

5 years agomain app renamed
Jiří Matěják [Fri, 27 Apr 2018 08:28:29 +0000 (10:28 +0200)]
main app renamed

5 years agolowercase doctype
Jiří Matěják [Thu, 26 Apr 2018 17:58:18 +0000 (19:58 +0200)]
lowercase doctype

5 years agoprintf string corrected
Jiří Matěják [Thu, 26 Apr 2018 17:56:01 +0000 (19:56 +0200)]
printf string corrected

5 years agomtrfid functions print fd number
Jiří Matěják [Thu, 26 Apr 2018 17:43:07 +0000 (19:43 +0200)]
mtrfid functions print fd number

5 years agodoc, cleaning, no per session data
Jiří Matěják [Thu, 26 Apr 2018 17:37:27 +0000 (19:37 +0200)]
doc, cleaning, no per session data

5 years agoremove timer remnants
Jiří Matěják [Thu, 26 Apr 2018 16:02:34 +0000 (18:02 +0200)]
remove timer remnants

5 years agoalmost ready
Jiří Matěják [Thu, 26 Apr 2018 15:52:38 +0000 (17:52 +0200)]
almost ready

5 years agowebsockets server added
Jiří Matěják [Thu, 26 Apr 2018 12:03:37 +0000 (14:03 +0200)]
websockets server added

6 years agotiny doc and macros
Jiří Matěják [Tue, 24 Apr 2018 16:47:41 +0000 (18:47 +0200)]
tiny doc and macros

6 years agoconditional beep
Jiří Matěják [Tue, 24 Apr 2018 15:36:48 +0000 (17:36 +0200)]
conditional beep

6 years agoMakefile: no win, no pthread
Jiří Matěják [Tue, 24 Apr 2018 15:26:16 +0000 (17:26 +0200)]
Makefile: no win, no pthread

6 years agoasync uid + libev
Jiří Matěják [Tue, 24 Apr 2018 15:24:25 +0000 (17:24 +0200)]
async uid + libev

6 years ago-pthread added polling
Jiří Matěják [Mon, 23 Apr 2018 16:27:19 +0000 (18:27 +0200)]
-pthread added

6 years agodoc
Jiří Matěják [Mon, 23 Apr 2018 15:57:20 +0000 (17:57 +0200)]
doc

6 years agoheader file, open arguments from self, getopts beep
Jiří Matěják [Mon, 23 Apr 2018 14:50:14 +0000 (16:50 +0200)]
header file, open arguments from self, getopts beep

6 years agomain renamed
Jiří Matěják [Mon, 23 Apr 2018 14:48:38 +0000 (16:48 +0200)]
main renamed

6 years agowindows compatible Makefile
Jiří Matěják [Mon, 23 Apr 2018 14:47:57 +0000 (16:47 +0200)]
windows compatible Makefile

6 years agoformatting
Jiří Matěják [Mon, 23 Apr 2018 14:45:11 +0000 (16:45 +0200)]
formatting

6 years agoprint simple json when a card is nearby
Jiří Matěják [Mon, 23 Apr 2018 13:32:55 +0000 (15:32 +0200)]
print simple json when a card is nearby

6 years agoread card id, retab
Jiří Matěják [Thu, 19 Apr 2018 13:20:21 +0000 (15:20 +0200)]
read card id, retab

6 years agotry it without include dir
Jiří Matěják [Tue, 17 Apr 2018 15:44:17 +0000 (17:44 +0200)]
try it without include dir

6 years agoopen reader manually
Jiří Matěják [Tue, 17 Apr 2018 13:31:36 +0000 (15:31 +0200)]
open reader manually

6 years agomissing separator 2
Jiří Matěják [Tue, 17 Apr 2018 11:53:56 +0000 (13:53 +0200)]
missing separator 2

6 years agomissing separator
Jiří Matěják [Tue, 17 Apr 2018 11:53:01 +0000 (13:53 +0200)]
missing separator

6 years agosecond try
Jiří Matěják [Tue, 17 Apr 2018 11:50:39 +0000 (13:50 +0200)]
second try

6 years agoinclude no path
Jiří Matěják [Tue, 17 Apr 2018 11:38:27 +0000 (13:38 +0200)]
include no path

6 years agoMakefile updated
Jiří Matěják [Tue, 17 Apr 2018 11:36:49 +0000 (13:36 +0200)]
Makefile updated

6 years agoinit
Jiří Matěják [Tue, 17 Apr 2018 10:49:49 +0000 (12:49 +0200)]
init