tinkerforge 2.1.11 → 2.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. data/lib/tinkerforge/brick_dc.rb +31 -9
  2. data/lib/tinkerforge/brick_imu.rb +62 -40
  3. data/lib/tinkerforge/brick_imu_v2.rb +70 -42
  4. data/lib/tinkerforge/brick_master.rb +47 -23
  5. data/lib/tinkerforge/brick_red.rb +3 -3
  6. data/lib/tinkerforge/brick_servo.rb +40 -18
  7. data/lib/tinkerforge/brick_silent_stepper.rb +829 -0
  8. data/lib/tinkerforge/brick_stepper.rb +47 -25
  9. data/lib/tinkerforge/bricklet_accelerometer.rb +11 -11
  10. data/lib/tinkerforge/bricklet_ambient_light.rb +12 -12
  11. data/lib/tinkerforge/bricklet_ambient_light_v2.rb +8 -8
  12. data/lib/tinkerforge/bricklet_analog_in.rb +18 -18
  13. data/lib/tinkerforge/bricklet_analog_in_v2.rb +15 -15
  14. data/lib/tinkerforge/bricklet_analog_out.rb +3 -3
  15. data/lib/tinkerforge/bricklet_analog_out_v2.rb +3 -3
  16. data/lib/tinkerforge/bricklet_barometer.rb +19 -19
  17. data/lib/tinkerforge/bricklet_can.rb +20 -7
  18. data/lib/tinkerforge/bricklet_co2.rb +14 -14
  19. data/lib/tinkerforge/bricklet_color.rb +19 -19
  20. data/lib/tinkerforge/bricklet_current12.rb +16 -16
  21. data/lib/tinkerforge/bricklet_current25.rb +15 -15
  22. data/lib/tinkerforge/bricklet_distance_ir.rb +14 -14
  23. data/lib/tinkerforge/bricklet_distance_us.rb +9 -9
  24. data/lib/tinkerforge/bricklet_dual_button.rb +5 -5
  25. data/lib/tinkerforge/bricklet_dual_relay.rb +13 -13
  26. data/lib/tinkerforge/bricklet_dust_detector.rb +11 -11
  27. data/lib/tinkerforge/bricklet_gps.rb +21 -21
  28. data/lib/tinkerforge/bricklet_hall_effect.rb +12 -10
  29. data/lib/tinkerforge/bricklet_humidity.rb +21 -21
  30. data/lib/tinkerforge/bricklet_industrial_analog_out.rb +3 -3
  31. data/lib/tinkerforge/bricklet_industrial_digital_in_4.rb +4 -4
  32. data/lib/tinkerforge/bricklet_industrial_digital_out_4.rb +4 -4
  33. data/lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb +6 -6
  34. data/lib/tinkerforge/bricklet_industrial_dual_analog_in.rb +6 -6
  35. data/lib/tinkerforge/bricklet_industrial_quad_relay.rb +5 -5
  36. data/lib/tinkerforge/bricklet_io16.rb +5 -5
  37. data/lib/tinkerforge/bricklet_io4.rb +5 -5
  38. data/lib/tinkerforge/bricklet_joystick.rb +16 -16
  39. data/lib/tinkerforge/bricklet_laser_range_finder.rb +99 -30
  40. data/lib/tinkerforge/bricklet_lcd_16x2.rb +5 -5
  41. data/lib/tinkerforge/bricklet_lcd_20x4.rb +5 -5
  42. data/lib/tinkerforge/bricklet_led_strip.rb +3 -3
  43. data/lib/tinkerforge/bricklet_line.rb +12 -12
  44. data/lib/tinkerforge/bricklet_linear_poti.rb +21 -21
  45. data/lib/tinkerforge/bricklet_load_cell.rb +10 -10
  46. data/lib/tinkerforge/bricklet_moisture.rb +12 -12
  47. data/lib/tinkerforge/bricklet_motion_detector.rb +5 -5
  48. data/lib/tinkerforge/bricklet_multi_touch.rb +3 -3
  49. data/lib/tinkerforge/bricklet_nfc_rfid.rb +20 -20
  50. data/lib/tinkerforge/bricklet_oled_128x64.rb +7 -7
  51. data/lib/tinkerforge/bricklet_oled_64x48.rb +6 -6
  52. data/lib/tinkerforge/bricklet_piezo_buzzer.rb +4 -4
  53. data/lib/tinkerforge/bricklet_piezo_speaker.rb +5 -5
  54. data/lib/tinkerforge/bricklet_ptc.rb +21 -21
  55. data/lib/tinkerforge/bricklet_real_time_clock.rb +7 -7
  56. data/lib/tinkerforge/bricklet_remote_switch.rb +3 -3
  57. data/lib/tinkerforge/bricklet_rgb_led.rb +3 -3
  58. data/lib/tinkerforge/bricklet_rotary_encoder.rb +6 -6
  59. data/lib/tinkerforge/bricklet_rotary_poti.rb +23 -23
  60. data/lib/tinkerforge/bricklet_rs232.rb +19 -16
  61. data/lib/tinkerforge/bricklet_segment_display_4x7.rb +5 -5
  62. data/lib/tinkerforge/bricklet_solid_state_relay.rb +12 -12
  63. data/lib/tinkerforge/bricklet_sound_intensity.rb +13 -12
  64. data/lib/tinkerforge/bricklet_temperature.rb +12 -12
  65. data/lib/tinkerforge/bricklet_temperature_ir.rb +30 -30
  66. data/lib/tinkerforge/bricklet_thermocouple.rb +13 -13
  67. data/lib/tinkerforge/bricklet_tilt.rb +3 -3
  68. data/lib/tinkerforge/bricklet_uv_light.rb +10 -10
  69. data/lib/tinkerforge/bricklet_voltage.rb +18 -18
  70. data/lib/tinkerforge/bricklet_voltage_current.rb +23 -23
  71. data/lib/tinkerforge/version.rb +1 -1
  72. metadata +3 -2
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2017-01-25. #
3
+ # This file was automatically generated on 2017-04-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.11 #
5
+ # Ruby Bindings Version 2.1.12 #
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 #
@@ -143,7 +143,7 @@ module Tinkerforge
143
143
  send_request(FUNCTION_SWITCH_SOCKET_C, [system_code, device_code, switch_to], 'k C C', 0, '')
