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 #
@@ -136,9 +136,7 @@ module Tinkerforge
136
136
 
137
137
  end
138
138
 
139
- # Returns the measured air pressure. The value has a range of
140
- # 260000 to 1260000 and is given in mbar/1000, i.e. a value of
141
- # 1001092 means that an air pressure of 1001.092 mbar is measured.
139
+ # Returns the measured air pressure.
142
140
  #
143
141
  #
144
142
  # If you want to get the value periodically, it is recommended to use the
@@ -148,7 +146,7 @@ module Tinkerforge
148
146
  send_request FUNCTION_GET_AIR_PRESSURE, [], '', 4, 'l'
149
147
  end
150
148
 
151
- # The period in ms is the period with which the CALLBACK_AIR_PRESSURE callback is triggered
149
+ # The period is the period with which the CALLBACK_AIR_PRESSURE callback is triggered
152
150
  # periodically. A value of 0 turns the callback off.
153
151
  #
154
152
  # If the `value has to change`-parameter is set to true, the callback is only
@@ -173,8 +171,6 @@ module Tinkerforge
173
171
  # "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
174
172
  #
175
173
  # If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
176
- #
177
- # The default value is (0, false, 'x', 0, 0).
178
174
  def set_air_pressure_callback_configuration(period, value_has_to_change, option, min, max)
179
175
  send_request FUNCTION_SET_AIR_PRESSURE_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k l l', 0, ''
180
176
  end
@@ -185,7 +181,7 @@ module Tinkerforge
185
181
  end
186
182
 
187
183
  # Returns the relative altitude of the air pressure sensor. The value
188
- # is given in mm and is calculated based on the difference between the
184
+ # is calculated based on the difference between the
189
185
  # current air pressure and the reference air pressure that can be set
190
186
  # with BrickletBarometerV2#set_reference_air_pressure.
191
187
  #
@@ -197,7 +193,7 @@ module Tinkerforge
197
193
  send_request FUNCTION_GET_ALTITUDE, [], '', 4, 'l'
198
194
  end
199
195
 
200
- # The period in ms is the period with which the CALLBACK_ALTITUDE callback is triggered
196
+ # The period is the period with which the CALLBACK_ALTITUDE callback is triggered
201
197
  # periodically. A value of 0 turns the callback off.
202
198
  #
203
199
  # If the `value has to change`-parameter is set to true, the callback is only
@@ -222,8 +218,6 @@ module Tinkerforge
222
218
  # "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
223
219
  #
224
220
  # If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
225
- #
226
- # The default value is (0, false, 'x', 0, 0).
227
221
  def set_altitude_callback_configuration(period, value_has_to_change, option, min, max)
228
222
  send_request FUNCTION_SET_ALTITUDE_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k l l', 0, ''
229
223
  end
@@ -233,9 +227,7 @@ module Tinkerforge
233
227
  send_request FUNCTION_GET_ALTITUDE_CALLBACK_CONFIGURATION, [], '', 14, 'L ? k l l'
234
228
  end
235
229
 
236
- # Returns the temperature of the air pressure sensor. The value
237
- # has a range of -4000 to 8500 and is given in °C/100, i.e. a value
238
- # of 2007 means that a temperature of 20.07 °C is measured.
230
+ # Returns the temperature of the air pressure sensor.
239
231
  #
240
232
  # This temperature is used internally for temperature compensation
241
233
  # of the air pressure measurement. It is not as accurate as the
@@ -250,7 +242,7 @@ module Tinkerforge
250
242
  send_request FUNCTION_GET_TEMPERATURE, [], '', 4, 'l'
251
243
  end
252
244
 
253
- # The period in ms is the period with which the CALLBACK_TEMPERATURE callback is triggered
245
+ # The period is the period with which the CALLBACK_TEMPERATURE callback is triggered
254
246
  # periodically. A value of 0 turns the callback off.
255
247
  #
256
248
  # If the `value has to change`-parameter is set to true, the callback is only
@@ -275,8 +267,6 @@ module Tinkerforge
275
267
  # "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
276
268
  #
277
269
  # If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
278
- #
279
- # The default value is (0, false, 'x', 0, 0).
280
270
  def set_temperature_callback_configuration(period, value_has_to_change, option, min, max)
281
271
  send_request FUNCTION_SET_TEMPERATURE_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k l l', 0, ''
