tinkerforge 2.1.21 → 2.1.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +5 -5
  2. data/lib/tinkerforge/brick_dc.rb +2 -2
  3. data/lib/tinkerforge/brick_hat.rb +256 -0
  4. data/lib/tinkerforge/brick_hat_zero.rb +196 -0
  5. data/lib/tinkerforge/brick_imu.rb +2 -2
  6. data/lib/tinkerforge/brick_imu_v2.rb +2 -2
  7. data/lib/tinkerforge/brick_master.rb +12 -9
  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 +2 -2
  11. data/lib/tinkerforge/brick_stepper.rb +2 -2
  12. data/lib/tinkerforge/bricklet_accelerometer.rb +2 -2
  13. data/lib/tinkerforge/bricklet_accelerometer_v2.rb +16 -6
  14. data/lib/tinkerforge/bricklet_air_quality.rb +59 -3
  15. data/lib/tinkerforge/bricklet_ambient_light.rb +2 -2
  16. data/lib/tinkerforge/bricklet_ambient_light_v2.rb +2 -2
  17. data/lib/tinkerforge/bricklet_ambient_light_v3.rb +3 -3
  18. data/lib/tinkerforge/bricklet_analog_in.rb +2 -2
  19. data/lib/tinkerforge/bricklet_analog_in_v2.rb +2 -2
  20. data/lib/tinkerforge/bricklet_analog_in_v3.rb +2 -2
  21. data/lib/tinkerforge/bricklet_analog_out.rb +2 -2
  22. data/lib/tinkerforge/bricklet_analog_out_v2.rb +2 -2
  23. data/lib/tinkerforge/bricklet_analog_out_v3.rb +2 -2
  24. data/lib/tinkerforge/bricklet_barometer.rb +2 -2
  25. data/lib/tinkerforge/bricklet_barometer_v2.rb +2 -2
  26. data/lib/tinkerforge/bricklet_can.rb +2 -2
  27. data/lib/tinkerforge/bricklet_can_v2.rb +2 -2
  28. data/lib/tinkerforge/bricklet_co2.rb +2 -2
  29. data/lib/tinkerforge/bricklet_co2_v2.rb +479 -0
  30. data/lib/tinkerforge/bricklet_color.rb +2 -2
  31. data/lib/tinkerforge/bricklet_current12.rb +2 -2
  32. data/lib/tinkerforge/bricklet_current25.rb +2 -2
  33. data/lib/tinkerforge/bricklet_distance_ir.rb +2 -2
  34. data/lib/tinkerforge/bricklet_distance_ir_v2.rb +3 -3
  35. data/lib/tinkerforge/bricklet_distance_us.rb +2 -2
  36. data/lib/tinkerforge/bricklet_dmx.rb +2 -2
  37. data/lib/tinkerforge/bricklet_dual_button.rb +2 -2
  38. data/lib/tinkerforge/bricklet_dual_button_v2.rb +2 -2
  39. data/lib/tinkerforge/bricklet_dual_relay.rb +5 -3
  40. data/lib/tinkerforge/bricklet_dust_detector.rb +2 -2
  41. data/lib/tinkerforge/bricklet_e_paper_296x128.rb +600 -0
  42. data/lib/tinkerforge/bricklet_gps.rb +2 -2
  43. data/lib/tinkerforge/bricklet_gps_v2.rb +2 -2
  44. data/lib/tinkerforge/bricklet_hall_effect.rb +2 -2
  45. data/lib/tinkerforge/bricklet_hall_effect_v2.rb +333 -0
  46. data/lib/tinkerforge/bricklet_humidity.rb +2 -2
  47. data/lib/tinkerforge/bricklet_humidity_v2.rb +2 -2
  48. data/lib/tinkerforge/bricklet_industrial_analog_out.rb +2 -2
  49. data/lib/tinkerforge/bricklet_industrial_analog_out_v2.rb +2 -2
  50. data/lib/tinkerforge/bricklet_industrial_counter.rb +2 -2
  51. data/lib/tinkerforge/bricklet_industrial_digital_in_4.rb +3 -3
  52. data/lib/tinkerforge/bricklet_industrial_digital_in_4_v2.rb +2 -2
  53. data/lib/tinkerforge/bricklet_industrial_digital_out_4.rb +9 -4
  54. data/lib/tinkerforge/bricklet_industrial_digital_out_4_v2.rb +12 -2
  55. data/lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb +2 -2
  56. data/lib/tinkerforge/bricklet_industrial_dual_0_20ma_v2.rb +2 -2
  57. data/lib/tinkerforge/bricklet_industrial_dual_analog_in.rb +2 -2
  58. data/lib/tinkerforge/bricklet_industrial_dual_analog_in_v2.rb +2 -2
  59. data/lib/tinkerforge/bricklet_industrial_dual_relay.rb +6 -3
  60. data/lib/tinkerforge/bricklet_industrial_quad_relay.rb +9 -4
  61. data/lib/tinkerforge/bricklet_industrial_quad_relay_v2.rb +7 -2
  62. data/lib/tinkerforge/bricklet_io16.rb +11 -2
  63. data/lib/tinkerforge/bricklet_io16_v2.rb +10 -2
  64. data/lib/tinkerforge/bricklet_io4.rb +10 -2
  65. data/lib/tinkerforge/bricklet_io4_v2.rb +15 -2
  66. data/lib/tinkerforge/bricklet_isolator.rb +2 -2
  67. data/lib/tinkerforge/bricklet_joystick.rb +9 -9
  68. data/lib/tinkerforge/bricklet_joystick_v2.rb +294 -0
  69. data/lib/tinkerforge/bricklet_laser_range_finder.rb +3 -3
  70. data/lib/tinkerforge/bricklet_laser_range_finder_v2.rb +447 -0
  71. data/lib/tinkerforge/bricklet_lcd_128x64.rb +2 -2
  72. data/lib/tinkerforge/bricklet_lcd_16x2.rb +2 -2
  73. data/lib/tinkerforge/bricklet_lcd_20x4.rb +2 -2
  74. data/lib/tinkerforge/bricklet_led_strip.rb +2 -2
  75. data/lib/tinkerforge/bricklet_led_strip_v2.rb +2 -2
  76. data/lib/tinkerforge/bricklet_line.rb +2 -2
  77. data/lib/tinkerforge/bricklet_linear_poti.rb +2 -2
  78. data/lib/tinkerforge/bricklet_linear_poti_v2.rb +259 -0
  79. data/lib/tinkerforge/bricklet_load_cell.rb +2 -2
  80. data/lib/tinkerforge/bricklet_load_cell_v2.rb +2 -2
  81. data/lib/tinkerforge/bricklet_moisture.rb +2 -2
  82. data/lib/tinkerforge/bricklet_motion_detector.rb +3 -3
  83. data/lib/tinkerforge/bricklet_motion_detector_v2.rb +5 -7
  84. data/lib/tinkerforge/bricklet_motorized_linear_poti.rb +2 -2
  85. data/lib/tinkerforge/bricklet_multi_touch.rb +2 -2
  86. data/lib/tinkerforge/bricklet_nfc.rb +2 -2
  87. data/lib/tinkerforge/bricklet_nfc_rfid.rb +2 -2
  88. data/lib/tinkerforge/bricklet_oled_128x64.rb +2 -2
  89. data/lib/tinkerforge/bricklet_oled_128x64_v2.rb +2 -2
  90. data/lib/tinkerforge/bricklet_oled_64x48.rb +2 -2
  91. data/lib/tinkerforge/bricklet_one_wire.rb +2 -2
  92. data/lib/tinkerforge/bricklet_outdoor_weather.rb +14 -2
  93. data/lib/tinkerforge/bricklet_particulate_matter.rb +2 -2
  94. data/lib/tinkerforge/bricklet_piezo_buzzer.rb +2 -2
  95. data/lib/tinkerforge/bricklet_piezo_speaker.rb +2 -2
  96. data/lib/tinkerforge/bricklet_piezo_speaker_v2.rb +311 -0
  97. data/lib/tinkerforge/bricklet_ptc.rb +2 -2
  98. data/lib/tinkerforge/bricklet_ptc_v2.rb +2 -2
  99. data/lib/tinkerforge/bricklet_real_time_clock.rb +2 -2
  100. data/lib/tinkerforge/bricklet_real_time_clock_v2.rb +2 -2
  101. data/lib/tinkerforge/bricklet_remote_switch.rb +2 -2
  102. data/lib/tinkerforge/bricklet_remote_switch_v2.rb +3 -3
  103. data/lib/tinkerforge/bricklet_rgb_led.rb +4 -4
  104. data/lib/tinkerforge/bricklet_rgb_led_button.rb +2 -2
  105. data/lib/tinkerforge/bricklet_rgb_led_matrix.rb +2 -2
  106. data/lib/tinkerforge/bricklet_rgb_led_v2.rb +203 -0
  107. data/lib/tinkerforge/bricklet_rotary_encoder.rb +2 -2
  108. data/lib/tinkerforge/bricklet_rotary_encoder_v2.rb +2 -2
  109. data/lib/tinkerforge/bricklet_rotary_poti.rb +2 -2
  110. data/lib/tinkerforge/bricklet_rs232.rb +2 -2
  111. data/lib/tinkerforge/bricklet_rs232_v2.rb +2 -2
  112. data/lib/tinkerforge/bricklet_rs485.rb +2 -2
  113. data/lib/tinkerforge/bricklet_segment_display_4x7.rb +2 -2
  114. data/lib/tinkerforge/bricklet_segment_display_4x7_v2.rb +309 -0
  115. data/lib/tinkerforge/bricklet_solid_state_relay.rb +3 -3
  116. data/lib/tinkerforge/bricklet_solid_state_relay_v2.rb +3 -3
  117. data/lib/tinkerforge/bricklet_sound_intensity.rb +2 -2
  118. data/lib/tinkerforge/bricklet_sound_pressure_level.rb +2 -2
  119. data/lib/tinkerforge/bricklet_temperature.rb +2 -2
  120. data/lib/tinkerforge/bricklet_temperature_ir.rb +2 -2
  121. data/lib/tinkerforge/bricklet_temperature_ir_v2.rb +5 -2
  122. data/lib/tinkerforge/bricklet_temperature_v2.rb +2 -2
  123. data/lib/tinkerforge/bricklet_thermal_imaging.rb +4 -4
  124. data/lib/tinkerforge/bricklet_thermocouple.rb +2 -2
  125. data/lib/tinkerforge/bricklet_thermocouple_v2.rb +2 -2
  126. data/lib/tinkerforge/bricklet_tilt.rb +2 -2
  127. data/lib/tinkerforge/bricklet_uv_light.rb +2 -2
  128. data/lib/tinkerforge/bricklet_uv_light_v2.rb +2 -2
  129. data/lib/tinkerforge/bricklet_voltage.rb +2 -2
  130. data/lib/tinkerforge/bricklet_voltage_current.rb +2 -2
  131. data/lib/tinkerforge/bricklet_voltage_current_v2.rb +2 -2
  132. data/lib/tinkerforge/ip_connection.rb +21 -4
  133. data/lib/tinkerforge/version.rb +1 -1
  134. metadata +14 -3
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -456,7 +456,8 @@ module Tinkerforge
456
456
  send_request FUNCTION_GET_EXTENSION_TYPE, [extension], 'C', 4, 'L'
