• Status New
  • Percent Complete
  • Task Type Patches
  • Category User Interface → Simulator
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by rasher - 2009-08-30

FS#10575 - Simulator remote-control

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.

The task blocks this from closing
ID Project Summary Priority Severity Assigned To Progress
10571 Rockbox FS#10571 - Automatic screenshot generation (for the manual) Very Low Low rasher

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.

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.

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.

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.

Sync to r23223.

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 → …


Available keyboard shortcuts


Task Details

Task Editing