Closed sodastsai closed 9 years ago
Thanks again for the feedback! What you're describing works as expected. RKMacroObject only takes RKMacroCommand objects. RKStabilizationCommand is a robot control command not an instance of RKMacroCommand. You currently don't see a compiler warning if you pass the command in inline like your example above because we're returning id rather than instancetype. I will update the command classes to return instancetype so you get some compile time help in this situation.
Great, it's good to use compiler's features to keep developers away from typo and these type errors.
Thanks.
sodas http://about.me/sodastsai
On Feb 18, 2015, at 2:02 AM, Corey notifications@github.com wrote:
Thanks again for the feedback! What you're describing works as expected. RKMacroObject only takes RKMacroCommand objects. RKStabilizationCommand is a robot control command not an instance of RKMacroCommand. You currently don't see a compiler warning if you pass the command in inline like your example above because we're returning id rather than instancetype. I will update the command classes to return instancetype so you get some compile time help in this situation.
— Reply to this email directly or view it on GitHub.
Added JIRA task for this: SDK-665
This is updated in the Beta 3 release
When playing an
RKMacroObject
withRKStabilizationCommand
as one command, the app crashes and raises an exception-[RKStabilizationCommand getByteRepresentation]: unrecognized selector sent to instance
.(where
self.robot
is anRKConvenienceRobot
instance)Anyway, it's okay to use
I'm using the new SDK (3.0.0-beta2)