457
457
  end
458
458
 
459
- # Returns *true* if a Chibi Extension is available to be used by the Master Brick.
459
+ # Returns *true* if the Master Brick is at position 0 in the stack and a Chibi
460
+ # Extension is available.
460
461
  def is_chibi_present
461
462
  send_request FUNCTION_IS_CHIBI_PRESENT, [], '', 1, '?'
462
463
  end
@@ -572,7 +573,8 @@ module Tinkerforge
572
573
  send_request FUNCTION_GET_CHIBI_CHANNEL, [], '', 1, 'C'
573
574
  end
574
575
 
575
- # Returns *true* if a RS485 Extension is available to be used by the Master Brick.
576
+ # Returns *true* if the Master Brick is at position 0 in the stack and a RS485
577
+ # Extension is available.
576
578
  def is_rs485_present
577
579
  send_request FUNCTION_IS_RS485_PRESENT, [], '', 1, '?'
578
580
  end
@@ -648,7 +650,8 @@ module Tinkerforge
648
650
  send_request FUNCTION_GET_RS485_CONFIGURATION, [], '', 6, 'L k C'
649
651
  end
650
652
 
651
- # Returns *true* if a WIFI Extension is available to be used by the Master Brick.
653
+ # Returns *true* if the Master Brick is at position 0 in the stack and a WIFI
654
+ # Extension is available.
652
655
  def is_wifi_present