144
144
  end
145
145
 
146
- # Returns the UID, the UID where the Bricklet is connected to,
146
+ # Returns the UID, the UID where the Bricklet is connected to,
147
147
  # the position, the hardware and firmware version as well as the
148
148
  # device identifier.
149
149
  #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2017-01-25. #
3
+ # This file was automatically generated on 2017-04-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.11 #
5
+ # Ruby Bindings Version 2.1.12 #
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 #
@@ -43,7 +43,7 @@ module Tinkerforge
43
43
  send_request(FUNCTION_GET_RGB_VALUE, [], '', 3, 'C C C')
44
44
  end
45
45
 
46
- # Returns the UID, the UID where the Bricklet is connected to,
46
+ # Returns the UID, the UID where the Bricklet is connected to,
47
47
  # the position, the hardware and firmware version as well as the
48
48
  # device identifier.
49
49
  #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2017-01-25. #
3
+ # This file was automatically generated on 2017-04-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.11 #
5
+ # Ruby Bindings Version 2.1.12 #
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,7 +19,7 @@ module Tinkerforge
19
19
  # BrickletRotaryEncoder#set_count_callback_period. The parameter is the count of
20
20
  # the encoder.
21
21
  #
22
- # CALLBACK_COUNT is only triggered if the count has changed since the
22
+ # The CALLBACK_COUNT callback is only triggered if the count has changed since the
23
23
  # last triggering.
24
24
  CALLBACK_COUNT = 8
25
25
 
@@ -95,7 +95,7 @@ module Tinkerforge
95
95
  # Sets the period in ms with which the CALLBACK_COUNT callback is triggered
96
96
  # periodically. A value of 0 turns the callback off.
97
97
  #
98
- # CALLBACK_COUNT is only triggered if the count has changed since the
98
+ # The CALLBACK_COUNT callback is only triggered if the count has changed since the
99
99
  # last triggering.
100
100
  #
101
101
  # The default value is 0.
@@ -108,7 +108,7 @@ module Tinkerforge
108
108
  send_request(FUNCTION_GET_COUNT_CALLBACK_PERIOD, [], '', 4, 'L')
