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

ConvenienceRobot Send Command? #56

Open gabriellet opened 7 years ago

gabriellet commented 7 years ago

Hi, I wanted to know if there's an extra step to using the ConvenienceRobot send function. I have some code like this:

robot.send(RKSetHeadingCommand(heading: 0.0))
robot.send(RKRollCommand(heading: hdg, velocity: 1.0, andDistance: dst)

While neither of these work, these do:

robot.setZeroHeading(0.0)
robot.drive(withHeading: hdg, andVelocity: 1.0)

Any suggestions as to why this may be happening.

zenelk commented 7 years ago

Hey there, there is no other step other than send. I'll take a peek into this problem. Thanks for bringing it to our attention. Strangely enough, robot.setZeroHeading() actually calls robot.send(RKSetHeadingCommand(heading: 0.0)) on the inside.