282
272
  end
@@ -292,12 +282,8 @@ module Tinkerforge
292
282
  # Setting the length to 1 will turn the averaging off. With less
293
283
  # averaging, there is more noise on the data.
294
284
  #
295
- # The range for the averaging is 1-1000.
296
- #
297
285
  # If you want to do long term measurements the longest moving average will give
298
286
  # the cleanest results.
299
- #
300
- # The default value is 100.
301
287
  def set_moving_average_configuration(moving_average_length_air_pressure, moving_average_length_temperature)
302
288
  send_request FUNCTION_SET_MOVING_AVERAGE_CONFIGURATION, [moving_average_length_air_pressure, moving_average_length_temperature], 'S S', 0, ''
303
289
  end
@@ -308,8 +294,8 @@ module Tinkerforge
308
294
  send_request FUNCTION_GET_MOVING_AVERAGE_CONFIGURATION, [], '', 4, 'S S'
309
295
  end
310
296
 
311
- # Sets the reference air pressure in mbar/1000 for the altitude calculation.
312
- # Valid values are between 260000 and 1260000. Setting the reference to the
297
+ # Sets the reference air pressure for the altitude calculation.
298
+ # Setting the reference to the
313
299
  # current air pressure results in a calculated altitude of 0mm. Passing 0 is
314
300
  # a shortcut for passing the current air pressure as reference.
315
301
  #
@@ -317,8 +303,6 @@ module Tinkerforge
317
303
  # `QNH <https://en.wikipedia.org/wiki/QNH>`__ and
318
304
  # `QFE <https://en.wikipedia.org/wiki/Mean_sea_level_pressure#Mean_sea_level_pressure>`__
319
305
  # used in aviation.
320
- #
321
- # The default value is 1013.25mbar.
322
306
  def set_reference_air_pressure(air_pressure)
323
307
  send_request FUNCTION_SET_REFERENCE_AIR_PRESSURE, [air_pressure], 'l', 0, ''
324
308
  end
@@ -334,12 +318,11 @@ module Tinkerforge
334
318
  # by setting ``measured air pressure`` and ``actual air pressure`` to 0.
335
319
  #
336
320
  # Then the current air pressure has to be measured using the Bricklet
337
- # (``measured air pressure``) and with and accurate reference barometer
338
- # (``actual air pressure``) at the same time and passed to this function in
339
- # mbar/1000.
321
+ # (``measured air pressure``) and with an accurate reference barometer
322
+ # (``actual air pressure``) at the same time and passed to this function.
340
323
  #
341
324
  # After proper calibration the air pressure measurement can achieve an accuracy
342
- # up to 0.2 mbar.
325
+ # up to 0.2 hPa.
343
326
  #
344
327
  # The calibration is saved in the EEPROM of the Bricklet and only needs to be
345
328
  # configured once.
@@ -363,8 +346,6 @@ module Tinkerforge
363
346
  # A higher data rate will result in a less precise temperature because of
364
347
  # self-heating of the sensor. If the accuracy of the temperature reading is
365
348
  # important to you, we would recommend the 1Hz data rate.
366
- #
367
- # The default values are 50Hz data rate and 1/9th low pass filter.
368
349
  def set_sensor_configuration(data_rate, air_pressure_low_pass_filter)
369
350
  send_request FUNCTION_SET_SENSOR_CONFIGURATION, [data_rate, air_pressure_low_pass_filter], 'C C', 0, ''
370
351
  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 #
@@ -167,15 +167,13 @@ module Tinkerforge
167
167
  # The write timeout has three different modes that define how a failed frame
168
168
  # transmission should be handled:
169
169
  #
170
- # * One-Shot (< 0): Only one transmission attempt will be made. If the
170
+ # * One-Shot (= -1): Only one transmission attempt will be made. If the
171
171
  # transmission fails then the frame is discarded.
172
172
  # * Infinite (= 0): Infinite transmission attempts will be made. The frame will
173
173
  # never be discarded.
174
174
  # * Milliseconds (> 0): A limited number of transmission attempts will be made.
175
175
  # If the frame could not be transmitted successfully after the configured
176
176
  # number of milliseconds then the frame is discarded.
177
- #
178
- # The default is: 125 kbit/s, normal transceiver mode and infinite write timeout.
179
177
  def set_configuration(baud_rate, transceiver_mode, write_timeout)
