Hello everyone,
It seems like the Eclipse plugin's content assist feature doesn't only show the relevant properties/methods/constants for objects or instances, but that it rather shows everything there is to find in the entire Connect IQ SDK:
see screenshot
To me, that makes it rather useless...
To illustrate, I just started checking out the Connect IQ SDK and I wanted to simulate and capture some sensor information.
The API docs tell me there is a Sensor.Info object that has the following attributes: altitude, cadence, heading, heartRate, power, pressure, speed, temperature:
see screenshot
The "Positioning & Sensors" documentation however omits the "power" attribute:
see screenshot
So is it available? The only way to know for sure is to test:
see screenshot
Great! No compilation errors; it seems that the "power" attribute is indeed available for the Sensor.Info object and that the documentation fails to mention it.
But wait... something is still wrong here... I'm building an app for the vivoactive watch, and that watch doesn't have a barometric sensor. Yet, I have a line reading "System.println("Pressure (Pa): " + sensorInfo.pressure);" in my code, and it doesn't give me a compilation error!? My app will reference an attribute that never gets populated and I won't know until I notice it myself, bummer!
Another thing that would be nice, is knowing which sensor triggered and update. Unfortunately, the only way to do that now it seems is to store the last value for every sensor at the end of the onUpdate function, and match these values with the new values when entering the onUpdate function the next time to see which values have changed. It would be much simpler & more efficient to retrieve the function caller and write some conditional code, but the SDK doesn't provide a way to do so.
Any chance the plugin will receive some love soon, or that it will be open sourced so that the community can help out improving it?
Best regards,
Sven