109
109
  end
110
110
 
111
- # Sets the thresholds for the CALLBACK_COUNT_REACHED callback.
111
+ # Sets the thresholds for the CALLBACK_COUNT_REACHED callback.
112
112
  #
113
113
  # The following options are possible:
114
114
  #
@@ -158,7 +158,7 @@ module Tinkerforge
158
158
  send_request(FUNCTION_IS_PRESSED, [], '', 1, '?')
159
159
  end
160
160
 
161
- # Returns the UID, the UID where the Bricklet is connected to,
161
+ # Returns the UID, the UID where the Bricklet is connected to,
162
162
  # the position, the hardware and firmware version as well as the
163
163
  # device identifier.
164
164
  #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2017-01-25. #
3
+ # This file was automatically generated on 2017-04-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.11 #
5
+ # Ruby Bindings Version 2.1.12 #
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,24 +16,24 @@ module Tinkerforge
16
16
  DEVICE_DISPLAY_NAME = 'Rotary Poti Bricklet' # :nodoc:
17
17
 
18
18
  # This callback is triggered periodically with the period that is set by
19
- # BrickletRotaryPoti#set_position_callback_period. The parameter is the position of the
20
- # Rotary Potentiometer.
19
+ # BrickletRotaryPoti#set_position_callback_period. The parameter is the position of
20
+ # the rotary potentiometer.
21
21
  #
22
- # CALLBACK_POSITION is only triggered if the position has changed since the
23
- # last triggering.
22
+ # The CALLBACK_POSITION callback is only triggered if the position has changed since
23
+ # the last triggering.
24
24
  CALLBACK_POSITION = 13
25
25
 
26
26
  # This callback is triggered periodically with the period that is set by
27
- # BrickletRotaryPoti#set_analog_value_callback_period. The parameter is the analog value of the
28
- # Rotary Potentiometer.
27
+ # BrickletRotaryPoti#set_analog_value_callback_period. The parameter is the
28
+ # analog value of the rotary potentiometer.
29
29
  #
30
- # CALLBACK_ANALOG_VALUE is only triggered if the position has changed since the
31
- # last triggering.
30
+ # The CALLBACK_ANALOG_VALUE callback is only triggered if the position has changed
31
+ # since the last triggering.
32
32
  CALLBACK_ANALOG_VALUE = 14
33
33
 
34
34
  # This callback is triggered when the threshold as set by
35
35
  # BrickletRotaryPoti#set_position_callback_threshold is reached.
36
- # The parameter is the position of the Rotary Potentiometer.
36
+ # The parameter is the position of the rotary potentiometer.
37
37
  #
38
38
  # If the threshold keeps being reached, the callback is triggered periodically
39
39
  # with the period as set by BrickletRotaryPoti#set_debounce_period.
@@ -41,7 +41,7 @@ module Tinkerforge
41
41
 
42
42
  # This callback is triggered when the threshold as set by
43
43
  # BrickletRotaryPoti#set_analog_value_callback_threshold is reached.
44
- # The parameter is the analog value of the Rotary Potentiometer.
44
+ # The parameter is the analog value of the rotary potentiometer.
45
45
  #
46
46
  # If the threshold keeps being reached, the callback is triggered periodically
47
47
  # with the period as set by BrickletRotaryPoti#set_debounce_period.
@@ -98,11 +98,11 @@ module Tinkerforge
98
98
  @callback_formats[CALLBACK_ANALOG_VALUE_REACHED] = 'S'
99
99
  end
100
100
 
101
- # Returns the position of the Rotary Potentiometer. The value is in degree
101
+ # Returns the position of the rotary potentiometer. The value is in degree
102
102
  # and between -150° (turned left) and 150° (turned right).
103
103
  #
104
104
  # If you want to get the position periodically, it is recommended to use the
105
- # callback CALLBACK_POSITION and set the period with
105
+ # CALLBACK_POSITION callback and set the period with
106
106
  # BrickletRotaryPoti#set_position_callback_period.
107
107
  def get_position
108
108
  send_request(FUNCTION_GET_POSITION, [], '', 2, 's')
