If you are using an Adafruit color sensor, there are 2 possible classes in the SDK that can be instantiated into an object. One is AdafruitI2cColorSensor. This class has a comment at the top of it that says it is deprecated and that AMSColorSensorImpl should be used instead. I can see why since the update rate for the sensor in the deprecated class is not configurable and defaults to 600mSec, which is not useable for many applications. In this post
http://ftcforum.usfirst.org/showthre...-rate-SDK-2-35
I explored what class actually gets instantiated. It turns out the deprecated class is instantiated in the magic associated with the phone config and the hardware map.
I have read through the code for AMSColorSensorImpl and I'd really like to use this newer class. I know there are user contributed solutions but I'd prefer to use the class provided in the SDK. For the life of me I can't figure out how to get an object of AMSColorSensorImpl instantiated and associated with an Adafruit color sensor. Has anyone done this? Can you post code to show me how?
Thanks
http://ftcforum.usfirst.org/showthre...-rate-SDK-2-35
I explored what class actually gets instantiated. It turns out the deprecated class is instantiated in the magic associated with the phone config and the hardware map.
I have read through the code for AMSColorSensorImpl and I'd really like to use this newer class. I know there are user contributed solutions but I'd prefer to use the class provided in the SDK. For the life of me I can't figure out how to get an object of AMSColorSensorImpl instantiated and associated with an Adafruit color sensor. Has anyone done this? Can you post code to show me how?
Thanks
Comment