tinkerforge 2.1.23 → 2.1.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tinkerforge/brick_dc.rb +2 -2
  3. data/lib/tinkerforge/brick_hat.rb +45 -4
  4. data/lib/tinkerforge/brick_hat_zero.rb +69 -3
  5. data/lib/tinkerforge/brick_imu.rb +8 -10
  6. data/lib/tinkerforge/brick_imu_v2.rb +12 -14
  7. data/lib/tinkerforge/brick_master.rb +6 -14
  8. data/lib/tinkerforge/brick_red.rb +2 -2
  9. data/lib/tinkerforge/brick_servo.rb +2 -2
  10. data/lib/tinkerforge/brick_silent_stepper.rb +3 -3
  11. data/lib/tinkerforge/brick_stepper.rb +3 -3
  12. data/lib/tinkerforge/bricklet_accelerometer.rb +7 -16
  13. data/lib/tinkerforge/bricklet_accelerometer_v2.rb +18 -24
  14. data/lib/tinkerforge/bricklet_air_quality.rb +13 -23
  15. data/lib/tinkerforge/bricklet_ambient_light.rb +14 -27
  16. data/lib/tinkerforge/bricklet_ambient_light_v2.rb +4 -8
  17. data/lib/tinkerforge/bricklet_ambient_light_v3.rb +3 -5
  18. data/lib/tinkerforge/bricklet_analog_in.rb +6 -22
  19. data/lib/tinkerforge/bricklet_analog_in_v2.rb +6 -22
  20. data/lib/tinkerforge/bricklet_analog_in_v3.rb +4 -9
  21. data/lib/tinkerforge/bricklet_analog_out.rb +5 -9
  22. data/lib/tinkerforge/bricklet_analog_out_v2.rb +4 -4
  23. data/lib/tinkerforge/bricklet_analog_out_v3.rb +4 -4
  24. data/lib/tinkerforge/bricklet_barometer.rb +10 -33
  25. data/lib/tinkerforge/bricklet_barometer_v2.rb +13 -32
  26. data/lib/tinkerforge/bricklet_can.rb +3 -7
  27. data/lib/tinkerforge/bricklet_can_v2.rb +8 -40
  28. data/lib/tinkerforge/bricklet_co2.rb +5 -13
  29. data/lib/tinkerforge/bricklet_co2_v2.rb +24 -24
  30. data/lib/tinkerforge/bricklet_color.rb +9 -22
  31. data/lib/tinkerforge/bricklet_color_v2.rb +7 -16
  32. data/lib/tinkerforge/bricklet_compass.rb +6 -12
  33. data/lib/tinkerforge/bricklet_current12.rb +6 -18
  34. data/lib/tinkerforge/bricklet_current25.rb +6 -18
  35. data/lib/tinkerforge/bricklet_distance_ir.rb +6 -17
  36. data/lib/tinkerforge/bricklet_distance_ir_v2.rb +5 -16
  37. data/lib/tinkerforge/bricklet_distance_us.rb +6 -16
  38. data/lib/tinkerforge/bricklet_distance_us_v2.rb +4 -10
  39. data/lib/tinkerforge/bricklet_dmx.rb +7 -16
  40. data/lib/tinkerforge/bricklet_dual_button.rb +2 -4
  41. data/lib/tinkerforge/bricklet_dual_button_v2.rb +3 -7
  42. data/lib/tinkerforge/bricklet_dual_relay.rb +3 -5
  43. data/lib/tinkerforge/bricklet_dust_detector.rb +6 -16
  44. data/lib/tinkerforge/bricklet_e_paper_296x128.rb +30 -33
  45. data/lib/tinkerforge/bricklet_energy_monitor.rb +11 -15
  46. data/lib/tinkerforge/bricklet_gps.rb +11 -24
  47. data/lib/tinkerforge/bricklet_gps_v2.rb +10 -28
  48. data/lib/tinkerforge/bricklet_hall_effect.rb +3 -7
  49. data/lib/tinkerforge/bricklet_hall_effect_v2.rb +8 -19
  50. data/lib/tinkerforge/bricklet_humidity.rb +6 -19
  51. data/lib/tinkerforge/bricklet_humidity_v2.rb +6 -20
  52. data/lib/tinkerforge/bricklet_industrial_analog_out.rb +6 -6
  53. data/lib/tinkerforge/bricklet_industrial_analog_out_v2.rb +6 -13
  54. data/lib/tinkerforge/bricklet_industrial_counter.rb +4 -22
  55. data/lib/tinkerforge/bricklet_industrial_digital_in_4.rb +9 -9
  56. data/lib/tinkerforge/bricklet_industrial_digital_in_4_v2.rb +5 -13
  57. data/lib/tinkerforge/bricklet_industrial_digital_out_4.rb +3 -3
  58. data/lib/tinkerforge/bricklet_industrial_digital_out_4_v2.rb +5 -8
  59. data/lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb +6 -15
  60. data/lib/tinkerforge/bricklet_industrial_dual_0_20ma_v2.rb +4 -16
  61. data/lib/tinkerforge/bricklet_industrial_dual_analog_in.rb +5 -13
  62. data/lib/tinkerforge/bricklet_industrial_dual_analog_in_v2.rb +4 -11
  63. data/lib/tinkerforge/bricklet_industrial_dual_relay.rb +5 -7
  64. data/lib/tinkerforge/bricklet_industrial_quad_relay.rb +3 -3
  65. data/lib/tinkerforge/bricklet_industrial_quad_relay_v2.rb +3 -5
  66. data/lib/tinkerforge/bricklet_io16.rb +5 -13
  67. data/lib/tinkerforge/bricklet_io16_v2.rb +6 -16
  68. data/lib/tinkerforge/bricklet_io4.rb +4 -10
  69. data/lib/tinkerforge/bricklet_io4_v2.rb +16 -23
  70. data/lib/tinkerforge/bricklet_isolator.rb +44 -11
  71. data/lib/tinkerforge/bricklet_joystick.rb +7 -19
  72. data/lib/tinkerforge/bricklet_joystick_v2.rb +6 -11
  73. data/lib/tinkerforge/bricklet_laser_range_finder.rb +8 -29
  74. data/lib/tinkerforge/bricklet_laser_range_finder_v2.rb +6 -17
  75. data/lib/tinkerforge/bricklet_lcd_128x64.rb +30 -63
  76. data/lib/tinkerforge/bricklet_lcd_16x2.rb +7 -9
  77. data/lib/tinkerforge/bricklet_lcd_20x4.rb +4 -8
  78. data/lib/tinkerforge/bricklet_led_strip.rb +12 -27
  79. data/lib/tinkerforge/bricklet_led_strip_v2.rb +17 -4
  80. data/lib/tinkerforge/bricklet_line.rb +4 -10
  81. data/lib/tinkerforge/bricklet_linear_poti.rb +5 -16
  82. data/lib/tinkerforge/bricklet_linear_poti_v2.rb +3 -5
  83. data/lib/tinkerforge/bricklet_load_cell.rb +6 -19
  84. data/lib/tinkerforge/bricklet_load_cell_v2.rb +4 -13
  85. data/lib/tinkerforge/bricklet_moisture.rb +6 -16
  86. data/lib/tinkerforge/bricklet_motion_detector.rb +2 -2
  87. data/lib/tinkerforge/bricklet_motion_detector_v2.rb +3 -7
  88. data/lib/tinkerforge/bricklet_motorized_linear_poti.rb +3 -7
  89. data/lib/tinkerforge/bricklet_multi_touch.rb +2 -6
  90. data/lib/tinkerforge/bricklet_multi_touch_v2.rb +3 -13
  91. data/lib/tinkerforge/bricklet_nfc.rb +6 -20
  92. data/lib/tinkerforge/bricklet_nfc_rfid.rb +2 -2
  93. data/lib/tinkerforge/bricklet_oled_128x64.rb +4 -8
  94. data/lib/tinkerforge/bricklet_oled_128x64_v2.rb +12 -18
  95. data/lib/tinkerforge/bricklet_oled_64x48.rb +4 -8
  96. data/lib/tinkerforge/bricklet_one_wire.rb +2 -2
  97. data/lib/tinkerforge/bricklet_outdoor_weather.rb +16 -16
  98. data/lib/tinkerforge/bricklet_particulate_matter.rb +13 -9
  99. data/lib/tinkerforge/bricklet_piezo_buzzer.rb +3 -6
  100. data/lib/tinkerforge/bricklet_piezo_speaker.rb +3 -11
  101. data/lib/tinkerforge/bricklet_piezo_speaker_v2.rb +8 -18
  102. data/lib/tinkerforge/bricklet_ptc.rb +5 -11
  103. data/lib/tinkerforge/bricklet_ptc_v2.rb +4 -8
  104. data/lib/tinkerforge/bricklet_real_time_clock.rb +3 -5
  105. data/lib/tinkerforge/bricklet_real_time_clock_v2.rb +3 -5
  106. data/lib/tinkerforge/bricklet_remote_switch.rb +2 -2
  107. data/lib/tinkerforge/bricklet_remote_switch_v2.rb +2 -2
  108. data/lib/tinkerforge/bricklet_rgb_led.rb +2 -2
  109. data/lib/tinkerforge/bricklet_rgb_led_button.rb +2 -2
  110. data/lib/tinkerforge/bricklet_rgb_led_matrix.rb +2 -2
  111. data/lib/tinkerforge/bricklet_rgb_led_v2.rb +2 -2
  112. data/lib/tinkerforge/bricklet_rotary_encoder.rb +4 -8
  113. data/lib/tinkerforge/bricklet_rotary_encoder_v2.rb +3 -5
  114. data/lib/tinkerforge/bricklet_rotary_poti.rb +5 -11
  115. data/lib/tinkerforge/bricklet_rotary_poti_v2.rb +3 -5
  116. data/lib/tinkerforge/bricklet_rs232.rb +2 -2
  117. data/lib/tinkerforge/bricklet_rs232_v2.rb +6 -5
  118. data/lib/tinkerforge/bricklet_rs485.rb +30 -71
  119. data/lib/tinkerforge/bricklet_segment_display_4x7.rb +2 -2
  120. data/lib/tinkerforge/bricklet_segment_display_4x7_v2.rb +3 -3
  121. data/lib/tinkerforge/bricklet_solid_state_relay.rb +2 -2
  122. data/lib/tinkerforge/bricklet_solid_state_relay_v2.rb +2 -2
  123. data/lib/tinkerforge/bricklet_sound_intensity.rb +4 -8
  124. data/lib/tinkerforge/bricklet_sound_pressure_level.rb +8 -12
  125. data/lib/tinkerforge/bricklet_temperature.rb +6 -14
  126. data/lib/tinkerforge/bricklet_temperature_ir.rb +7 -26
  127. data/lib/tinkerforge/bricklet_temperature_ir_v2.rb +6 -19
  128. data/lib/tinkerforge/bricklet_temperature_v2.rb +4 -8
  129. data/lib/tinkerforge/bricklet_thermal_imaging.rb +16 -26
  130. data/lib/tinkerforge/bricklet_thermocouple.rb +4 -8
  131. data/lib/tinkerforge/bricklet_thermocouple_v2.rb +3 -5
  132. data/lib/tinkerforge/bricklet_tilt.rb +2 -2
  133. data/lib/tinkerforge/bricklet_uv_light.rb +4 -8
  134. data/lib/tinkerforge/bricklet_uv_light_v2.rb +5 -11
  135. data/lib/tinkerforge/bricklet_voltage.rb +5 -11
  136. data/lib/tinkerforge/bricklet_voltage_current.rb +6 -14
  137. data/lib/tinkerforge/bricklet_voltage_current_v2.rb +5 -11
  138. data/lib/tinkerforge/bricklet_xmc1400_breakout.rb +4 -8
  139. data/lib/tinkerforge/ip_connection.rb +3 -0
  140. data/lib/tinkerforge/version.rb +1 -1
  141. metadata +2 -2
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-08-23. #
3
+ # This file was automatically generated on 2019-11-25. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.23 #
5
+ # Ruby Bindings Version 2.1.24 #
6
6
  # #
