Peekerpoke  0.1 beta
Motor Class Reference

#include <Motor.h>

Public Member Functions

 Motor ()
 Default constructor of class Motor. More...
 
 ~Motor ()
 
bool isWork ()
 Check if the motor can work. More...
 
void turn180 ()
 Control function for Motor. More...
 
void turnLeft ()
 Control function for Motor. More...
 
void turnRight ()
 Control function for Motor. More...
 
void goStraight ()
 Control function for Motor. More...
 
void stop ()
 Control function for Motor. More...
 

Private Member Functions

void initial ()
 call by constructor More...
 
bool callSystem (const string &s)
 Exec system command and return result. More...
 

Private Attributes

bool work
 

Constructor & Destructor Documentation

Motor::Motor ( )

Default constructor of class Motor.

Call function initial()

Motor::~Motor ( )

Member Function Documentation

bool Motor::callSystem ( const string &  s)
private

Exec system command and return result.

Returns
true - successfully
false - otherwise
void Motor::goStraight ( )

Control function for Motor.

void Motor::initial ( )
private

call by constructor

bool Motor::isWork ( )

Check if the motor can work.

Returns
true - can work
false - otherwise
void Motor::stop ( )

Control function for Motor.

void Motor::turn180 ( )

Control function for Motor.

void Motor::turnLeft ( )

Control function for Motor.

void Motor::turnRight ( )

Control function for Motor.

Member Data Documentation

bool Motor::work
private

The documentation for this class was generated from the following files: