TheOtherHalf QSensor Integration
Talking to lpotter the other night, it seems like there is no easy/standard way to integrate extra sensors on TheOtherHalf through the QtSensors Qt API.
QtSensors already has types for most sensors you might want to connect, so providing a platform based way to register a custom sensor backend to expose i2c sensors on TheOtherHalf would be a great way for app developers to take advantage because it means that app developers do not have to maintain custom sensor drivers, simply call the front QSensors class like they would any other internal sensor, keeping an eye on the available sensors properties to check whether the sensor TheOtherHalf is connected or not.
Example: i2c based altimeter/ambient temperature/barometer to be exposed through QAltimeter, the NFC tag identifies the driver/backend package to download and register on the system, package also unregisters/deactivates from the system if TheOtherHalf is removed.
App developers can use QSensor::sensorsForType, to check available sensors, and handle any presence/absence of different sensors, or choose which sensor to connect to in the case of duplicated types (eg. external GPS)
Could you elaborate on what is wanted? I think creating sensor backends is easy enough -- http://qt-project.org/doc/qt-5/qtsensors-grue-example.html -- though possibly they won't be allowed in Harbour. Is that the problem? Or maybe the question is about an easier way to talk to I2C hardware?
javispedro ( 2014-09-16 17:00:21 +0200 )editYeah you can make sensor backends just fine, this is more of a request about where they are implemented. on a per-app basis or on a platform basis.
Instead of every app having its own copy of the sensor backend, the backend is registered independently on the system itself. Like the current internal sensors on the Jolla, app developers don't need to worry about the sensor backends to write an app, they're merely consumers. Using TOH sensors should be the same, the only difference being that you need to program for its absence.
It's about making it easy to develop and maintain multiple apps that utilize sensor functionality on the TOH. Not worried about Harbour at this stage, but of course Jolla should provide a good platform for TOH developers to take advantage of.
r0kk3rz ( 2014-09-16 18:56:57 +0200 )edit