7
7
  # If you have a bugfix for this file and want to commit it, #
8
8
  # please fix the bug in the generator. You can find a link #
@@ -16,11 +16,11 @@ module Tinkerforge
16
16
  DEVICE_DISPLAY_NAME = 'LCD 16x2 Bricklet' # :nodoc:
17
17
 
18
18
  # This callback is triggered when a button is pressed. The parameter is
19
- # the number of the button (0 to 2).
19
+ # the number of the button.
20
20
  CALLBACK_BUTTON_PRESSED = 9
21
21
 
22
22
  # This callback is triggered when a button is released. The parameter is
23
- # the number of the button (0 to 2).
23
+ # the number of the button.
24
24
  CALLBACK_BUTTON_RELEASED = 10
25
25
 
26
26
  FUNCTION_WRITE_LINE = 1 # :nodoc:
@@ -60,8 +60,8 @@ module Tinkerforge
60
60
 
61
61
  end
62
62
 
63
- # Writes text to a specific line (0 to 1) with a specific position
64
- # (0 to 15). The text can have a maximum of 16 characters.
63
+ # Writes text to a specific line with a specific position.
64
+ # The text can have a maximum of 16 characters.
65
65
  #
66
66
  # For example: (0, 5, "Hello") will write *Hello* in the middle of the
