sphero-inc / Sphero-iOS-SDK

🚫 DEPRECATED: Sphero™ is the amazing robotic ball ( sphero.com ) created by Orbotix, this is the repository for the iOS SDK for Sphero™. Visit dev site for more information:
http://sdk.sphero.com
225 stars 81 forks source link

- [RKConvenienceRobot enableSensors:atStreamingRate:] doesn't work #18

Closed sodastsai closed 9 years ago

sodastsai commented 9 years ago

In the SensorStreaming sample project, the method used to setup Sphero as a sensor is not work.

- (void)sendSetDataStreamingCommand {
    // Requesting the Accelerometer X, Y, and Z filtered (in Gs)
    //            the IMU Angles roll, pitch, and yaw (in degrees)
    //            the Quaternion data q0, q1, q2, and q3 (in 1/10000) of a Q
    RKDataStreamingMask mask =  RKDataStreamingMaskAccelerometerFilteredAll |
    RKDataStreamingMaskIMUAnglesFilteredAll   |
    RKDataStreamingMaskQuaternionAll;
    [_robot enableSensors:mask atStreamingRate:10];
}

After change the enableSensors:atStreamingRate: line to old SDK usage:

- (void)sendSetDataStreamingCommand {
    // Requesting the Accelerometer X, Y, and Z filtered (in Gs)
    //            the IMU Angles roll, pitch, and yaw (in degrees)
    //            the Quaternion data q0, q1, q2, and q3 (in 1/10000) of a Q
    RKDataStreamingMask mask =  RKDataStreamingMaskAccelerometerFilteredAll |
    RKDataStreamingMaskIMUAnglesFilteredAll   |
    RKDataStreamingMaskQuaternionAll;
    [_robot sendCommand:[RKSetDataStreamingCommand commandWithRate:10 andMask:mask]];
}

then the sample app works.

zenelk commented 9 years ago

Just tested this in the Beta 3 release. Should be fixed now. Let me know if it's not fixed for you.