180
178
  send_request FUNCTION_SET_CONFIGURATION, [baud_rate, transceiver_mode, write_timeout], 'C C l', 0, ''
181
179
  end
@@ -235,8 +233,6 @@ module Tinkerforge
235
233
  #
236
234
  # To accept identifier 0x123 and identifier 0x456 at the same time, just set
237
235
  # filter 2 to 0x456 and keep mask and filter 1 unchanged.
238
- #
239
- # The default mode is accept-all.
240
236
  def set_read_filter(mode, mask, filter1, filter2)
241
237
  send_request FUNCTION_SET_READ_FILTER, [mode, mask, filter1, filter2], 'C L L L', 0, ''
242
238
  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 #
@@ -15,19 +15,7 @@ module Tinkerforge
15
15
  DEVICE_IDENTIFIER = 2107 # :nodoc:
16
16
  DEVICE_DISPLAY_NAME = 'CAN Bricklet 2.0' # :nodoc:
17
17
 
18
- # This callback is triggered if a data or remote frame was received by the CAN
19
- # transceiver.
20
- #
21
- # The ``identifier`` return value follows the identifier format described for
22
- # BrickletCANV2#write_frame.
23
- #
24
- # For details on the ``data`` return value see BrickletCANV2#read_frame.
25
- #
26
- # A configurable read filter can be used to define which frames should be
27
- # received by the CAN transceiver and put into the read queue (see
28
- # BrickletCANV2#set_queue_configuration).
29
- #
30
- # To enable this callback, use BrickletCANV2#set_frame_read_callback_configuration.
18
+ # See CALLBACK_FRAME_READ
31
19
  CALLBACK_FRAME_READ_LOW_LEVEL = 16
32
20
 
33
21
  # This callback is triggered if a data or remote frame was received by the CAN
@@ -43,6 +31,9 @@ module Tinkerforge
43
31
  # BrickletCANV2#set_queue_configuration).
44
32
  #
45
33
  # To enable this callback, use BrickletCANV2#set_frame_read_callback_configuration.
34
+ #
35
+ # .. note::
36
+ # If reconstructing the value fails, the callback is triggered with nil for data.
46
37
  CALLBACK_FRAME_READ = -16
47
38
 
48
39
  FUNCTION_WRITE_FRAME_LOW_LEVEL = 1 # :nodoc:
@@ -224,9 +215,6 @@ module Tinkerforge
224
215
 
225
216
  # Sets the transceiver configuration for the CAN bus communication.
226
217
  #
227
- # The baud rate can be configured in bit/s between 10 and 1000 kbit/s and the
228
- # sample point can be configured in 1/10 % between 50 and 90 %.
229
- #
230
218
  # The CAN transceiver has three different modes:
231
219
  #
232
220
  # * Normal: Reads from and writes to the CAN bus and performs active bus
@@ -236,8 +224,6 @@ module Tinkerforge
236
224
  # * Read-Only: Only reads from the CAN bus, but does neither active bus error
237
225
  # detection nor acknowledgement. Only the receiving part of the transceiver
238
226
  # is connected to the CAN bus.
239
- #
240
- # The default is: 125 kbit/s, 62.5 % and normal transceiver mode.
241
227
  def set_transceiver_configuration(baud_rate, sample_point, transceiver_mode)
242
228
  send_request FUNCTION_SET_TRANSCEIVER_CONFIGURATION, [baud_rate, sample_point, transceiver_mode], 'L S C', 0, ''
243
229
  end
@@ -279,7 +265,7 @@ module Tinkerforge
279
265
  #
280
266
  # A valid queue configuration fulfills these conditions::
281
267
  #
282
- # write_buffer_size + read_buffer_size_0 + read_buffer_size_1 + ... + read_buffer_size_31 <= 32
268
+ # write_buffer_size + abs(read_buffer_size_0) + abs(read_buffer_size_1) + ... + abs(read_buffer_size_31) <= 32
283
269
  # write_backlog_size + read_backlog_size <= 768
284
270
  #
285
271
  # The write buffer timeout has three different modes that define how a failed
@@ -294,15 +280,6 @@ module Tinkerforge
294
280
  # number of milliseconds then the frame is discarded.
295
281
  #
296
282
  # The current content of the queues is lost when this function is called.