67
67
  # first line of the display.
@@ -99,8 +99,6 @@ module Tinkerforge
99
99
  # should be blinking (shown as a blinking block). The cursor position
100
100
  # is one character behind the the last text written with
101
101
  # BrickletLCD16x2#write_line.
102
- #
103
- # The default is (false, false).
104
102
  def set_config(cursor, blinking)
105
103
  send_request FUNCTION_SET_CONFIG, [cursor, blinking], '? ?', 0, ''
106
104
  end
@@ -110,7 +108,7 @@ module Tinkerforge
110
108
  send_request FUNCTION_GET_CONFIG, [], '', 2, '? ?'
111
109
  end
112
110
 
113
- # Returns *true* if the button (0 to 2) is pressed.
111
+ # Returns *true* if the button is pressed.
114
112
  #
115
113
  # If you want to react on button presses and releases it is recommended to use the
116
114
  # CALLBACK_BUTTON_PRESSED and CALLBACK_BUTTON_RELEASED callbacks.
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-08-23. #
3
+ # This file was automatically generated on 2019-11-25. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.23 #
5
+ # Ruby Bindings Version 2.1.24 #
6
6
  # #
7
7
  # If you have a bugfix for this file and want to commit it, #
8
8
  # please fix the bug in the generator. You can find a link #
