odevice_ipaq, machine IDs and button init

Paul Eggleton <[email protected]> Fri, 9 Feb 2007 01:04:12 +1300
Newsgroups gmane.comp.handhelds.opie.devel
Message-ID <[email protected]>
Hi there,

I have found out why I am seeing so many extra buttons in the Button settings 
application on my iPAQs (h3850 & h3970). If you take a look in 
odevice_ipaq.cpp you can see in init() it checks to see if the button model 
ANDed with the device model = the device model, which would be just fine if 
the none of the device models were binary subsets of eachother - except they 
are. When tested in this way, a button defined as being for eg. 
Model_iPAQ_H22xx (0x10007) will be active on Model_iPAQ_H31xx (0x10001), 
Model_iPAQ_H36xx (0x10002), and Model_iPAQ_H38xx (0x10004). This has probably 
been happening for a while but it has started to become more of a problem as 
support for new iPAQs has been added recently.

It seems to me we either need to renumber all of the devices so that only one 
bit in the model mask is set (0x10001, 0x10002, 0x10004, 0x10008...), or we 
come up with another way of associating buttons with multiple models.

Any comments?

Cheers,
Paul
_______________________________________________

http://opie.handhelds.org/cgi-bin/moin.cgi/DeveloperWikiIndex

Opie-devel mailing list
[email protected]
https://handhelds.org/mailman/listinfo/opie-devel