Skip to content

Commit e902763

Browse files
JakubVanekdlech
authored andcommitted
sensors: document the EV3 color's RGB-RAW mode
More info: simonedegiacomi/EV3-API@8562bd2#r37442413 Signed-off-by: Jakub Vanek <linuxtardis@gmail.com>
1 parent 1e57175 commit e902763

1 file changed

Lines changed: 26 additions & 4 deletions

File tree

sensors/ev3_uart_sensor_defs.c

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,33 @@ const struct ev3_uart_sensor_info ev3_uart_sensor_defs[] = {
122122
},
123123
[4] = {
124124
/**
125+
* .. [#lego-ev3-color-mode4-value012] These
126+
* values represent the difference between
127+
* the raw sensor ADC measurements when the
128+
* LEDs are off and when they are on. They
129+
* work similar to the ``COL-REFLECT`` values
130+
* but they are not precalibrated.
131+
*
132+
* .. [#lego-ev3-color-mode4-value3] This value
133+
* is similar to the ``REF-RAW`` ambient
134+
* ``value1``. It is the value measured by
135+
* the ADC inside the sensor when all LEDs
136+
* are off, so it works as a reference point
137+
* for the first three values. However here
138+
* the ``value0``, ``value1`` and ``value2``
139+
* are sent as relative to this value by the
140+
* sensor automatically, so it is not
141+
* necessary to use this value at all.
142+
*
125143
* @description: Raw Color Components - sets LED color to white (all LEDs rapidly cycling)
126-
* @value0: Red (0 to 1020???)
127-
* @value1: Green (0 to 1020???)
128-
* @value2: Blue (0 to 1020???)
129-
* @value3: Ambient? (0 to 1020???)
144+
* @value0: Reflected red light intensity (0 to 1023)
145+
* @value0_footnote: [#lego-ev3-color-mode4-value012]_
146+
* @value1: Reflected green light intensity (0 to 1023)
147+
* @value1_footnote: [#lego-ev3-color-mode4-value012]_
148+
* @value2: Reflected blue light intensity (0 to 1023)
149+
* @value2_footnote: [#lego-ev3-color-mode4-value012]_
150+
* @value3: ADC reading for LEDs off (reference) (0 to 1023)
151+
* @value3_footnote: [#lego-ev3-color-mode4-value3]_
130152
*/
131153
.name = "RGB-RAW",
132154
.data_sets = 4,

0 commit comments

Comments
 (0)