@@ -68,8 +68,8 @@ module Tinkerforge
68
68
 
69
69
  end
70
70
 
71
- # Writes text to a specific line (0 to 3) with a specific position
72
- # (0 to 19). The text can have a maximum of 20 characters.
71
+ # Writes text to a specific line with a specific position.
72
+ # The text can have a maximum of 20 characters.
73
73
  #
74
74
  # For example: (0, 7, "Hello") will write *Hello* in the middle of the
75
75
  # first line of the display.
@@ -107,8 +107,6 @@ module Tinkerforge
107
107
  # should be blinking (shown as a blinking block). The cursor position
108
108
  # is one character behind the the last text written with
109
109
  # BrickletLCD20x4#write_line.
110
- #
111
- # The default is (*false*, *false*).
112
110
  def set_config(cursor, blinking)
113
111
  send_request FUNCTION_SET_CONFIG, [cursor, blinking], '? ?', 0, ''
114
112
  end
@@ -196,8 +194,6 @@ module Tinkerforge
196
194
  #
197
195
  # A negative counter turns the default text functionality off.
198
196
  #
199
- # The default is -1.
200
- #
201
197
  # .. versionadded:: 2.0.2$nbsp;(Plugin)
202
198
  def set_default_text_counter(counter)
203
199
  send_request FUNCTION_SET_DEFAULT_TEXT_COUNTER, [counter], 'l', 0, ''
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-08-23. #
3
+ # This file was automatically generated on 2019-11-25. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.23 #
5
+ # Ruby Bindings Version 2.1.24 #
6
6
  # #
7
7
  # If you have a bugfix for this file and want to commit it, #
8
8
  # please fix the bug in the generator. You can find a link #
@@ -16,7 +16,7 @@ module Tinkerforge
16
16
  DEVICE_DISPLAY_NAME = 'LED Strip Bricklet' # :nodoc:
17
17
 
18
18
  # This callback is triggered directly after a new frame is rendered. The
19
- # parameter is the number of LEDs in that frame.
19
+ # parameter is the number of RGB or RGBW LEDs in that frame.
20
20
  #
21
21
  # You should send the data for the next frame directly after this callback
22
22
  # was triggered.
@@ -107,16 +107,12 @@ module Tinkerforge
107
107
 
108
108
  end
109
109
 
110
- # Sets the RGB values for the LEDs with the given *length* starting
111
- # from *index*.
110
+ # Sets *length* RGB values for the LEDs starting from *index*.
112
111
  #
113
112
  # To make the colors show correctly you need to configure the chip type
114
113
  # (BrickletLEDStrip#set_chip_type) and a 3-channel channel mapping (BrickletLEDStrip#set_channel_mapping)
115
114
  # according to the connected LEDs.
116
115
  #
117
- # The maximum length is 16, the index goes from 0 to 319 and the rgb values
118
- # have 8 bits each.
119
- #
120
116
  # Example: If you set
121
117
  #
122
118
  # * index to 5,
@@ -153,38 +149,35 @@ module Tinkerforge
153
149
  send_request FUNCTION_SET_RGB_VALUES, [index, length, r, g, b], 'S C C16 C16 C16', 0, ''
154
150
  end
155
151
 
156
- # Returns RGB value with the given *length* starting from the
157
- # given *index*.
152
+ # Returns *length* R, G and B values starting from the
153
+ # given LED *index*.
158
154
  #
159
155
  # The values are the last values that were set by BrickletLEDStrip#set_rgb_values.
160
156
  def get_rgb_values(index, length)
161
157
  send_request FUNCTION_GET_RGB_VALUES, [index, length], 'S C', 48, 'C16 C16 C16'