653
656
  send_request FUNCTION_IS_WIFI_PRESENT, [], '', 1, '?'
654
657
  end
@@ -1058,8 +1061,8 @@ module Tinkerforge
1058
1061
  send_request FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L'
1059
1062
  end
1060
1063
 
1061
- # Returns *true* if a Ethernet Extension is available to be used by the Master
1062
- # Brick.
1064
+ # Returns *true* if the Master Brick is at position 0 in the stack and an Ethernet
1065
+ # Extension is available.
1063
1066
  #
1064
1067
  # .. versionadded:: 2.1.0$nbsp;(Firmware)
1065
1068
  def is_ethernet_present
@@ -1224,8 +1227,8 @@ module Tinkerforge
1224
1227
  send_request FUNCTION_GET_CONNECTION_TYPE, [], '', 1, 'C'
1225
1228
  end
1226
1229
 
1227
- # Returns *true* if a WIFI Extension 2.0 is available to be used by the Master
1228
- # Brick.
1230
+ # Returns *true* if the Master Brick is at position 0 in the stack and a WIFI
1231
+ # Extension 2.0 is available.
1229
1232
  #
1230
1233
  # .. versionadded:: 2.4.0$nbsp;(Firmware)
1231
1234
  def is_wifi2_present
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -10,7 +10,7 @@
10
10
  #############################################################
