Skip to content

Commit a722a27

Browse files
JakubVanekdlech
authored andcommitted
sensors: document the EV3 color's COL-CAL mode
More info: ev3dev/ev3dev#1386 Signed-off-by: Jakub Vanek <linuxtardis@gmail.com>
1 parent e902763 commit a722a27

1 file changed

Lines changed: 28 additions & 9 deletions

File tree

sensors/ev3_uart_sensor_defs.c

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,18 +156,37 @@ const struct ev3_uart_sensor_info ev3_uart_sensor_defs[] = {
156156
},
157157
[5] = {
158158
/**
159-
* .. [#lego-ev3-color-mode5] This mode is not
160-
* usable. When in ``COL-CAL`` mode, the color
159+
* .. [#lego-ev3-color-mode5] This is a factory
160+
* calibration mode. Writing
161+
* ``LEGO-FAC-CAL-1`` directly to the sensor
162+
* shortly after switching to this mode will
163+
* trigger hardware recalibration. Then,
164+
* after circa 500 ms, the new calibration
165+
* parameters can be read from the sensor.
166+
* Proceed only at your own risk, this will
167+
* permanently overwrite the accurate
168+
* factory-provided calibration data!
169+
* If you do not write the unlock string
170+
* quickly enough, the sensor will time out
171+
* and reset. This happens because the
161172
* sensor does not respond to the keep-alive
162-
* sent from the EV3 brick. As a result, the
163-
* sensor will time out and reset.
173+
* packets sent from the EV3 brick while
174+
* in this mode.
175+
*
176+
* .. [#lego-ev3-color-mode5-values] The
177+
* physical meaning of these values is not
178+
* known. They are most probably used
179+
* internally by the sensor firmware to
180+
* correctly scale its measurements.
164181
*
165182
* @name_footnote: [#lego-ev3-color-mode5]_
166-
* @description: Calibration ??? - sets LED color to red, flashing every 4 seconds, then goes continuous
167-
* @value0: ???
168-
* @value1: ???
169-
* @value2: ???
170-
* @value3: ???
183+
* @description: Factory Calibration - turns off all LEDs, then flashes all LEDs briefly when recalibrating
184+
* @value0: Red color calibration multiplier??? (0 to 65535)
185+
* @value0_footnote: [#lego-ev3-color-mode5-values]_
186+
* @value1: Green color calibration multiplier??? (0 to 65535)
187+
* @value1_footnote: [#lego-ev3-color-mode5-values]_
188+
* @value2: Blue color calibration multiplier??? (0 to 65535)
189+
* @value2_footnote: [#lego-ev3-color-mode5-values]_
171190
*/
172191
.name = "COL-CAL",
173192
.data_sets = 4,

0 commit comments

Comments
 (0)