297
- #
298
- # The default is:
299
- #
300
- # * 8 write buffers,
301
- # * infinite write timeout,
302
- # * 383 write backlog frames,
303
- # * 16 read buffers for data frames,
304
- # * 8 read buffers for remote frames and
305
- # * 383 read backlog frames.
306
283
  def set_queue_configuration_low_level(write_buffer_size, write_buffer_timeout, write_backlog_size, read_buffer_sizes_length, read_buffer_sizes_data, read_backlog_size)
307
284
  send_request FUNCTION_SET_QUEUE_CONFIGURATION_LOW_LEVEL, [write_buffer_size, write_buffer_timeout, write_backlog_size, read_buffer_sizes_length, read_buffer_sizes_data, read_backlog_size], 'C l S C c32 S', 0, ''
308
285
  end
@@ -674,7 +651,7 @@ module Tinkerforge
674
651
  #
675
652
  # A valid queue configuration fulfills these conditions::
676
653
  #
677
- # write_buffer_size + read_buffer_size_0 + read_buffer_size_1 + ... + read_buffer_size_31 <= 32
654
+ # write_buffer_size + abs(read_buffer_size_0) + abs(read_buffer_size_1) + ... + abs(read_buffer_size_31) <= 32
678
655
  # write_backlog_size + read_backlog_size <= 768
679
656
  #
680
657
  # The write buffer timeout has three different modes that define how a failed
@@ -689,15 +666,6 @@ module Tinkerforge
689
666
  # number of milliseconds then the frame is discarded.
690
667
  #
691
668
  # The current content of the queues is lost when this function is called.
692
- #
693
- # The default is:
694
- #
695
- # * 8 write buffers,
696
- # * infinite write timeout,
697
- # * 383 write backlog frames,
698
- # * 16 read buffers for data frames,
699
- # * 8 read buffers for remote frames and
700
- # * 383 read backlog frames.
701
669
  def set_queue_configuration(write_buffer_size, write_buffer_timeout, write_backlog_size, read_buffer_sizes, read_backlog_size)
702
670
  read_buffer_sizes = read_buffer_sizes.clone # clone so we can potentially extend it
703
671
  read_buffer_sizes_length = read_buffer_sizes.length
@@ -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 #
@@ -67,9 +67,7 @@ module Tinkerforge
67
67
 
68
68
  end
69
69
 
70
- # Returns the measured CO2 concentration. The value is in
71
- # `ppm (parts per million) <https://en.wikipedia.org/wiki/Parts-per_notation>`__
72
- # and between 0 to 10000.
70
+ # Returns the measured CO2 concentration.
73
71
  #
74
72
  # If you want to get the CO2 concentration periodically, it is recommended to use
75
73
  # the CALLBACK_CO2_CONCENTRATION callback and set the period with
@@ -78,13 +76,11 @@ module Tinkerforge
78
76
  send_request FUNCTION_GET_CO2_CONCENTRATION, [], '', 2, 'S'
79
77
  end
80
78
 
81
- # Sets the period in ms with which the CALLBACK_CO2_CONCENTRATION callback is
79
+ # Sets the period with which the CALLBACK_CO2_CONCENTRATION callback is
82
80
  # triggered periodically. A value of 0 turns the callback off.
83
81
  #
84
82
  # The CALLBACK_CO2_CONCENTRATION callback is only triggered if the CO2 concentration
85
83
  # has changed since the last triggering.
86
- #
87
- # The default value is 0.
88
84
  def set_co2_concentration_callback_period(period)
89
85
  send_request FUNCTION_SET_CO2_CONCENTRATION_CALLBACK_PERIOD, [period], 'L', 0, ''
90
86
  end
@@ -105,8 +101,6 @@ module Tinkerforge
105
101
  # "'i'", "Callback is triggered when the CO2 concentration is *inside* the min and max values"
106
102
  # "'<'", "Callback is triggered when the CO2 concentration is smaller than the min value (max is ignored)"
107
103
  # "'>'", "Callback is triggered when the CO2 concentration is greater than the min value (max is ignored)"
108
- #
109
- # The default value is ('x', 0, 0).
110
104
  def set_co2_concentration_callback_threshold(option, min, max)
111
105
  send_request FUNCTION_SET_CO2_CONCENTRATION_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
112
106
  end
@@ -116,7 +110,7 @@ module Tinkerforge
116
110
  send_request FUNCTION_GET_CO2_CONCENTRATION_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
