Joint Level Control
Public Member Functions | List of all members
CurrentControl Class Reference

This subclass generates Current-Control Messages which allow to control the motor via a current limit. More...

#include <message_builder.h>

Inheritance diagram for CurrentControl:
Inheritance graph
[legend]
Collaboration diagram for CurrentControl:
Collaboration graph
[legend]

Public Member Functions

 CurrentControl (uint8_t address)
 
void setCurrent (int32_t current)
 
- Public Member Functions inherited from MessageBuilder
 MessageBuilder (uint8_t address)
 Constructor of the MessageBuilder Class. More...
 
can_frame * getMessage ()
 gets the generated SocketCAN-Frame for utilisation by the callee. More...
 

Additional Inherited Members

- Protected Attributes inherited from MessageBuilder
uint8_t data [8]
 
uint8_t can_address
 

Detailed Description

This subclass generates Current-Control Messages which allow to control the motor via a current limit.

Constructor & Destructor Documentation

◆ CurrentControl()

CurrentControl::CurrentControl ( uint8_t  address)

Constructor of the CurrentControl Class

Parameters
addressCAN-ID of the BLDC which is controlled by this class instance.

Member Function Documentation

◆ setCurrent()

void CurrentControl::setCurrent ( int32_t  current)

Sets the current of this class instance.

Parameters
currentThe current which should be set. NOTE: Current is set in 0.1A increments. setCurrent(1) will set the BLDC to 0.1 A

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