162
158
  end
163
159
 
164
- # Sets the frame duration in ms.
160
+ # Sets the frame duration.
165
161
  #
166
162
  # Example: If you want to achieve 20 frames per second, you should
167
163
  # set the frame duration to 50ms (50ms * 20 = 1 second).
168
164
  #
169
165
  # For an explanation of the general approach see BrickletLEDStrip#set_rgb_values.
170
- #
171
- # Default value: 100ms (10 frames per second).
172
166
  def set_frame_duration(duration)
173
167
  send_request FUNCTION_SET_FRAME_DURATION, [duration], 'S', 0, ''
174
168
  end
175
169
 
176
- # Returns the frame duration in ms as set by BrickletLEDStrip#set_frame_duration.
170
+ # Returns the frame duration as set by BrickletLEDStrip#set_frame_duration.
177
171
  def get_frame_duration
178
172
  send_request FUNCTION_GET_FRAME_DURATION, [], '', 2, 'S'
179
173
  end
180
174
 
181
- # Returns the current supply voltage of the LEDs. The voltage is given in mV.
175
+ # Returns the current supply voltage of the LEDs.
182
176
  def get_supply_voltage
183
177
  send_request FUNCTION_GET_SUPPLY_VOLTAGE, [], '', 2, 'S'
184
178
  end
185
179
 
186
- # Sets the frequency of the clock in Hz. The range is 10000Hz (10kHz) up to
187
- # 2000000Hz (2MHz).
180
+ # Sets the frequency of the clock.
188
181
  #
189
182
  # The Bricklet will choose the nearest achievable frequency, which may
190
183
  # be off by a few Hz. You can get the exact frequency that is used by
@@ -197,8 +190,6 @@ module Tinkerforge
197
190
  # With a decreasing frequency your maximum frames per second will decrease
198
191
  # too.
199
192
  #
200
- # The default value is 1.66MHz.
201
- #
202
193
  # .. note::
203
194
  # The frequency in firmware version 2.0.0 is fixed at 2MHz.
204
195
  #
@@ -223,8 +214,6 @@ module Tinkerforge
223
214
  # * LPD8806 and
224
215
  # * APA102 / DotStar.
225
216
  #
226
- # The default value is WS2801 (2801).
227
- #
228
217
  # .. versionadded:: 2.0.2$nbsp;(Plugin)
229
218
  def set_chip_type(chip)
230
219
  send_request FUNCTION_SET_CHIP_TYPE, [chip], 'S', 0, ''
@@ -237,8 +226,7 @@ module Tinkerforge
237
226
  send_request FUNCTION_GET_CHIP_TYPE, [], '', 2, 'S'
238
227
  end
239
228
 
240
- # Sets the RGBW values for the LEDs with the given *length* starting
241
- # from *index*.
229
+ # Sets *length* RGBW values for the LEDs starting from *index*.
242
230
  #
243
231
  # To make the colors show correctly you need to configure the chip type
244
232
  # (BrickletLEDStrip#set_chip_type) and a 4-channel channel mapping (BrickletLEDStrip#set_channel_mapping)
@@ -296,8 +284,7 @@ module Tinkerforge
296
284
  send_request FUNCTION_SET_RGBW_VALUES, [index, length, r, g, b, w], 'S C C12 C12 C12 C12', 0, ''
297
285
  end
298
286
 
299
- # Returns RGBW values with the given *length* starting from the
300
- # given *index*.
287
+ # Returns *length* RGBW values starting from the given *index*.
301
288
  #
302
289
  # The values are the last values that were set by BrickletLEDStrip#set_rgbw_values.
303
290
  #
@@ -326,8 +313,6 @@ module Tinkerforge
326
313
  # BrickletLEDStrip#set_rgbw_values has to be used. Calling BrickletLEDStrip#set_rgb_values with a
327
314
  # 4-channel mapping will produce incorrect results.
328
315
  #
329
- # The default value is BGR (36).
330
- #
331
316
  # .. versionadded:: 2.0.6$nbsp;(Plugin)
332
317
  def set_channel_mapping(mapping)
333
318
  send_request FUNCTION_SET_CHANNEL_MAPPING, [mapping], 'C', 0, ''
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-08-23. #
3
+ # This file was automatically generated on 2019-11-25. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.23 #
5
+ # Ruby Bindings Version 2.1.24 #
6
6
  # #
7
7
  # If you have a bugfix for this file and want to commit it, #
8
8
  # please fix the bug in the generator. You can find a link #