117
111
  end
118
112
 
119
- # Sets the period in ms with which the threshold callbacks
113
+ # Sets the period with which the threshold callbacks
120
114
  #
121
115
  # * CALLBACK_CO2_CONCENTRATION_REACHED,
122
116
  #
@@ -125,8 +119,6 @@ module Tinkerforge
125
119
  # * BrickletCO2#set_co2_concentration_callback_threshold,
126
120
  #
127
121
  # keep being reached.
128
- #
129
- # The default value is 100.
130
122
  def set_debounce_period(debounce)
131
123
  send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
132
124
  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 #
@@ -19,6 +19,10 @@ module Tinkerforge
19
19
  # BrickletCO2V2#set_all_values_callback_configuration.
20
20
  #
21
21
  # The parameters are the same as BrickletCO2V2#get_all_values.
22
+ #
23
+ # .. note::
24
+ # The sensor is able to messure up to 120 °C. However it is only specified up to 70 °C.
25
+ # Exposing the Bricklet to higher temperatures might result in permanent damage.
22
26
  CALLBACK_ALL_VALUES = 8
23
27
 
24
28
  # This callback is triggered periodically according to the configuration set by
@@ -132,13 +136,15 @@ module Tinkerforge
132
136
 
133
137
  end
134
138
 
135
- # Returns all values measured by the CO2 Bricklet 2.0. The values are
136
- # CO2 concentration (in ppm), temperature (in 0.01 °C)
137
- # and humidity (in 0.01 %RH).
139
+ # Returns all values measured by the CO2 Bricklet 2.0.
138
140
  #
139
141
  # If you want to get the values periodically, it is recommended to use the
140
142
  # CALLBACK_ALL_VALUES callback. You can set the callback configuration
141
143
  # with BrickletCO2V2#set_all_values_callback_configuration.
144
+ #
145
+ # .. note::
146
+ # The sensor is able to messure up to 120 °C. However it is only specified up to 70 °C.
147
+ # Exposing the Bricklet to higher temperatures might result in permanent damage.
142
148
  def get_all_values
143
149
  send_request FUNCTION_GET_ALL_VALUES, [], '', 6, 'S s S'
144
150
  end
@@ -149,8 +155,6 @@ module Tinkerforge
149
155
  # You use the :ref:`Barometer Bricklet 2.0 <barometer_v2_bricklet>` or the
150
156
  # :ref:`Air Quality Bricklet <air_quality_bricklet>` to get the current air pressure.
151
157
  #
152
- # The expected unit of the ambient air pressure value is mbar.
153
- #
154
158
  # By default air pressure compensation is disabled. Once you set a value it
155
159
  # will be used for compensation. You can turn the compensation off again by
156
160
  # setting the value to 0.
@@ -165,8 +169,8 @@ module Tinkerforge
165
169
  send_request FUNCTION_GET_AIR_PRESSURE, [], '', 2, 'S'
166
170
  end
167
171
 
168
- # Sets a temperature offset with resolution 1/100°C. A offset of 10 will decrease
169
- # the measured temperature by 0.1°C.
172
+ # Sets a temperature offset. A offset of 10 will decrease
173
+ # the measured temperature by 0.1 °C.
170
174
  #
171
175
  # If you install this Bricklet into an enclosure and you want to measure the ambient
172
176
  # temperature, you may have to decrease the measured temperature by some value to
@@ -193,7 +197,7 @@ module Tinkerforge
193
197
  send_request FUNCTION_GET_TEMPERATURE_OFFSET, [], '', 2, 'S'
194
198
  end
195
199
 
196
- # The period in ms is the period with which the CALLBACK_ALL_VALUES
200
+ # The period is the period with which the CALLBACK_ALL_VALUES
197
201
  # callback is triggered periodically. A value of 0 turns the callback off.
198
202
  #
199
203
  # If the `value has to change`-parameter is set to true, the callback is only
@@ -202,8 +206,6 @@ module Tinkerforge
202
206
  #
203
207
  # If it is set to false, the callback is continuously triggered with the period,
204
208
  # independent of the value.
205
- #
206
- # The default value is (0, false).
207
209
  def set_all_values_callback_configuration(period, value_has_to_change)
208
210
  send_request FUNCTION_SET_ALL_VALUES_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
209
211
  end