11
11
 
12
12
  module Tinkerforge
13
- #
13
+ # Measures acceleration in three axis
14
14
  class BrickletAccelerometerV2 < Device
15
15
  DEVICE_IDENTIFIER = 2130 # :nodoc:
16
16
  DEVICE_DISPLAY_NAME = 'Accelerometer Bricklet 2.0' # :nodoc:
@@ -25,6 +25,8 @@ module Tinkerforge
25
25
  # be configured with BrickletAccelerometerV2#set_configuration and this callback can be
26
26
  # enabled with BrickletAccelerometerV2#set_continuous_acceleration_configuration.
27
27
  #
28
+ # The unit of the values is g/10000.
29
+ #
28
30
  # The data is formated in the sequence "x, y, z, x, y, z, ..." depending on
29
31
  # the enabled axis. Examples:
30
32
  #
@@ -37,6 +39,8 @@ module Tinkerforge
37
39
  # be configured with BrickletAccelerometerV2#set_configuration and this callback can be
38
40
  # enabled with BrickletAccelerometerV2#set_continuous_acceleration_configuration.
39
41
  #
42
+ # The unit of the values is g*256/10000.
43
+ #
40
44
  # The data is formated in the sequence "x, y, z, x, y, z, ..." depending on
41
45
  # the enabled axis. Examples:
42
46
  #
@@ -152,16 +156,16 @@ module Tinkerforge
152
156
  send_request FUNCTION_GET_ACCELERATION, [], '', 12, 'l l l'
153
157
  end
154
158
 
155
- # Configures the data rate, full scale range and filter bandwidth.
159
+ # Configures the data rate and full scale range.
156
160
  # Possible values are:
157
161
  #
158
162
  # * Data rate of 0.781Hz to 25600Hz.
159
- # * Full scale range of -2G to +2G up to -8G to +8G.
163
+ # * Full scale range of -2g to +2g up to -8g to +8g.
160
164
  #
161
165
  # Decreasing data rate or full scale range will also decrease the noise on
162
166
  # the data.
163
167
  #
164
- # The default values are 100Hz data rate and -2G to +2G range.
168
+ # The default values are 100Hz data rate and -2g to +2g range.
165
169
  def set_configuration(data_rate, full_scale)
166
170
  send_request FUNCTION_SET_CONFIGURATION, [data_rate, full_scale], 'C C', 0, ''
167
171
  end
