funny little libdc problem on iOS
Jef Driesen
jef at libdivecomputer.org
Mon Dec 4 00:56:03 PST 2017
On 2017-12-03 05:07, Dirk Hohndel wrote:
> My guess is that this will change with the iostreams that Jef is
> working on, but right now when I build libdivecomputer for iOS (where
> I have no libusb / hidusb support), half the dive computers that we
> actually are able to support via BLE are not compiled in (Suunto EON
> Steel and EON Core, Scubapro G2, Square, Sport Matrix), as they are
> ifdef'ed out depending on USBHID.
Yes, this will indeed change. Those ifdef's will be removed.
To support multiple transports per device, the dc_transport_t enum will
be changed into a bitfield. The dc_descriptor_get_transport() function
will always return all transports, even the ones for which no built-in
implementation is available. So it's up to the application to filter out
devices for which there is no suitable transport available. This is
necessary to support custom transports. (With custom transports,
libdivecomputer no longer knows which transports are supported. It only
knows about the built-in ones.)
To query which built-in transports are available, I will also add some
new api. Probably a function which returns a simple bitmask, or maybe
some modification to filter out descriptors based on some extra
parameter (e.g. all or only built-in).
Jef
More information about the subsurface
mailing list