Tigge / openant

ANT and ANT-FS Python Library
MIT License
174 stars 80 forks source link

enable extended messages and background scanning #46

Closed pirower closed 4 years ago

pirower commented 4 years ago

according to chapter "9.5.2.2 Assign Channel" of the document "ANT_Message_Protocol_and_Usage_Rev_5.1" I added the possibility to set the extended assignment (which is optional). If the extended assignment is set to 0x01, background scanning is enabled (see "5.2.1.4.2 Background Scanning" of the same document).

according to chapter "9.5.2.17 Enable Extended Messages (0x66)" of the same document, the standard data message format can be extended by multiple variable, such as device number, device type, trans type (see chapter "7.1.1 Extended Messages Format").

In the example file "scan.py" I showed the possibilities which come with the new funcitonality. You can now can in an enivronment with multiple ant+ devices for the different device ID (aka device numbers) and connect on a later stage to a specific device number you have found earlier. Thus no need for a wild card and you can be sure to connect to the correct ant+ device

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.09%) to 57.37% when pulling 1b6a528e40fc0e290d1459403e5e8f302e47c917 on pirower:master into b6125d1bd4b3f76daa8acac173d9d79b8d364e5f on Tigge:master.

Tigge commented 4 years ago

Thank you so much for this contribution!