@@ -214,7 +216,7 @@ module Tinkerforge
214
216
  send_request FUNCTION_GET_ALL_VALUES_CALLBACK_CONFIGURATION, [], '', 5, 'L ?'
215
217
  end
216
218
 
217
- # Returns CO2 concentration in ppm.
219
+ # Returns CO2 concentration.
218
220
  #
219
221
  #
220
222
  # If you want to get the value periodically, it is recommended to use the
@@ -224,7 +226,7 @@ module Tinkerforge
224
226
  send_request FUNCTION_GET_CO2_CONCENTRATION, [], '', 2, 'S'
225
227
  end
226
228
 
227
- # The period in ms is the period with which the CALLBACK_CO2_CONCENTRATION callback is triggered
229
+ # The period is the period with which the CALLBACK_CO2_CONCENTRATION callback is triggered
228
230
  # periodically. A value of 0 turns the callback off.
229
231
  #
230
232
  # If the `value has to change`-parameter is set to true, the callback is only
@@ -249,8 +251,6 @@ module Tinkerforge
249
251
  # "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
250
252
  #
251
253
  # If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
252
- #
253
- # The default value is (0, false, 'x', 0, 0).
254
254
  def set_co2_concentration_callback_configuration(period, value_has_to_change, option, min, max)
255
255
  send_request FUNCTION_SET_CO2_CONCENTRATION_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k S S', 0, ''
256
256
  end
@@ -260,7 +260,11 @@ module Tinkerforge
260
260
  send_request FUNCTION_GET_CO2_CONCENTRATION_CALLBACK_CONFIGURATION, [], '', 10, 'L ? k S S'
261
261
  end
262
262
 
263
- # Returns temperature in steps of 0.01 °C.
263
+ # Returns temperature.
264
+ #
265
+ # .. note::
266
+ # The sensor is able to messure up to 120 °C. However it is only specified up to 70 °C.
267
+ # Exposing the Bricklet to higher temperatures might result in permanent damage.
264
268
  #
265
269
  #
266
270
  # If you want to get the value periodically, it is recommended to use the
@@ -270,7 +274,7 @@ module Tinkerforge
270
274
  send_request FUNCTION_GET_TEMPERATURE, [], '', 2, 's'
271
275
  end
272
276
 
273
- # The period in ms is the period with which the CALLBACK_TEMPERATURE callback is triggered
277
+ # The period is the period with which the CALLBACK_TEMPERATURE callback is triggered
274
278
  # periodically. A value of 0 turns the callback off.
275
279
  #
276
280
  # If the `value has to change`-parameter is set to true, the callback is only
@@ -295,8 +299,6 @@ module Tinkerforge
295
299
  # "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
296
300
  #
297
301
  # If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
298
- #
299
- # The default value is (0, false, 'x', 0, 0).
300
302
  def set_temperature_callback_configuration(period, value_has_to_change, option, min, max)
301
303
  send_request FUNCTION_SET_TEMPERATURE_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k s s', 0, ''
302
304
  end
@@ -306,7 +308,7 @@ module Tinkerforge
306
308
  send_request FUNCTION_GET_TEMPERATURE_CALLBACK_CONFIGURATION, [], '', 10, 'L ? k s s'
307
309
  end
308
310
 
309
- # Returns relative humidity in steps of 0.01 %RH.
311
+ # Returns relative humidity.
310
312
  #
311
313
  #
312
314
  # If you want to get the value periodically, it is recommended to use the
@@ -316,7 +318,7 @@ module Tinkerforge
316
318
  send_request FUNCTION_GET_HUMIDITY, [], '', 2, 'S'
317
319
  end
318
320
 
319
- # The period in ms is the period with which the CALLBACK_HUMIDITY callback is triggered
321
+ # The period is the period with which the CALLBACK_HUMIDITY callback is triggered
320
322
  # periodically. A value of 0 turns the callback off.
321
323
  #
322
324
  # If the `value has to change`-parameter is set to true, the callback is only
@@ -341,8 +343,6 @@ module Tinkerforge
341
343
  # "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
342
344
  #
343
345
  # If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
344
- #
345
- # The default value is (0, false, 'x', 0, 0).
346
346
  def set_humidity_callback_configuration(period, value_has_to_change, option, min, max)
347
347
  send_request FUNCTION_SET_HUMIDITY_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k S S', 0, ''
348
348
  end