|
MRMS
|
Public Member Functions | |
| MotorBoard (Robot *robot, uint8_t devicesOnABoard, const char *boardName, uint8_t maxNumberOfBoards, BoardId id) | |
| void | directionChange (uint8_t deviceNumber) |
| bool | messageDecode (uint32_t canId, uint8_t data[8]) |
| uint16_t | reading (uint8_t deviceNumber) |
| void | readingsPrint () |
| void | speedSet (uint8_t motorNumber, int8_t speed) |
| void | stop () |
| void | test (uint8_t deviceNumber=0xFF, uint16_t betweenTestsMs=0) |
Public Member Functions inherited from Board | |
| Board (Robot *robot, uint8_t maxNumberOfBoards, uint8_t devicesOnABoard, const char *boardName, BoardType boardType, BoardId id) | |
| void | add (char *deviceName, uint16_t canIn, uint16_t canOut) |
| bool | alive (uint8_t deviceNumber=0, bool checkAgainIfDead=false, bool errorIfNotAfterCheckingAgain=false) |
| uint8_t | count () |
| void | aliveSet (bool yesOrNo, uint8_t deviceNumber=0) |
| BoardType | boardType () |
| uint8_t | deadOrAliveCount () |
| uint8_t | devicesOnASingleBoard () |
| uint8_t | devicesMaximumNumberInAllBoards () |
| uint8_t | devicesScan (bool verbose=true, uint16_t mask=0xFFFF) |
| uint8_t | errorCodeLast () |
| uint8_t | errorWasInDeviceNumber () |
| void | firmwareRequest (uint8_t deviceNumber=0xFF) |
| uint16_t | fps (uint8_t deviceNumber=0) |
| void | fpsDisplay () |
| void | fpsRequest (uint8_t deviceNumber=0xFF) |
| BoardId | id () |
| void | idChange (uint16_t newDeviceNumber, uint8_t deviceNumber=0) |
| void | info (uint8_t deviceNumber=0xFF) |
| bool | isForMe (uint32_t canIdOut, uint8_t deviceNumber) |
| bool | isFromMe (uint32_t canIdOut, uint8_t deviceNumber) |
| uint32_t | lastMessageMs (uint8_t deviceNumber=0) |
| bool | messagePrint (uint32_t msgId, uint8_t dlc, uint8_t *data, bool outbound) |
| ** Prints a frame More... | |
| void | messageSend (uint8_t *data, uint8_t dlc, uint8_t deviceNumber=0) |
| char * | name (uint8_t deviceNumber) |
| char * | name () |
| void | notificationRequest (uint8_t commandRequestingNotification, uint8_t deviceNumber) |
| void | oscillatorTest (uint8_t deviceNumber=0xFF) |
| void | reset (uint8_t deviceNumber=0xFF) |
| void | start (uint8_t deviceNumber=0xFF, uint8_t measuringModeNow=0, uint16_t refreshMs=0) |
| void | swap (uint8_t deviceNumber1, uint8_t deviceNumber2) |
| void | stop (uint8_t deviceNumber=0xFF) |
Protected Attributes | |
| std::vector< uint32_t > * | encoderCount |
| std::vector< bool > * | reversed |
| std::vector< int8_t > * | lastSpeed |
Protected Attributes inherited from Board | |
| uint32_t | _alive |
| bool | _aliveReport = false |
| char | _boardsName [12] |
| BoardType | _boardType |
| uint8_t | canData [8] |
| uint8_t | devicesOnABoard |
| uint8_t | errorCode = 0 |
| uint8_t | errorInDeviceNumber = 0 |
| std::vector< uint16_t > * | fpsLast |
| BoardId | _id |
| std::vector< uint32_t > * | idIn |
| std::vector< uint32_t > * | idOut |
| std::vector< uint32_t > * | lastMessageReceivedMs |
| std::vector< uint32_t > * | _lastReadingMs |
| uint8_t | maximumNumberOfBoards |
| uint8_t | measuringMode = 0 |
| uint8_t | measuringModeLimit = 0 |
| uint8_t | _message [29] |
| std::vector< char[10]> * | _name |
| int | nextFree |
| Robot * | robotContainer |
Additional Inherited Members | |
Protected Member Functions inherited from Board | |
| bool | messageDecodeCommon (uint32_t canId, uint8_t data[8], uint8_t deviceNumber=0) |
| MotorBoard::MotorBoard | ( | Robot * | robot, |
| uint8_t | devicesOnABoard, | ||
| const char * | boardName, | ||
| uint8_t | maxNumberOfBoards, | ||
| BoardId | id | ||
| ) |
| robot | - robot containing this board |
| esp32CANBusSingleton | - a single instance of CAN Bus common library for all CAN Bus peripherals. |
| devicesOnABoard | - number of devices on each board |
| boardName | - board's name |
| maxNumberOfBoards | - maximum number of boards |
| id | - unique id |
| robot | - robot containing this board |
| devicesOnABoard | - number of devices on each board |
| boardName | - board's name |
| maxNumberOfBoards | - maximum number of boards |
| id | - unique id |
| void MotorBoard::directionChange | ( | uint8_t | deviceNumber | ) |
Changes rotation's direction
| deviceNumber | - Devices's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
Read CAN Bus message into local variables
| canId | - CAN Bus id |
| data | - 8 bytes from CAN Bus message. |
Implements Board.
Encoder readings
| deviceNumber | - Devices's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
| void MotorBoard::readingsPrint | ( | ) |
Print all readings in a line
Motor speed
| motorNumber | - motor's number |
| speed | - in range -127 to 127 |
| void MotorBoard::stop | ( | ) |
Stop all motors