@@ -167,7 +167,13 @@ module Tinkerforge
167
167
  send_request FUNCTION_SET_LED_VALUES_LOW_LEVEL, [index, value_length, value_chunk_offset, value_chunk_data], 'S S S C58', 0, ''
168
168
  end
169
169
 
170
- # Returns the RGB(W) values as set by BrickletLEDStripV2#set_led_values.
170
+ # Returns *length* RGB(W) values starting from the
171
+ # given *index*.
172
+ #
173
+ # If the channel mapping has 3 colors, you will get the data in the sequence
174
+ # RGBRGBRGB... if the channel mapping has 4 colors you will get the data in the
175
+ # sequence RGBWRGBWRGBW...
176
+ # (assuming you start at an index divisible by 3 (RGB) or 4 (RGBW)).
171
177
  def get_led_values_low_level(index, length)
172
178
  send_request FUNCTION_GET_LED_VALUES_LOW_LEVEL, [index, length], 'S S', 64, 'S S C60'
173
179
  end
@@ -224,6 +230,7 @@ module Tinkerforge
224
230
  # * WS2811,
225
231
  # * WS2812 / SK6812 / NeoPixel RGB,
226
232
  # * SK6812RGBW / NeoPixel RGBW (Chip Type = WS2812),
233
+ # * WS2813 / WS2815 (Chip Type = WS2812)
227
234
  # * LPD8806 and
228
235
  # * APA102 / DotStar.
229
236
  #
@@ -450,7 +457,13 @@ module Tinkerforge
450
457
  ret
451
458
  end
452
459
 
453
- # Returns the RGB(W) values as set by BrickletLEDStripV2#set_led_values.
460
+ # Returns *length* RGB(W) values starting from the
461
+ # given *index*.
462
+ #
463
+ # If the channel mapping has 3 colors, you will get the data in the sequence
464
+ # RGBRGBRGB... if the channel mapping has 4 colors you will get the data in the
465
+ # sequence RGBWRGBWRGBW...
466
+ # (assuming you start at an index divisible by 3 (RGB) or 4 (RGBW)).
454
467
  def get_led_values(index, length)
455
468
  value_length = nil # assigned in block
456
469
  value_data = nil # assigned in block
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-08-23. #
3
+ # This file was automatically generated on 2019-11-25. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.23 #
5
+ # Ruby Bindings Version 2.1.24 #
6
6
  # #
7
7
  # If you have a bugfix for this file and want to commit it, #
8
8
  # please fix the bug in the generator. You can find a link #
@@ -80,13 +80,11 @@ module Tinkerforge
80
80
  send_request FUNCTION_GET_REFLECTIVITY, [], '', 2, 'S'
81
81
  end
82
82
 
83
- # Sets the period in ms with which the CALLBACK_REFLECTIVITY callback is triggered
83
+ # Sets the period with which the CALLBACK_REFLECTIVITY callback is triggered
84
84
  # periodically. A value of 0 turns the callback off.
85
85
  #
86
86
  # The CALLBACK_REFLECTIVITY callback is only triggered if the reflectivity has
87
87
  # changed since the last triggering.
88
- #
89
- # The default value is 0.
90
88
  def set_reflectivity_callback_period(period)
91
89
  send_request FUNCTION_SET_REFLECTIVITY_CALLBACK_PERIOD, [period], 'L', 0, ''
92
90
  end
@@ -107,8 +105,6 @@ module Tinkerforge
107
105
  # "'i'", "Callback is triggered when the reflectivity is *inside* the min and max values"
108
106
  # "'<'", "Callback is triggered when the reflectivity is smaller than the min value (max is ignored)"
109
107
  # "'>'", "Callback is triggered when the reflectivity is greater than the min value (max is ignored)"
110
- #
111
- # The default value is ('x', 0, 0).
112
108
  def set_reflectivity_callback_threshold(option, min, max)
113
109
  send_request FUNCTION_SET_REFLECTIVITY_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
114
110
  end
@@ -118,7 +114,7 @@ module Tinkerforge
118
114
  send_request FUNCTION_GET_REFLECTIVITY_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
119
115
  end
120
116
 
121
- # Sets the period in ms with which the threshold callback
117
+ # Sets the period with which the threshold callback
122
118
  #
123
119
  # * CALLBACK_REFLECTIVITY_REACHED
124
120
  #
@@ -127,8 +123,6 @@ module Tinkerforge
127
123
  # * BrickletLine#set_reflectivity_callback_threshold
128
124
  #
129
125
  # keeps being reached.
130
- #
131
- # The default value is 100.
132
126
  def set_debounce_period(debounce)
133
127
  send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
