Test program to play motion with XBus servos.
This is just a working sample. This code will play motion with XBus servos. This is not finished :-). Tested only on KL25Z.
これは単なる動作サンプルです。 XBusサーボを使ってモーションの再生を行います。 まだまだ未完です(^_^;) KL25Z上でのみ動作確認しています。
Diff: main.cpp
- Revision:
- 2:ca608c24a14e
- Parent:
- 1:4b239aea14f4
--- a/main.cpp Wed Nov 05 07:36:23 2014 +0000 +++ b/main.cpp Wed Nov 05 08:47:14 2014 +0000 @@ -136,8 +136,13 @@ } // initialize XBus Servos - for (counter = 0; counter < kMaxServoNum; counter++) - gXBus.addServo(servoChannel[counter], kXbusServoNeutral); + for (counter = 0; counter < kMaxServoNum; counter++) { + result = gXBus.addServo(servoChannel[counter], kXbusServoNeutral); + if (result != kXBusError_NoError) { + gXBus.stop(); + return result; + } + } return kXBusError_NoError; }