@@ -181,6 +185,9 @@ module Tinkerforge
181
185
  # If it is set to false, the callback is continuously triggered with the period,
182
186
  # independent of the value.
183
187
  #
188
+ # If this callback is enabled, the CALLBACK_CONTINUOUS_ACCELERATION_16_BIT callback
189
+ # and CALLBACK_CONTINUOUS_ACCELERATION_8_BIT callback will automatically be disabled.
190
+ #
184
191
  # The default value is (0, false).
185
192
  def set_acceleration_callback_configuration(period, value_has_to_change)
186
193
  send_request FUNCTION_SET_ACCELERATION_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
@@ -215,6 +222,9 @@ module Tinkerforge
215
222
  # one of the axis is enabled and the resolution is set to 16 bit,
216
223
  # the CALLBACK_CONTINUOUS_ACCELERATION_16_BIT callback is activated.
217
224
  #
225
+ # If a resolution of 8 bit is used, only the 8 most significant bits will be
226
+ # transferred. This means that the unit changes from g/10000 to g*256/10000.
227
+ #
218
228
  # If no axis is enabled, both callbacks are disabled. If one of the continuous
219
229
  # callbacks is enabled, the CALLBACK_ACCELERATION callback is disabled.
220
230
  #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -62,6 +62,9 @@ module Tinkerforge
62
62
  FUNCTION_GET_AIR_PRESSURE = 19 # :nodoc:
63
63
  FUNCTION_SET_AIR_PRESSURE_CALLBACK_CONFIGURATION = 20 # :nodoc:
64
64
  FUNCTION_GET_AIR_PRESSURE_CALLBACK_CONFIGURATION = 21 # :nodoc:
65
+ FUNCTION_REMOVE_CALIBRATION = 23 # :nodoc:
66
+ FUNCTION_SET_BACKGROUND_CALIBRATION_DURATION = 24 # :nodoc:
67
+ FUNCTION_GET_BACKGROUND_CALIBRATION_DURATION = 25 # :nodoc:
65
68
  FUNCTION_GET_SPITFP_ERROR_COUNT = 234 # :nodoc:
66
69
  FUNCTION_SET_BOOTLOADER_MODE = 235 # :nodoc:
67
70
  FUNCTION_GET_BOOTLOADER_MODE = 236 # :nodoc:
@@ -84,6 +87,8 @@ module Tinkerforge
84
87
  THRESHOLD_OPTION_INSIDE = 'i' # :nodoc:
85
88
  THRESHOLD_OPTION_SMALLER = '<' # :nodoc:
86
89
  THRESHOLD_OPTION_GREATER = '>' # :nodoc:
90
+ DURATION_4_DAYS = 0 # :nodoc:
91
+ DURATION_28_DAYS = 1 # :nodoc:
87
92
  BOOTLOADER_MODE_BOOTLOADER = 0 # :nodoc:
88
93
  BOOTLOADER_MODE_FIRMWARE = 1 # :nodoc:
89
94
  BOOTLOADER_MODE_BOOTLOADER_WAIT_FOR_REBOOT = 2 # :nodoc:
@@ -105,7 +110,7 @@ module Tinkerforge
105
110
  def initialize(uid, ipcon)
106
111
  super uid, ipcon
107
112
 
108
- @api_version = [2, 0, 0]
113
+ @api_version = [2, 0, 1]
109
114
 
110
115
  @response_expected[FUNCTION_GET_ALL_VALUES] = RESPONSE_EXPECTED_ALWAYS_TRUE
111
116
  @response_expected[FUNCTION_SET_TEMPERATURE_OFFSET] = RESPONSE_EXPECTED_FALSE
@@ -124,6 +129,9 @@ module Tinkerforge
124
129
  @response_expected[FUNCTION_GET_AIR_PRESSURE] = RESPONSE_EXPECTED_ALWAYS_TRUE
125
130
  @response_expected[FUNCTION_SET_AIR_PRESSURE_CALLBACK_CONFIGURATION] = RESPONSE_EXPECTED_TRUE
126
131
  @response_expected[FUNCTION_GET_AIR_PRESSURE_CALLBACK_CONFIGURATION] = RESPONSE_EXPECTED_ALWAYS_TRUE