134
128
  end
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-08-23. #
3
+ # This file was automatically generated on 2019-11-25. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.23 #
5
+ # Ruby Bindings Version 2.1.24 #
6
6
  # #
7
7
  # If you have a bugfix for this file and want to commit it, #
8
8
  # please fix the bug in the generator. You can find a link #
@@ -106,7 +106,6 @@ module Tinkerforge
106
106
  end
107
107
 
108
108
  # Returns the value as read by a 12-bit analog-to-digital converter.
109
- # The value is between 0 and 4095.
110
109
  #
111
110
  # .. note::
112
111
  # The value returned by BrickletLinearPoti#get_position is averaged over several samples
@@ -121,13 +120,11 @@ module Tinkerforge
121
120
  send_request FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S'
122
121
  end
123
122
 
124
- # Sets the period in ms with which the CALLBACK_POSITION callback is triggered
123
+ # Sets the period with which the CALLBACK_POSITION callback is triggered
125
124
  # periodically. A value of 0 turns the callback off.
126
125
  #
127
126
  # The CALLBACK_POSITION callback is only triggered if the position has changed
128
127
  # since the last triggering.
129
- #
130
- # The default value is 0.
131
128
  def set_position_callback_period(period)
132
129
  send_request FUNCTION_SET_POSITION_CALLBACK_PERIOD, [period], 'L', 0, ''
133
130
  end
@@ -137,13 +134,11 @@ module Tinkerforge
137
134
  send_request FUNCTION_GET_POSITION_CALLBACK_PERIOD, [], '', 4, 'L'
138
135
  end
139
136
 
140
- # Sets the period in ms with which the CALLBACK_ANALOG_VALUE callback is triggered
137
+ # Sets the period with which the CALLBACK_ANALOG_VALUE callback is triggered
141
138
  # periodically. A value of 0 turns the callback off.
142
139
  #
143
140
  # The CALLBACK_ANALOG_VALUE callback is only triggered if the analog value has
144
141
  # changed since the last triggering.
145
- #
146
- # The default value is 0.
147
142
  def set_analog_value_callback_period(period)
148
143
  send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD, [period], 'L', 0, ''
149
144
  end
@@ -164,8 +159,6 @@ module Tinkerforge
164
159
  # "'i'", "Callback is triggered when the position is *inside* the min and max values"
165
160
  # "'<'", "Callback is triggered when the position is smaller than the min value (max is ignored)"
166
161
  # "'>'", "Callback is triggered when the position is greater than the min value (max is ignored)"
167
- #
168
- # The default value is ('x', 0, 0).
169
162
  def set_position_callback_threshold(option, min, max)
170
163
  send_request FUNCTION_SET_POSITION_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
171
164
  end
@@ -186,8 +179,6 @@ module Tinkerforge
186
179
  # "'i'", "Callback is triggered when the analog value is *inside* the min and max values"
187
180
  # "'<'", "Callback is triggered when the analog value is smaller than the min value (max is ignored)"
188
181
  # "'>'", "Callback is triggered when the analog value is greater than the min value (max is ignored)"
189
- #
190
- # The default value is ('x', 0, 0).
191
182
  def set_analog_value_callback_threshold(option, min, max)
192
183
  send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
193
184
  end
@@ -197,7 +188,7 @@ module Tinkerforge
197
188
  send_request FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
198
189
  end
199
190
 
200
- # Sets the period in ms with which the threshold callbacks
191
+ # Sets the period with which the threshold callbacks
201
192
  #
202
193
  # * CALLBACK_POSITION_REACHED,
203
194
  # * CALLBACK_ANALOG_VALUE_REACHED
@@ -208,8 +199,6 @@ module Tinkerforge
208
199
  # * BrickletLinearPoti#set_analog_value_callback_threshold
209
200
  #
210
201
  # keep being reached.
211
- #
212
- # The default value is 100.
213
202
  def set_debounce_period(debounce)
214
203
  send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
215
204
  end
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-08-23. #
3
+ # This file was automatically generated on 2019-11-25. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.23 #
5
+ # Ruby Bindings Version 2.1.24 #
6
6
  # #
7
7
  # If you have a bugfix for this file and want to commit it, #
8
8
  # please fix the bug in the generator. You can find a link #
@@ -96,7 +96,7 @@ module Tinkerforge
96
96
  send_request FUNCTION_GET_POSITION, [], '', 1, 'C'
97
97
  end
98
98
 
99
- # The period in ms is the period with which the CALLBACK_POSITION callback is triggered
99
+ # The period is the period with which the CALLBACK_POSITION callback is triggered
100
100
  # periodically. A value of 0 turns the callback off.
101
101
  #
102
102
  # If the `value has to change`-parameter is set to true, the callback is only
