Commit graph

7 commits

Author SHA1 Message Date
Christophe de Dinechin
1507f36dc5 tests: Replace magic constant -1 with EXIT_PGM
We use `-1` to mark the termination of the RPL thread and request the
state to be saved on disk.

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2024-01-18 22:48:16 +01:00
Christophe de Dinechin
f99a933586 More robust mechanism for saving state on exit on the simulator
The RPL thread now sends a -1 key repeatedly until the main loop exits and saves
the state.

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-24 00:19:49 +02:00
Christophe de Dinechin
bdefd10f38 Force exit of DMCP menus when application exits
The application dialog is in a loop processing keys, so send a special "exit"
keycopde (-1) to force it out.

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-23 23:58:38 +02:00
Christophe de Dinechin
d6fa249301 Remove unused thread_yield function
Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-19 21:56:31 +02:00
Christophe de Dinechin
62baa7d25e Super-dumb implementation of timers
I wanted to do something smart with QTimer, but it fails because they interact
with QT's event loop, making timers across threads annoyingly difficult.

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-19 21:56:30 +02:00
Christophe de Dinechin
126642cd74 Must terminate a thread before destroying it
Qt crashes otherwise

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-19 21:56:30 +02:00
Christophe de Dinechin
6399a1556a Prototype simulator for the DM42
Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-19 21:56:30 +02:00