132
+ @response_expected[FUNCTION_REMOVE_CALIBRATION] = RESPONSE_EXPECTED_FALSE
133
+ @response_expected[FUNCTION_SET_BACKGROUND_CALIBRATION_DURATION] = RESPONSE_EXPECTED_FALSE
134
+ @response_expected[FUNCTION_GET_BACKGROUND_CALIBRATION_DURATION] = RESPONSE_EXPECTED_ALWAYS_TRUE
127
135
  @response_expected[FUNCTION_GET_SPITFP_ERROR_COUNT] = RESPONSE_EXPECTED_ALWAYS_TRUE
128
136
  @response_expected[FUNCTION_SET_BOOTLOADER_MODE] = RESPONSE_EXPECTED_ALWAYS_TRUE
129
137
  @response_expected[FUNCTION_GET_BOOTLOADER_MODE] = RESPONSE_EXPECTED_ALWAYS_TRUE
@@ -387,6 +395,54 @@ module Tinkerforge
387
395
  send_request FUNCTION_GET_AIR_PRESSURE_CALLBACK_CONFIGURATION, [], '', 14, 'L ? k l l'
388
396
  end
389
397
 
398
+ # Deletes the calibration from flash. After you call this function,
399
+ # you need to power cycle the Air Quality Bricklet.
400
+ #
401
+ # On the next power up the Bricklet will start a new calibration, as
402
+ # if it was started for the very first time.
403
+ #
404
+ # The calibration is based on the data of the last four days, so it takes
405
+ # four days until a full calibration is re-established.
406
+ #
407
+ # .. versionadded:: 2.0.3$nbsp;(Plugin)
408
+ def remove_calibration
409
+ send_request FUNCTION_REMOVE_CALIBRATION, [], '', 0, ''
410
+ end
411
+
412
+ # The Air Quality Bricklet uses an automatic background calibration mechanism to
413
+ # calculate the IAQ Index. This calibration mechanism considers a history of
414
+ # measured data. The duration of this history can be configured to either be
415
+ # 4 days or 28 days.
416
+ #
417
+ # If you keep the Bricklet mostly at one place and it does not get moved around
418
+ # to different environments, we recommend that you use a duration of 28 days.
419
+ #
420
+ # If you change the duration, the current calibration will be discarded and
421
+ # the calibration will start from beginning again. The configuration of the
422
+ # duration is saved in flash, so you should only have to call this function
423
+ # once in the lifetime of the Bricklet.
424
+ #
425
+ # The Bricklet has to be power cycled after this function is called
426
+ # for a duration change to take effect.
427
+ #
428
+ # Before firmware version 2.0.3 this was not configurable and the duration was
429
+ # 4 days.
430
+ #
431
+ # The default value (since firmware version 2.0.3) is 28 days.
432
+ #
433
+ # .. versionadded:: 2.0.3$nbsp;(Plugin)
434
+ def set_background_calibration_duration(duration)
435
+ send_request FUNCTION_SET_BACKGROUND_CALIBRATION_DURATION, [duration], 'C', 0, ''
436
+ end
437
+
438
+ # Returns the background calibration duration as set by
439
+ # BrickletAirQuality#set_background_calibration_duration.
440
+ #
441
+ # .. versionadded:: 2.0.3$nbsp;(Plugin)
442
+ def get_background_calibration_duration
443
+ send_request FUNCTION_GET_BACKGROUND_CALIBRATION_DURATION, [], '', 1, 'C'
444
+ end
445
+
390
446
  # Returns the error count for the communication between Brick and Bricklet.
391
447
  #
392
448
  # The errors are divided into
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -10,7 +10,7 @@
10
10
  #############################################################
11
11
 
12
12
  module Tinkerforge
13
- #
13
+ # Measures ambient light up to 64000lux
14
14
  class BrickletAmbientLightV3 < Device
15
15
  DEVICE_IDENTIFIER = 2131 # :nodoc:
16
16
  DEVICE_DISPLAY_NAME = 'Ambient Light Bricklet 3.0' # :nodoc:
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-01-29. #
3
+ # This file was automatically generated on 2019-05-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.21 #
5
+ # Ruby Bindings Version 2.1.22 #
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 #