@@ -121,8 +121,6 @@ module Tinkerforge
121
121
  # "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
122
122
  #
123
123
  # If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
124
- #
125
- # The default value is (0, false, 'x', 0, 0).
126
124
  def set_position_callback_configuration(period, value_has_to_change, option, min, max)
127
125
  send_request FUNCTION_SET_POSITION_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k C C', 0, ''
128
126
  end
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-08-23. #
3
+ # This file was automatically generated on 2019-11-25. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.23 #
5
+ # Ruby Bindings Version 2.1.24 #
6
6
  # #
7
7
  # If you have a bugfix for this file and want to commit it, #
8
8
  # please fix the bug in the generator. You can find a link #
@@ -90,7 +90,7 @@ module Tinkerforge
90
90
 
91
91
  end
92
92
 
93
- # Returns the currently measured weight in grams.
93
+ # Returns the currently measured weight.
94
94
  #
95
95
  # If you want to get the weight periodically, it is recommended
96
96
  # to use the CALLBACK_WEIGHT callback and set the period with
@@ -99,13 +99,11 @@ module Tinkerforge
99
99
  send_request FUNCTION_GET_WEIGHT, [], '', 4, 'l'
100
100
  end
101
101
 
102
- # Sets the period in ms with which the CALLBACK_WEIGHT callback is triggered
102
+ # Sets the period with which the CALLBACK_WEIGHT callback is triggered
103
103
  # periodically. A value of 0 turns the callback off.
104
104
  #
105
105
  # The CALLBACK_WEIGHT callback is only triggered if the weight has changed since the
106
106
  # last triggering.
107
- #
108
- # The default value is 0.
109
107
  def set_weight_callback_period(period)
110
108
  send_request FUNCTION_SET_WEIGHT_CALLBACK_PERIOD, [period], 'L', 0, ''
111
109
  end
@@ -126,8 +124,6 @@ module Tinkerforge
126
124
  # "'i'", "Callback is triggered when the weight is *inside* the min and max values"
127
125
  # "'<'", "Callback is triggered when the weight is smaller than the min value (max is ignored)"
128
126
  # "'>'", "Callback is triggered when the weight is greater than the min value (max is ignored)"
129
- #
130
- # The default value is ('x', 0, 0).
131
127
  def set_weight_callback_threshold(option, min, max)
132
128
  send_request FUNCTION_SET_WEIGHT_CALLBACK_THRESHOLD, [option, min, max], 'k l l', 0, ''
133
129
  end
@@ -137,7 +133,7 @@ module Tinkerforge
137
133
  send_request FUNCTION_GET_WEIGHT_CALLBACK_THRESHOLD, [], '', 9, 'k l l'
138
134
  end
139
135
 
140
- # Sets the period in ms with which the threshold callback
136
+ # Sets the period with which the threshold callback
141
137
  #
142
138
  # * CALLBACK_WEIGHT_REACHED
143
139
  #
@@ -146,8 +142,6 @@ module Tinkerforge
146
142
  # * BrickletLoadCell#set_weight_callback_threshold
147
143
  #
148
144
  # keeps being reached.
149
- #
150
- # The default value is 100.
151
145
  def set_debounce_period(debounce)
152
146
  send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
153
147
  end
@@ -162,10 +156,6 @@ module Tinkerforge
162
156
  #
163
157
  # Setting the length to 1 will turn the averaging off. With less
164
158
  # averaging, there is more noise on the data.
165
- #
166
- # The range for the averaging is 1-40.
167
- #
168
- # The default value is 4.
169
159
  def set_moving_average(average)
170
160
  send_request FUNCTION_SET_MOVING_AVERAGE, [average], 'C', 0, ''
171
161
  end
@@ -193,8 +183,7 @@ module Tinkerforge
193
183
  # To calibrate your Load Cell Bricklet you have to
194
184
  #
195
185
  # * empty the scale and call this function with 0 and
196
- # * add a known weight to the scale and call this function with the weight in
197
- # grams.
186
+ # * add a known weight to the scale and call this function with the weight.
198
187
  #
199
188
  # The calibration is saved in the EEPROM of the Bricklet and only
200
189
  # needs to be done once.
@@ -228,8 +217,6 @@ module Tinkerforge
228
217
  #
229
218
  # We recommend to use the Brick Viewer for configuration, you don't need
230
219
  # to call this function in your source code.
231
- #
232
- # The default rate is 10Hz and the default gain is 128x.
233
220
  def set_configuration(rate, gain)
234
221
  send_request FUNCTION_SET_CONFIGURATION, [rate, gain], 'C C', 0, ''
235
222
  end