Warning: mysqli_real_connect(): Headers and client library minor version mismatch. Headers:50625 Library:50543 in /sites/rockbox.org/flyspray/adodb/drivers/adodb-mysqli.inc.php on line 108 FS#10575 : Simulator remote-control



FS#10575 - Simulator remote-control

Attached to Project: Rockbox
Opened by Jonas Häggqvist (rasher) - Sunday, 30 August 2009, 19:12 GMT
Task Type Patches
Category Simulator
Status New
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


This patch enables you to control the simulator using a named pipe to provide simulated keypresses, rather than the keyboard.

Unfortunately there is a bug that means that not all events seem to have any effect. On the e200 sim, I can use the scroll buttons to move in the main menu, but neither RIGHT nor SELECT lets me enter any of the entries. I suspect it's related to repeat or hold/release handling, but I'm not sure how to fake that properly.
This task depends upon

View Dependency Graph

Comment by Thomas Martitz (kugel.) - Sunday, 30 August 2009, 20:20 GMT
How are you dealing BUTTON_REL and BUTTON_REPEAT?

BUTTON_REL must always be sent when a button is released (even after BUTTON_REPEAT).

It goes like this (select for example)

starting with the first tick
button released immediately

button is pressed for a short time, but not long enough for repeat:

Now longer, with repeat:

You need to fake that properly.
Comment by Jonas Häggqvist (rasher) - Sunday, 30 August 2009, 20:52 GMT
Update that fixes the bug by sending a release event immediately after posting the buttonpress. This should pretty much be useful at this stage, and I'll go back to working on FS#10571 using this method instead of the unstable xte method.
Comment by Jonas Häggqvist (rasher) - Monday, 31 August 2009, 03:14 GMT
The pipe reading is now implemented as a tick task. This seems to be more stable - plus you can use the regular keys if you want to.
Comment by Jonas Häggqvist (rasher) - Monday, 07 September 2009, 15:55 GMT
Two updates:

1) Post button status to the button status variable. This means plugins that do their own button handling work as well.
2) Attempt to add a STARTPLUGIN command. It does start the plugin, but behaviour is rather flaky. I suspect I'm not going about it the right way (launching the plugin from the wrong thread or something?). Plus there are 2 warnings caused by me not handling pointers right, I think.
Comment by Rosso Maltese (asettico) - Saturday, 17 October 2009, 09:30 GMT
Sync to r23223.
Comment by MichaelGiacomelli (saratoga) - Monday, 18 October 2010, 04:01 GMT
Can this be used for timing sensitive operations? It would be really neat to be able to issue the sim a series of commands in sequence with precise timing. For instance a sequence like this would be very helpful for debugging the playback engine:

load track -> play for 20 seconds -> skip backwards 5 seconds -> ...