[gpm]Data Sync

Cserveny Tamas smil@fiktiv.szgtikol.kando.hu
Tue, 1 Oct 2002 09:38:30 +0200 (CEST)


Hi!

I've bought a Dexxa optical mouse. I was happy because gpm recognised, and
X also. Till i switched back to text mode. 

The mouse go mad, after then. 

After some work, i figured out, that between the switching to X and back,
gpm has missed some bytes. And shifted the 4-protocol bytes by 1 byte. 
-> And then he never managed to sync.

Maybe, i've found a way to do it. 
My mouse (and many other) sends the 6th bit on. (d6, 8) on the first data
byte. This is always on. according to mouse.4 man page, many other
protocols do so. 

So, i suggest to make into getMouseData a do while loop over the first
byte read. 

do {
read....
} while(!(data & 8)) 
or  m_type->opt_sync whatever

This would proof, that in this case (after some errors) the mouse 'data
sync' can be restored. 

I've done this modification with the CVS version, an my mouse happy
with it. I haven't made a patch, since this is a minor change (two lines. ;)


Best regards,

-- 
Cserveny Tamas

"Mosokonyha! Vigyazat ne ingereljuk a bestiat!" Vanek B. Eduard