Laelaps  2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
motor::roboclaw::RoboClawChipSelect Class Reference

RoboClaw motor controller chip select class. More...

#include <RoboClaw.h>

Inheritance diagram for motor::roboclaw::RoboClawChipSelect:
laelaps::LaeMotorCtlrChipSelect

Public Member Functions

 RoboClawChipSelect ()
 Default constructor.
 
virtual ~RoboClawChipSelect ()
 Destructor.
 
virtual void select (int fd, byte_t addrSel)
 Motor controller select function. More...
 

Protected Attributes

byte_t m_addrLast
 last selected motor controller, id'd by address
 

Detailed Description

RoboClaw motor controller chip select class.

The RoboClawChipSelect class instance is used to select the motor controller, given its address.

Definition at line 444 of file RoboClaw.h.

Member Function Documentation

void RoboClawChipSelect::select ( int  fd,
byte_t  addrSel 
)
virtual

Motor controller select function.

The motor controllers are on a multi-drop serial bus. Serial does not support multiple tx drivers on the same bus. Since there are two motor controllers, each with a transmit line (odroid receive), the select function disconnects one tx while connects the target tx.

Parameters
fdOpen serial file descriptor.
addrSelTarget motor controller to be selected. Controllers are identified by their address.

Reimplemented in laelaps::LaeMotorCtlrChipSelect.

Definition at line 196 of file RoboClaw.cxx.

199 {

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