/usr/src/rpm/BUILD/libirobot-create-0.1/tests/pwm-low-side-drivers-test.cc File Reference

#include "common.hh"

Include dependency graph for pwm-low-side-drivers-test.cc:


Functions

int run_test (iRobot::Create &robot, std::stringstream &)

Function Documentation

int run_test ( iRobot::Create robot,
std::stringstream &   
)

00022 {
00023   using namespace iRobot;
00024 
00025   // Test Mode.
00026   CHECK_FAILURE
00027     (CommandNotAvailable,
00028      robot.sendPwmLowSideDriversCommand (Create::LOW_SIDE_VELOCITY_MIN,
00029                                          Create::LOW_SIDE_VELOCITY_MIN,
00030                                          Create::LOW_SIDE_VELOCITY_MIN));
00031 
00032   // Switch to full mode and test a command.
00033   robot.sendFullCommand ();
00034   robot.sendPwmLowSideDriversCommand (Create::LOW_SIDE_VELOCITY_MIN,
00035                                       Create::LOW_SIDE_VELOCITY_MIN,
00036                                       Create::LOW_SIDE_VELOCITY_MIN);
00037 
00038   // Switch to safe mode for the rest of the test.
00039   robot.sendSafeCommand ();
00040 
00041   robot.sendPwmLowSideDriversCommand (Create::LOW_SIDE_VELOCITY_MIN,
00042                                       Create::LOW_SIDE_VELOCITY_MIN,
00043                                       Create::LOW_SIDE_VELOCITY_MIN);
00044 
00045   robot.sendPwmLowSideDriversCommand (Create::LOW_SIDE_VELOCITY_MAX,
00046                                       Create::LOW_SIDE_VELOCITY_MAX,
00047                                       Create::LOW_SIDE_VELOCITY_MAX);
00048   return TEST_SUCCEED;
00049 }


Generated on Thu Aug 28 14:38:09 2008 for iRobot Create library by  doxygen 1.5.4