Commit graph

31 commits

Author SHA1 Message Date
Lephenixnoir
c3d7fd6efa
fxlink: find SDL2 without -mwindows to stay in console [Windows]
When loading SDL2 with pkg-config the -mwindows flag is added, which
instructs the loader to load the program through WinMain() and not
create a console for it. This is intended for GUI programs. However,
fxlink is a CLI program with just occasionally an SDL window on top of
it. Disable -mwindows to keep the console and terminal output. I don't
know how to do that with the pkg-config CMake module, so use the SDL2
module for the Windows build instead.
2024-09-14 07:26:56 +02:00
Lephenixnoir
50997a8b75
very crude Windows build (WIP): disable fxlink TUI, gdb bridge
There is no direct replacement for poll() in the Windows API, so I'm
gonna disable the fxlink TUI for now and maybe later figure out how to
do something equivalent, even if more brute-forcey.
2024-09-14 07:26:56 +02:00
Lephenixnoir
85d7fcf9e9
libfxlink: fix race condition leading to lost messages
Basically if the calculator sends two messages in a row, it is possible
for a single libusb_handle_events() to get both. And the comm structure
wasn't designed for that, because it could buffer only one message at a
time, which the user needed to read after event handling.

The comm structure now has a 16-message buffer, which should be more
than enough for any single event handling loop. On the user level this
has implications in that fxlink_device_finish_bulk_IN() must be called
*in a loop* after each event handling cycle.

Reported in https://git.planet-casio.com/Lephenixnoir/gint/pulls/27
2024-03-24 19:25:35 +01:00
Lephenixnoir
da79a6a0e8
fxlink: add --folder option to fxlink -s to select output folder 2024-01-30 22:19:19 +01:00
Lephenixnoir
45fd52444f
fxlink: add (unused) scale parameter to SDL2 video capture 2024-01-21 21:05:36 +01:00
Lephenixnoir
9f4d17ca4f
fxlink: don't free glib pointer apparently not malloc'ed 2023-12-03 16:08:58 +01:00
Lephenixnoir
7b77fb9c0b
libfxlink: add status functions to avoid looking into fdev fields 2023-04-01 21:35:28 +02:00
Lephenixnoir
394d05726d
fxlink: add missing <unistd.h> to tui/tui-interactive.c 2023-03-28 21:43:59 +02:00
Lephenixnoir
065233387d
split fxlink into library (not installed yet) and executable 2023-03-26 12:20:50 +02:00
Lephenixnoir
3f4aa1e750
fxlink: usable TUI command setup + gintctl test commands 2023-03-26 11:41:55 +02:00
Lephenixnoir
cef9d21076
fxlink: start implementing TUI commands (mainly gintctl tests) 2023-03-17 21:32:01 +01:00
Lephenixnoir
0a61ffc523
fxlink: basic TUI commands 2023-03-12 20:55:18 +01:00
Lephenixnoir
c7c1ec35f7
fxlink: send zero-length packets after commands 2023-03-12 20:54:53 +01:00
Lephenixnoir
3dc9f06219
fxlink: basic writing logic and 'test' command 2023-03-04 18:07:30 +01:00
Lephenixnoir
9d30377d90
fxlink: full rewrite; deeper device management and TUI
This commit rewrites the entire device management layer of fxlink on the
libusb side, providing new abstractions that support live/async device
management, including communication.

This system is put to use in a new TUI interactive mode (fxlink -t)
which can run in the background, connects to calculators automatically
without interfering with file transfer tools, and is much more detailed
in its interface than the previous interactive mode (fxlink -i).

The TUI mode will also soon be extended to support sending data.
2023-03-03 00:29:00 +01:00
Heath123
6849c1624e Add push mode 2023-01-17 23:05:38 +00:00
Lephenixnoir
ebfde1f13d
fxlink: add reconnecting interactive mode (-ir)
This exposes how terrible the libusb code is. Future problem for now.
2022-12-03 13:34:06 +01:00
Lephenixnoir
dd6cd3fcd4
fxlink: add a message if cp fails 2022-08-03 21:50:15 +01:00
Lephenixnoir
27e60884c3
fxlink: generate blob names based on application/type 2022-05-01 18:56:52 +01:00
Lephenixnoir
5e004f989e
Cleanup for PR#8 2022-05-01 16:20:47 +01:00
Slyvtt
6103d852d5 added -u, --unmount option to force unmounting the disk after end of operations 2022-04-20 18:07:58 +02:00
Slyvtt
85314f8310 change option name to -q, --quiet and improved code layout 2022-04-20 13:07:30 +02:00
Slyvtt
89ca11678c added --silent-mode and --fxlink-log options 2022-04-19 18:36:09 +02:00
Lephenixnoir
aa362c15f6
fxlink: don't use <endian.h> 2022-02-16 20:58:41 +01:00
Lephenixnoir
0fc48f3c4d
fxlink: avoid log spam when receiving video frames 2021-08-20 21:51:39 +02:00
Lephenixnoir
c81f9cdba4
fxlink: add video capture with frames displayed in an SDL2 window 2021-08-11 01:44:40 +02:00
Lephenixnoir
d0d71b2889
fxlink: do not show every bulk transfer 2021-05-28 21:49:08 +02:00
Lephenixnoir
d2b6da5122
fxlink: add interactive mode to exchange data with gint 2021-05-25 20:57:22 +02:00
Lephenixnoir
654ea8fa26
fxlink: basic implementation of the bulk transfer mode 2021-04-27 15:42:02 +02:00
Lephenixnoir
2c6a46963d
fxlink: replace __VA_OPT__ with the ugly paste hack
Good job Clang, you really messed up that one.
2021-04-10 22:57:31 +02:00
Lephenixnoir
c059e2395d
fxlink: new tool with features from libusb and (optionally) UDisks2 2021-04-03 11:58:30 +02:00