@@ -117,8 +117,8 @@ module Tinkerforge
117
117
  # unfiltered analog values. The only reason to use BrickletRotaryPoti#get_analog_value is,
118
118
  # if you need the full resolution of the analog-to-digital converter.
119
119
  #
120
- # If you want the analog value periodically, it is recommended to use the
121
- # callback CALLBACK_ANALOG_VALUE and set the period with
120
+ # If you want the analog value periodically, it is recommended to use the
121
+ # CALLBACK_ANALOG_VALUE callback and set the period with
122
122
  # BrickletRotaryPoti#set_analog_value_callback_period.
123
123
  def get_analog_value
124
124
  send_request(FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S')
@@ -127,8 +127,8 @@ module Tinkerforge
127
127
  # Sets the period in ms with which the CALLBACK_POSITION callback is triggered
128
128
  # periodically. A value of 0 turns the callback off.
129
129
  #
130
- # CALLBACK_POSITION is only triggered if the position has changed since the
131
- # last triggering.
130
+ # The CALLBACK_POSITION callback is only triggered if the position has changed since
131
+ # the last triggering.
132
132
  #
133
133
  # The default value is 0.
134
134
  def set_position_callback_period(period)
@@ -143,8 +143,8 @@ module Tinkerforge
143
143
  # Sets the period in ms with which the CALLBACK_ANALOG_VALUE callback is triggered
144
144
  # periodically. A value of 0 turns the callback off.
145
145
  #
146
- # CALLBACK_ANALOG_VALUE is only triggered if the analog value has changed since the
147
- # last triggering.
146
+ # The CALLBACK_ANALOG_VALUE callback is only triggered if the analog value has
147
+ # changed since the last triggering.
148
148
  #
149
149
  # The default value is 0.
150
150
  def set_analog_value_callback_period(period)
@@ -156,7 +156,7 @@ module Tinkerforge
156
156
  send_request(FUNCTION_GET_ANALOG_VALUE_CALLBACK_PERIOD, [], '', 4, 'L')
157
157
  end
158
158
 
159
- # Sets the thresholds for the CALLBACK_POSITION_REACHED callback.
159
+ # Sets the thresholds for the CALLBACK_POSITION_REACHED callback.
160
160
  #
161
161
  # The following options are possible:
162
162
  #
@@ -178,7 +178,7 @@ module Tinkerforge
178
178
  send_request(FUNCTION_GET_POSITION_CALLBACK_THRESHOLD, [], '', 5, 'k s s')
179
179
  end
180
180
 
181
- # Sets the thresholds for the CALLBACK_ANALOG_VALUE_REACHED callback.
181
+ # Sets the thresholds for the CALLBACK_ANALOG_VALUE_REACHED callback.
182
182
  #
183
183
  # The following options are possible:
184
184
  #
@@ -222,7 +222,7 @@ module Tinkerforge
222
222
  send_request(FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L')
223
223
  end
224
224
 
225
- # Returns the UID, the UID where the Bricklet is connected to,
225
+ # Returns the UID, the UID where the Bricklet is connected to,
226
226
  # the position, the hardware and firmware version as well as the
227
227
  # device identifier.
228
228
  #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2017-01-25. #
3
+ # This file was automatically generated on 2017-04-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.11 #
5
+ # Ruby Bindings Version 2.1.12 #
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 #
@@ -20,13 +20,16 @@ module Tinkerforge
20
20
  # is given in addition.
21
21
  #
22
22
  # To enable this callback, use BrickletRS232#enable_read_callback.
23
- CALLBACK_READ_CALLBACK = 8
23
+ CALLBACK_READ = 8
24
24
 
25
- # This callback is called if an error occurs.
25
+ # This callback is called if an error occurs.
26
26
  # Possible errors are overrun, parity or framing error.
27
27
  #
28
28
  # .. versionadded:: 2.0.1$nbsp;(Plugin)
29
- CALLBACK_ERROR_CALLBACK = 9
29
+ CALLBACK_ERROR = 9
30
+
31
+ CALLBACK_READ_CALLBACK = 8 # :nodoc: for backward compatibility
32
+ CALLBACK_ERROR_CALLBACK = 9 # :nodoc: for backward compatibility
30
33
 
31
34
  FUNCTION_WRITE = 1 # :nodoc:
32
35
  FUNCTION_READ = 2 # :nodoc:
@@ -84,13 +87,13 @@ module Tinkerforge
84
87
  @response_expected[FUNCTION_IS_READ_CALLBACK_ENABLED] = RESPONSE_EXPECTED_ALWAYS_TRUE
85
88
  @response_expected[FUNCTION_SET_CONFIGURATION] = RESPONSE_EXPECTED_FALSE
86
89
  @response_expected[FUNCTION_GET_CONFIGURATION] = RESPONSE_EXPECTED_ALWAYS_TRUE
87
- @response_expected[CALLBACK_READ_CALLBACK] = RESPONSE_EXPECTED_ALWAYS_FALSE
88
- @response_expected[CALLBACK_ERROR_CALLBACK] = RESPONSE_EXPECTED_ALWAYS_FALSE
90
+ @response_expected[CALLBACK_READ] = RESPONSE_EXPECTED_ALWAYS_FALSE
91
+ @response_expected[CALLBACK_ERROR] = RESPONSE_EXPECTED_ALWAYS_FALSE
89
92
  @response_expected[FUNCTION_SET_BREAK_CONDITION] = RESPONSE_EXPECTED_FALSE
90
93
  @response_expected[FUNCTION_GET_IDENTITY] = RESPONSE_EXPECTED_ALWAYS_TRUE
91
94
 
92
- @callback_formats[CALLBACK_READ_CALLBACK] = 'k60 C'
93
- @callback_formats[CALLBACK_ERROR_CALLBACK] = 'C'
95
+ @callback_formats[CALLBACK_READ] = 'k60 C'
96
+ @callback_formats[CALLBACK_ERROR] = 'C'
94
97
  end
95
98
 
96
99
  # Writes a string of up to 60 characters to the RS232 interface. The string
@@ -111,26 +114,26 @@ module Tinkerforge
111
114
  # new data available.
112
115
  #
113
116
  # Instead of polling with this function, you can also use
114
- # callbacks. See BrickletRS232#enable_read_callback and CALLBACK_READ_CALLBACK.
117
+ # callbacks. See BrickletRS232#enable_read_callback and CALLBACK_READ callback.
115
118
  def read
116
119
  send_request(FUNCTION_READ, [], '', 61, 'k60 C')
117
120
  end
118
121
 
119
- # Enables the CALLBACK_READ_CALLBACK.
122
+ # Enables the CALLBACK_READ callback.
120
123
  #
121
124
  # By default the callback is disabled.
122
125
  def enable_read_callback
123
126
  send_request(FUNCTION_ENABLE_READ_CALLBACK, [], '', 0, '')
124
127
  end
125
128
 
126
- # Disables the CALLBACK_READ_CALLBACK.
129
+ # Disables the CALLBACK_READ callback.
127
130
  #
128
131
  # By default the callback is disabled.
129
132
  def disable_read_callback
130
133
  send_request(FUNCTION_DISABLE_READ_CALLBACK, [], '', 0, '')
131
134
  end
132
135
 
133
- # Returns *true* if the CALLBACK_READ_CALLBACK is enabled,
136
+ # Returns *true* if the CALLBACK_READ callback is enabled,
134
137
  # *false* otherwise.
135
138
  def is_read_callback_enabled
136
139
  send_request(FUNCTION_IS_READ_CALLBACK_ENABLED, [], '', 1, '?')
@@ -154,15 +157,15 @@ module Tinkerforge
154
157
  send_request(FUNCTION_GET_CONFIGURATION, [], '', 6, 'C C C C C C')
155
158
  end
156
159
 
157
- # Sets a break condition (the TX output is forced to a logic 0 state).
158
- # The parameter sets the hold-time of the break condition (in ms).
160
+ # Sets a break condition (the TX output is forced to a logic 0 state).
161
+ # The parameter sets the hold-time of the break condition (in ms).
159
162
  #
160
163
  # .. versionadded:: 2.0.2$nbsp;(Plugin)
161
164
  def set_break_condition(break_time)
162
165
  send_request(FUNCTION_SET_BREAK_CONDITION, [break_time], 'S', 0, '')
163
166
  end
164
167
 
165
- # Returns the UID, the UID where the Bricklet is connected to,
168
+ # Returns the UID, the UID where the Bricklet is connected to,
166
169
  # the position, the hardware and firmware version as well as the
167
170
  # device identifier.
168
171
  #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2017-01-25. #
3
+ # This file was automatically generated on 2017-04-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.11 #
5
+ # Ruby Bindings Version 2.1.12 #
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 #
@@ -60,7 +60,7 @@ module Tinkerforge
60
60
  send_request(FUNCTION_SET_SEGMENTS, [segments, brightness, colon], 'C4 C ?', 0, '')
61
61
  end
62
62
 
63
- # Returns the segment, brightness and color data as set by
63
+ # Returns the segment, brightness and color data as set by
64
64
  # BrickletSegmentDisplay4x7#set_segments.
65
65
  def get_segments
66
66
  send_request(FUNCTION_GET_SEGMENTS, [], '', 6, 'C4 C ?')
@@ -74,7 +74,7 @@ module Tinkerforge
74
74
  # *length* to 1000, a counter that goes from 0 to 100 with one second
75
75
  # pause between each increment will be started.
76
76
  #
77
- # The maximum values for *from*, *to* and *increment* is 9999,
77
+ # The maximum values for *from*, *to* and *increment* is 9999,
78
78
  # the minimum value is -999.
79
79
  #
80
80
  # Using a negative increment allows to count backwards.
@@ -91,7 +91,7 @@ module Tinkerforge
91
91
  send_request(FUNCTION_GET_COUNTER_VALUE, [], '', 2, 'S')
92
92
  end
93
93
 
94
- # Returns the UID, the UID where the Bricklet is connected to,
94
+ # Returns the UID, the UID where the Bricklet is connected to,
95
95
  # the position, the hardware and firmware version as well as the
96
96
  # device identifier.
97
97
  #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2017-01-25. #
3
+ # This file was automatically generated on 2017-04-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.11 #
5
+ # Ruby Bindings Version 2.1.12 #
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,8 +15,8 @@ module Tinkerforge
15
15
  DEVICE_IDENTIFIER = 244 # :nodoc:
16
16
  DEVICE_DISPLAY_NAME = 'Solid State Relay Bricklet' # :nodoc:
17
17
 
18
- # This callback is triggered whenever the monoflop timer reaches 0.
19
- # The parameter is the current state of the relay
18
+ # This callback is triggered whenever the monoflop timer reaches 0.
19
+ # The parameter is the current state of the relay
20
20
  # (the state after the monoflop).
21
21
  CALLBACK_MONOFLOP_DONE = 5
22
22
 
@@ -44,7 +44,7 @@ module Tinkerforge
44
44
  @callback_formats[CALLBACK_MONOFLOP_DONE] = '?'
45
45
  end
46
46
 
47
- # Sets the state of the relays *true* means on and *false* means off.
47
+ # Sets the state of the relays *true* means on and *false* means off.
48
48
  #
49
49
  # Running monoflop timers will be overwritten if this function is called.
50
50
  #
@@ -58,23 +58,23 @@ module Tinkerforge
58
58
  send_request(FUNCTION_GET_STATE, [], '', 1, '?')
59
59
  end
60
60
 
61
- # The first parameter is the desired state of the relay (*true* means on
62
- # and *false* means off). The second parameter indicates the time (in ms) that
61
+ # The first parameter is the desired state of the relay (*true* means on
62
+ # and *false* means off). The second parameter indicates the time (in ms) that
63
63
  # the relay should hold the state.
64
64
  #
65
65
  # If this function is called with the parameters (true, 1500):
66
66
  # The relay will turn on and in 1.5s it will turn off again.
67
67
  #
68
- # A monoflop can be used as a failsafe mechanism. For example: Lets assume you
69
- # have a RS485 bus and a Solid State Relay Bricklet connected to one of the slave
68
+ # A monoflop can be used as a failsafe mechanism. For example: Lets assume you
69
+ # have a RS485 bus and a Solid State Relay Bricklet connected to one of the slave
70
70
  # stacks. You can now call this function every second, with a time parameter
71
- # of two seconds. The relay will be on all the time. If now the RS485
71
+ # of two seconds. The relay will be on all the time. If now the RS485
72
72
  # connection is lost, the relay will turn off in at most two seconds.
73
73
  def set_monoflop(state, time)
74
74
  send_request(FUNCTION_SET_MONOFLOP, [state, time], '? L', 0, '')
75
75
  end
76
76
 
77
- # Returns the current state and the time as set by
77
+ # Returns the current state and the time as set by
78
78
  # BrickletSolidStateRelay#set_monoflop as well as the remaining time until the state flips.
79
79
  #
80
80
  # If the timer is not running currently, the remaining time will be returned
@@ -83,7 +83,7 @@ module Tinkerforge
83
83
  send_request(FUNCTION_GET_MONOFLOP, [], '', 9, '? L L')
84
84
  end
85
85
 
86
- # Returns the UID, the UID where the Bricklet is connected to,
86
+ # Returns the UID, the UID where the Bricklet is connected to,
87
87
  # the position, the hardware and firmware version as well as the
88
88
  # device identifier.
89
89
  #
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2017-01-25. #
3
+ # This file was automatically generated on 2017-04-21. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.11 #
5
+ # Ruby Bindings Version 2.1.12 #
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 = 'Sound Intensity Bricklet' # :nodoc:
17
17
 
18
18
  # This callback is triggered periodically with the period that is set by
19
- # BrickletSoundIntensity#set_intensity_callback_period. The parameter is the intensity of
20
- # the encoder.
19
+ # BrickletSoundIntensity#set_intensity_callback_period. The parameter is the intensity
20
+ # of the sensor.
21
21
  #
22
- # CALLBACK_INTENSITY is only triggered if the intensity has changed since the
23
- # last triggering.
22
+ # The CALLBACK_INTENSITY callback is only triggered if the intensity has changed
23
+ # since the last triggering.
24
24
  CALLBACK_INTENSITY = 8
25
25
 
26
26
  # This callback is triggered when the threshold as set by
@@ -71,11 +71,12 @@ module Tinkerforge
71
71
  # Returns the current sound intensity. The value has a range of
72
72
  # 0 to 4095.
73
73
  #
74
- # The value corresponds to the `upper envelop <https://en.wikipedia.org/wiki/Envelope_(waves)>`__
74
+ # The value corresponds to the
75
+ # `upper envelop <https://en.wikipedia.org/wiki/Envelope_(waves)>`__
75
76
  # of the signal of the microphone capsule.
76
77
  #
77
78
  # If you want to get the intensity periodically, it is recommended to use the
78
- # callback CALLBACK_INTENSITY and set the period with
79
+ # CALLBACK_INTENSITY callback and set the period with
79
80
  # BrickletSoundIntensity#set_intensity_callback_period.
80
81
  def get_intensity
81
82
  send_request(FUNCTION_GET_INTENSITY, [], '', 2, 'S')
@@ -84,8 +85,8 @@ module Tinkerforge
84
85
  # Sets the period in ms with which the CALLBACK_INTENSITY callback is triggered
85
86
  # periodically. A value of 0 turns the callback off.
86
87
  #
87
- # CALLBACK_INTENSITY is only triggered if the intensity has changed since the
88
- # last triggering.
88
+ # The CALLBACK_INTENSITY callback is only triggered if the intensity has changed
89
+ # since the last triggering.
89
90
  #
90
91
  # The default value is 0.
91
92
  def set_intensity_callback_period(period)
@@ -97,7 +98,7 @@ module Tinkerforge
97
98
  send_request(FUNCTION_GET_INTENSITY_CALLBACK_PERIOD, [], '', 4, 'L')
98
99
  end
99
100
 
100
- # Sets the thresholds for the CALLBACK_INTENSITY_REACHED callback.
101
+ # Sets the thresholds for the CALLBACK_INTENSITY_REACHED callback.
101
102
  #
102
103
  # The following options are possible:
103
104
  #
@@ -139,7 +140,7 @@ module Tinkerforge
139
140
  send_request(FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L')
140
141
  end
141
142
 
142
- # Returns the UID, the UID where the Bricklet is connected to,
143
+ # Returns the UID, the UID where the Bricklet is connected to,
143
144
  # the position, the hardware and firmware version as well as the
144
145
  # device identifier.
145
146
  #