PDA

View Full Version : SB2 repeated action on button press



Triode
2005-06-25, 06:13
Hi,

For a while I have been seeing jumps in the SB2 user interface when sometimes a button press causes a menu to skip forward two
items. I had put this down to switch bounce, but then I started seeing something in SlimTetris [thanks to Dean for pointing out
this existed!]

In latest 6.1 svn I am finding that pressing "add" causes a 180 degree rotation on SB2 and Softsqueeze, but only a 90 degree
rotation of the block on SBG/SB1.

I don't currently understand the IR code, but looking at the --d_ir debug, it suggests to me that a single key press is causing two
execute commands?

2005-06-25 14:03:01.2061 7689609f 1000.138 1119704581.20602
2005-06-25 14:03:01.2079 found button add for 7689609f
2005-06-25 14:03:01.2086 found function rotate_-1 for button add in mode PLUGIN.SlimTris from map Default
2005-06-25 14:03:01.2091 irCode = [rotate_-1] timer = [1000.138] timediff = [2.03300000000002] last = [add]
2005-06-25 14:03:01.2096 irCode: rotate_-1, 08:bc:99:55:48:01
2005-06-25 14:03:01.2104 irCode not defined: rotate_-1
2005-06-25 14:03:01.2109 trying to execute button: rotate_-1
2005-06-25 14:03:01.2116 executing button: rotate_-1
2005-06-25 14:03:01.4640 found button add for 7689609f
2005-06-25 14:03:01.4652 found function add for button add.single in mode common from map Default
2005-06-25 14:03:01.4657 irCode: add, 08:bc:99:55:48:01
2005-06-25 14:03:01.4666 found function rotate_-1 for button add in mode PLUGIN.SlimTris from map Default
2005-06-25 14:03:01.4670 trying to execute button: rotate_-1
2005-06-25 14:03:01.4678 executing button: rotate_-1

Can someone confirm my reading of the debug?

Adrian

Robert Moser
2005-06-25, 08:12
Triode blurted out:
> Hi,
>
> For a while I have been seeing jumps in the SB2 user interface when
> sometimes a button press causes a menu to skip forward two items. I had
> put this down to switch bounce, but then I started seeing something in
> SlimTetris [thanks to Dean for pointing out this existed!]
>
> In latest 6.1 svn I am finding that pressing "add" causes a 180 degree
> rotation on SB2 and Softsqueeze, but only a 90 degree rotation of the
> block on SBG/SB1.
>
> I don't currently understand the IR code, but looking at the --d_ir
> debug, it suggests to me that a single key press is causing two execute
> commands?
>
> 2005-06-25 14:03:01.2061 7689609f 1000.138 1119704581.20602
> 2005-06-25 14:03:01.2079 found button add for 7689609f
> 2005-06-25 14:03:01.2086 found function rotate_-1 for button add in mode
> PLUGIN.SlimTris from map Default
> 2005-06-25 14:03:01.2091 irCode = [rotate_-1] timer = [1000.138]
> timediff = [2.03300000000002] last = [add]
> 2005-06-25 14:03:01.2096 irCode: rotate_-1, 08:bc:99:55:48:01
> 2005-06-25 14:03:01.2104 irCode not defined: rotate_-1
> 2005-06-25 14:03:01.2109 trying to execute button: rotate_-1
> 2005-06-25 14:03:01.2116 executing button: rotate_-1
> 2005-06-25 14:03:01.4640 found button add for 7689609f
> 2005-06-25 14:03:01.4652 found function add for button add.single in
> mode common from map Default
> 2005-06-25 14:03:01.4657 irCode: add, 08:bc:99:55:48:01
> 2005-06-25 14:03:01.4666 found function rotate_-1 for button add in mode
> PLUGIN.SlimTris from map Default
> 2005-06-25 14:03:01.4670 trying to execute button: rotate_-1
> 2005-06-25 14:03:01.4678 executing button: rotate_-1
>
> Can someone confirm my reading of the debug?
>
> Adrian

Arrr, the curse of using the same names for buttons and functions. In
SlimTris, add these mappings to the defaultMap function:

'play.single' => 'dead',
'play.hold' => 'dead',
'add.single' => 'dead',
'add.hold' => 'dead',

Triode
2005-06-25, 08:19
> Arrr, the curse of using the same names for buttons and functions. In
> SlimTris, add these mappings to the defaultMap function:
>
> 'play.single' => 'dead',
> 'play.hold' => 'dead',
> 'add.single' => 'dead',
> 'add.hold' => 'dead',
>

Thanks that fixes it - I'll check it in as I have some other changes to add (to the lines finction)

Adrian