Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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;
}