MRMS
|
Public Member Functions | |
Mrm_col_b (Robot *robot=NULL, uint8_t maxNumberOfBoards=4) | |
void | add (char *deviceName=(char *)"") |
uint16_t | colorBlue (uint8_t deviceNumber) |
uint16_t | colorBlueGeenish (uint8_t deviceNumber) |
uint16_t | colorBlueVioletish (uint8_t deviceNumber) |
uint16_t | colorGreen (uint8_t deviceNumber) |
uint16_t | colorNearIR (uint8_t deviceNumber) |
uint16_t | colorOrange (uint8_t deviceNumber) |
uint16_t | colorRed (uint8_t deviceNumber) |
uint16_t | colorViolet (uint8_t deviceNumber) |
uint16_t | colorWhite (uint8_t deviceNumber) |
uint16_t | colorYellow (uint8_t deviceNumber) |
void | gain (uint8_t deviceNumber=0, uint8_t gainValue=0) |
uint8_t | hue (uint8_t deviceNumber) |
void | illumination (uint8_t deviceNumber=0, uint8_t current=0) |
void | integrationTime (uint8_t deviceNumber, uint8_t time, uint16_t step) |
bool | messageDecode (uint32_t canId, uint8_t data[8]) |
void | patternErase (uint8_t deviceNumber=0xFF) |
void | patternPrint () |
uint8_t | patternRecognizedBy8Colors (uint8_t deviceNumber) |
uint8_t | patternRecognizedByHSV (uint8_t deviceNumber) |
void | patternRecord (uint8_t patternNumber=0, uint8_t deviceNumber=0) |
void | patternsRecord () |
uint16_t | reading (uint8_t color=0, uint8_t sensorNumber=0) |
uint8_t | saturation (uint8_t deviceNumber) |
void | readingsPrint () |
void | switchToHSV (uint8_t deviceNumber=0xFF) |
void | switchTo8Colors (uint8_t deviceNumber=0xFF) |
void | test (bool hsvSelect) |
uint8_t | value (uint8_t deviceNumber) |
Public Member Functions inherited from SensorBoard | |
SensorBoard (Robot *robot, uint8_t devicesOnABoard, const char *boardName, uint8_t maxNumberOfBoards, BoardId id) | |
void | continuousReadingCalculatedDataStart (uint8_t deviceNumber=0xFF) |
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) |
virtual void | test (uint8_t deviceNumber=0xFF, uint16_t betweenTestsMs=0) |
Additional Inherited Members | |
Protected Member Functions inherited from Board | |
bool | messageDecodeCommon (uint32_t canId, uint8_t data[8], uint8_t deviceNumber=0) |
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 |
Constructor
robot | - robot containing this board |
maxNumberOfBoards | - maximum number of boards |
void Mrm_col_b::add | ( | char * | deviceName = (char*)"" | ) |
Add a mrm-col-b board
deviceName | - device's name |
Add a mrm-col-b sensor
deviceName | - device's name |
Blue
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
Blue greenish
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
Blue violetish
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
Green
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
Near IR
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
Orange
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
Red
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
Violet
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
White
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
Yellow
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
Set gain
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. 0xFF - all sensors. |
gainValue | 0 0.5x 1 1x 2 2x 3 4x 4 8x 5 16x 6 32x 7 64x 8 128x 9 256x (default) 10 512x |
Hue
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
Set illumination intensity
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. 0xFF - all sensors. |
current | - 0 - 3 |
Set integration time
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. 0xFF - all sensors. |
time | - sets the ATIME parameter for integration time from 0 to 255, integration time = (ATIME + 1) * (ASTEP + 1) * 2.78µS. |
step | - sets STEP. |
Read CAN Bus message into local variables
canId | - CAN Bus id |
data | - 8 bytes from CAN Bus message. |
Read CAN Bus message into local variables
data | - 8 bytes from CAN Bus message. |
Reimplemented from SensorBoard.
void Mrm_col_b::patternErase | ( | uint8_t | deviceNumber = 0xFF | ) |
Erase all patterns
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. 0xFF - in all sensors |
Erase all patterns
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. 0xFF - in all sensors. |
void Mrm_col_b::patternPrint | ( | ) |
Print HSV patterns
Choose a pattern closest to the current 8 colors
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. @raturn - patternNumber |
Choose a pattern closest to the current HSV values
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
includeValue | - if true, HSV compared. If not, HS. @raturn - patternNumber |
Record a HSV pattern
patternNumber | - 0 - PATTERN_COUNT-1 |
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
Record a HSV pattern
patternNumber | - 0 - MRM_COL_B_PATTERN_COUNT-1 |
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
void Mrm_col_b::patternsRecord | ( | ) |
Record patterns manually
Analog readings
color | - one of 10 colors |
sensorNumber | - Sensor's ordinal number. Each call of function add() assigns a increasing number to the sensor, starting with 0. |
Analog readings
colorId | - one of 10 colors |
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
void Mrm_col_b::readingsPrint | ( | ) |
Print all readings in a line
Saturation
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
void Mrm_col_b::switchTo8Colors | ( | uint8_t | deviceNumber = 0xFF | ) |
Instruction to sensor to start returning 10 raw colors
sensorNumber | - Sensor's ordinal number. Each call of function add() assigns a increasing number to the sensor, starting with 0. 0xFF - all sensors. |
Instruction to sensor to start returning 8 raw colors
sensorNumber | - Sensor's ordinal number. Each call of function add() assigns a increasing number to the sensor, starting with 0. 0xFF - all sensors. |
void Mrm_col_b::switchToHSV | ( | uint8_t | deviceNumber = 0xFF | ) |
Instruction to sensor to switch to converting R, G, and B on board and return hue, saturation and value
sensorNumber | - Sensor's ordinal number. Each call of function add() assigns a increasing number to the sensor, starting with 0. 0xFF - all sensors. |
void Mrm_col_b::test | ( | bool | hsvSelect | ) |
Test
hsv | - if not, then 10 colors |
Value
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |