Structs card
카드 코딩과 관련된 정의 및 구조체들을 소개합니다.
Definitions
Card::CardNameColor::Type
카드 분류(색상).
Card::CardNameCardCoding::Type
카드 코딩 모드.
Card::CardNamePiano::Type
피아노 모드.
Card::CardColor::Type
카드 색 분류.
Structs
Protocol::Card::Classify
카드 색상 분.
Protocol::Card::Classify 클래스를 배열로 사용(순서대로 front, rear)
변수 이름. | 형식. | 크기. | 범위. | 설명. |
cc[0][0][0] | s8 | 1 Byte | -60 ~ 60 | Red, Hue, Min |
cc[0][0][1] | s8 | 1 Byte | -60 ~ 60 | Red, Hue, Max |
cc[0][1][0] | s8 | 1 Byte | 0 ~ 100 | Red, Saturaton, Min |
cc[0][1][1] | s8 | 1 Byte | 0 ~ 100 | Red, Saturaton, Max |
cc[0][2][0] | s8 | 1 Byte | 0 ~ 100 | Red, Lightness, Min |
cc[0][2][1] | s8 | 1 Byte | 0 ~ 100 | Red, Lightness, Max |
cc[1][0][0] | s8 | 1 Byte | -60 ~ 60 | Yellow, Hue, Min |
cc[1][0][1] | s8 | 1 Byte | -60 ~ 60 | Yellow, Hue, Max |
cc[1][1][0] | s8 | 1 Byte | 0 ~ 100 | Yellow, Saturaton, Min |
cc[1][1][1] | s8 | 1 Byte | 0 ~ 100 | Yellow, Saturaton, Max |
cc[1][2][0] | s8 | 1 Byte | 0 ~ 100 | Yellow, Lightness, Min |
cc[1][2][1] | s8 | 1 Byte | 0 ~ 100 | Yellow, Lightness, Max |
cc[2][0][0] | s8 | 1 Byte | -60 ~ 60 | Green, Hue, Min |
cc[2][0][1] | s8 | 1 Byte | -60 ~ 60 | Green, Hue, Max |
cc[2][1][0] | s8 | 1 Byte | 0 ~ 100 | Green, Saturaton, Min |
cc[2][1][1] | s8 | 1 Byte | 0 ~ 100 | Green, Saturaton, Max |
cc[2][2][0] | s8 | 1 Byte | 0 ~ 100 | Green, Lightness, Min |
cc[2][2][1] | s8 | 1 Byte | 0 ~ 100 | Green, Lightness, Max |
cc[3][0][0] | s8 | 1 Byte | -60 ~ 60 | Cyan, Hue, Min |
cc[3][0][1] | s8 | 1 Byte | -60 ~ 60 | Cyan, Hue, Max |
cc[3][1][0] | s8 | 1 Byte | 0 ~ 100 | Cyan, Saturaton, Min |
cc[3][1][1] | s8 | 1 Byte | 0 ~ 100 | Cyan, Saturaton, Max |
cc[3][2][0] | s8 | 1 Byte | 0 ~ 100 | Cyan, Lightness, Min |
cc[3][2][1] | s8 | 1 Byte | 0 ~ 100 | Cyan, Lightness, Max |
cc[4][0][0] | s8 | 1 Byte | -60 ~ 60 | Blue, Hue, Min |
cc[4][0][1] | s8 | 1 Byte | -60 ~ 60 | Blue, Hue, Max |
cc[4][1][0] | s8 | 1 Byte | 0 ~ 100 | Blue, Saturaton, Min |
cc[4][1][1] | s8 | 1 Byte | 0 ~ 100 | Blue, Saturaton, Max |
cc[4][2][0] | s8 | 1 Byte | 0 ~ 100 | Blue, Lightness, Min |
cc[4][2][1] | s8 | 1 Byte | 0 ~ 100 | Blue, Lightness, Max |
cc[5][0][0] | s8 | 1 Byte | -60 ~ 60 | Magenta, Hue, Min |
cc[5][0][1] | s8 | 1 Byte | -60 ~ 60 | Magenta, Hue, Max |
cc[5][1][0] | s8 | 1 Byte | 0 ~ 100 | Magenta, Saturaton, Min |
cc[5][1][1] | s8 | 1 Byte | 0 ~ 100 | Magenta, Saturaton, Max |
cc[5][2][0] | s8 | 1 Byte | 0 ~ 100 | Magenta, Lightness, Min |
cc[5][2][1] | s8 | 1 Byte | 0 ~ 100 | Magenta, Lightness, Max |
l[0] | s8 | 1 Byte | 0 ~ 100 | Lightness Min(Black) |
l[1] | s8 | 1 Byte | 0 ~ 100 | Lightness Max(White) |
Protocol::Card::Range
RGB Raw 데이터의 출력 범위(캘리브레이션 시 검정색과 흰 색을 읽혔을 때의 출력값을 기준으로 사용)
변수 이름. | 형식. | 크기. | 범위. | 설명. |
range[0][0][1] | int16_t | 24 Byte | 0 ~ 4095 | Front, Red, Min |
range[0][0][2] | int16_t | 24 Byte | 0 ~ 4095 | Front, Red, Max |
range[0][1][1] | int16_t | 24 Byte | 0 ~ 4095 | Front, Green, Min |
range[0][1][2] | int16_t | 24 Byte | 0 ~ 4095 | Front, Green, Max |
range[0][2][1] | int16_t | 24 Byte | 0 ~ 4095 | Front, Blue, Min |
range[0][2][2] | int16_t | 24 Byte | 0 ~ 4095 | Front, Blue, Max |
range[1][0][1] | int16_t | 24 Byte | 0 ~ 4095 | Rear, Red, Min |
range[1][0][2] | int16_t | 24 Byte | 0 ~ 4095 | Rear, Red, Max |
range[1][1][1] | int16_t | 24 Byte | 0 ~ 4095 | Rear, Green, Min |
range[1][1][2] | int16_t | 24 Byte | 0 ~ 4095 | Rear, Green, Max |
range[1][2][1] | int16_t | 24 Byte | 0 ~ 4095 | Rear, Blue, Min |
range[1][2][2] | int16_t | 24 Byte | 0 ~ 4095 | Rear, Blue, Max |
Protocol::Card::Raw
카드 Raw 데이터.
rgbRaw : ADC에서 읽은 RGB의 RAW 데이터. rgb : rgbRaw를 range를 기준으로 0 ~ 255 사이의 값으로 변환한 값. hsvl : rgb를 hsv, hsl로 변환한 값. color : hsvl 값을 Color Classify에 설정된 기준으로 판별한 색. card : 카드(front 상위 4비트, rear 하위 4비트).
변수 이름. | 형식. | 크기. | 범위. | 설명. |
rgbRaw[0][0] | int16_t | 2 Byte | 0 ~ 4095 | Raw, Front, Red |
rgbRaw[0][1] | int16_t | 2 Byte | 0 ~ 4095 | Raw, Front, Green |
rgbRaw[0][2] | int16_t | 2 Byte | 0 ~ 4095 | Raw, Front, Blue |
rgbRaw[1][0] | int16_t | 2 Byte | 0 ~ 4095 | Raw, Rear, Red |
rgbRaw[1][1] | int16_t | 2 Byte | 0 ~ 4095 | Raw, Rear, Green |
rgbRaw[1][2] | int16_t | 2 Byte | 0 ~ 4095 | Raw, Rear, Blue |
rgb[0][0] | int16_t | 1 Byte | 0 ~ 255 | Front, Red |
rgb[0][1] | int16_t | 1 Byte | 0 ~ 255 | Front, Green |
rgb[0][2] | int16_t | 1 Byte | 0 ~ 255 | Front, Blue |
rgb[1][0] | int16_t | 1 Byte | 0 ~ 255 | Rear, Red |
rgb[1][1] | int16_t | 1 Byte | 0 ~ 255 | Rear, Green |
rgb[1][2] | int16_t | 1 Byte | 0 ~ 255 | Rear, Blue |
hsvl[0][0] | int16_t | 2 Byte | 0 ~ 360 | Front, Hue |
hsvl[0][1] | int16_t | 2 Byte | 0 ~ 100 | Front, Saturation |
hsvl[0][2] | int16_t | 2 Byte | 0 ~ 100 | Front, Value |
hsvl[0][3] | int16_t | 2 Byte | 0 ~ 100 | Front, Lightness |
hsvl[1][0] | int16_t | 2 Byte | 0 ~ 360 | Rear, Hue |
hsvl[1][1] | int16_t | 2 Byte | 0 ~ 100 | Rear, Saturation |
hsvl[1][2] | int16_t | 2 Byte | 0 ~ 100 | Rear, Value |
hsvl[1][3] | int16_t | 2 Byte | 0 ~ 100 | Rear, Lightness |
color[0] | Card::CardColor::Type | 1 Byte | - | Front Color |
color[1] | Card::CardColor::Type | 1 Byte | - | Rear Color |
card | Card::CardNameColor::Type, Card::CardNameCardCoding::Type, Card::CardNamePiano::Type | 1 Byte | - | 카드. |
Protocol::Card::Color
카드 데이터(무선 통신에 사용하려고 Raw에서 크기를 줄임).
hsvl : rgb를 hsv, hsl로 변환한 값. color : hsvl 값을 Color Classify에 설정된 기준으로 판별한 색. card : 카드(front 상위 4비트, rear 하위 4비트).
변수 이름. | 형식. | 크기. | 범위. | 설명. |
hsvl[0][0] | int16_t | 2 Byte | 0 ~ 360 | Front, Hue |
hsvl[0][1] | int16_t | 2 Byte | 0 ~ 100 | Front, Saturation |
hsvl[0][2] | int16_t | 2 Byte | 0 ~ 100 | Front, Value |
hsvl[0][3] | int16_t | 2 Byte | 0 ~ 100 | Front, Lightness |
hsvl[1][0] | int16_t | 2 Byte | 0 ~ 360 | Rear, Hue |
hsvl[1][1] | int16_t | 2 Byte | 0 ~ 100 | Rear, Saturation |
hsvl[1][2] | int16_t | 2 Byte | 0 ~ 100 | Rear, Value |
hsvl[1][3] | int16_t | 2 Byte | 0 ~ 100 | Rear, Lightness |
color[0] | Card::CardColor::Type | 1 Byte | - | Front Color |
color[1] | Card::CardColor::Type | 1 Byte | - | Rear Color |
card | Card::CardNameColor::Type, Card::CardNameCardCoding::Type, Card::CardNamePiano::Type | 1 Byte | - | 카드. |
Protocol::Card::Raw
카드 목록.
변수 이름. | 형식. | 크기. | 범위. | 설명. |
index | uint8_t | 1 Byte | 0 ~ 100 | 현재 실행중인 카드의 인덱스. |
size | uint8_t | 1 Byte | 0 ~ 100 | 입력된 카드의 총 갯수. |
cardIndex | uint8_t | 1 Byte | 0 ~ 100 | 현재 전송하는 카드 배열의 시작 번호. |
card[12] | Card::CardNameColor::Type, Card::CardNameFunction::Type | 12 Byte | - | 카드 목록. |
Last updated