tinkerforge 2.1.23 → 2.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tinkerforge/brick_dc.rb +2 -2
- data/lib/tinkerforge/brick_hat.rb +45 -4
- data/lib/tinkerforge/brick_hat_zero.rb +69 -3
- data/lib/tinkerforge/brick_imu.rb +8 -10
- data/lib/tinkerforge/brick_imu_v2.rb +12 -14
- data/lib/tinkerforge/brick_master.rb +6 -14
- data/lib/tinkerforge/brick_red.rb +2 -2
- data/lib/tinkerforge/brick_servo.rb +2 -2
- data/lib/tinkerforge/brick_silent_stepper.rb +3 -3
- data/lib/tinkerforge/brick_stepper.rb +3 -3
- data/lib/tinkerforge/bricklet_accelerometer.rb +7 -16
- data/lib/tinkerforge/bricklet_accelerometer_v2.rb +18 -24
- data/lib/tinkerforge/bricklet_air_quality.rb +13 -23
- data/lib/tinkerforge/bricklet_ambient_light.rb +14 -27
- data/lib/tinkerforge/bricklet_ambient_light_v2.rb +4 -8
- data/lib/tinkerforge/bricklet_ambient_light_v3.rb +3 -5
- data/lib/tinkerforge/bricklet_analog_in.rb +6 -22
- data/lib/tinkerforge/bricklet_analog_in_v2.rb +6 -22
- data/lib/tinkerforge/bricklet_analog_in_v3.rb +4 -9
- data/lib/tinkerforge/bricklet_analog_out.rb +5 -9
- data/lib/tinkerforge/bricklet_analog_out_v2.rb +4 -4
- data/lib/tinkerforge/bricklet_analog_out_v3.rb +4 -4
- data/lib/tinkerforge/bricklet_barometer.rb +10 -33
- data/lib/tinkerforge/bricklet_barometer_v2.rb +13 -32
- data/lib/tinkerforge/bricklet_can.rb +3 -7
- data/lib/tinkerforge/bricklet_can_v2.rb +8 -40
- data/lib/tinkerforge/bricklet_co2.rb +5 -13
- data/lib/tinkerforge/bricklet_co2_v2.rb +24 -24
- data/lib/tinkerforge/bricklet_color.rb +9 -22
- data/lib/tinkerforge/bricklet_color_v2.rb +7 -16
- data/lib/tinkerforge/bricklet_compass.rb +6 -12
- data/lib/tinkerforge/bricklet_current12.rb +6 -18
- data/lib/tinkerforge/bricklet_current25.rb +6 -18
- data/lib/tinkerforge/bricklet_distance_ir.rb +6 -17
- data/lib/tinkerforge/bricklet_distance_ir_v2.rb +5 -16
- data/lib/tinkerforge/bricklet_distance_us.rb +6 -16
- data/lib/tinkerforge/bricklet_distance_us_v2.rb +4 -10
- data/lib/tinkerforge/bricklet_dmx.rb +7 -16
- data/lib/tinkerforge/bricklet_dual_button.rb +2 -4
- data/lib/tinkerforge/bricklet_dual_button_v2.rb +3 -7
- data/lib/tinkerforge/bricklet_dual_relay.rb +3 -5
- data/lib/tinkerforge/bricklet_dust_detector.rb +6 -16
- data/lib/tinkerforge/bricklet_e_paper_296x128.rb +30 -33
- data/lib/tinkerforge/bricklet_energy_monitor.rb +11 -15
- data/lib/tinkerforge/bricklet_gps.rb +11 -24
- data/lib/tinkerforge/bricklet_gps_v2.rb +10 -28
- data/lib/tinkerforge/bricklet_hall_effect.rb +3 -7
- data/lib/tinkerforge/bricklet_hall_effect_v2.rb +8 -19
- data/lib/tinkerforge/bricklet_humidity.rb +6 -19
- data/lib/tinkerforge/bricklet_humidity_v2.rb +6 -20
- data/lib/tinkerforge/bricklet_industrial_analog_out.rb +6 -6
- data/lib/tinkerforge/bricklet_industrial_analog_out_v2.rb +6 -13
- data/lib/tinkerforge/bricklet_industrial_counter.rb +4 -22
- data/lib/tinkerforge/bricklet_industrial_digital_in_4.rb +9 -9
- data/lib/tinkerforge/bricklet_industrial_digital_in_4_v2.rb +5 -13
- data/lib/tinkerforge/bricklet_industrial_digital_out_4.rb +3 -3
- data/lib/tinkerforge/bricklet_industrial_digital_out_4_v2.rb +5 -8
- data/lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb +6 -15
- data/lib/tinkerforge/bricklet_industrial_dual_0_20ma_v2.rb +4 -16
- data/lib/tinkerforge/bricklet_industrial_dual_analog_in.rb +5 -13
- data/lib/tinkerforge/bricklet_industrial_dual_analog_in_v2.rb +4 -11
- data/lib/tinkerforge/bricklet_industrial_dual_relay.rb +5 -7
- data/lib/tinkerforge/bricklet_industrial_quad_relay.rb +3 -3
- data/lib/tinkerforge/bricklet_industrial_quad_relay_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_io16.rb +5 -13
- data/lib/tinkerforge/bricklet_io16_v2.rb +6 -16
- data/lib/tinkerforge/bricklet_io4.rb +4 -10
- data/lib/tinkerforge/bricklet_io4_v2.rb +16 -23
- data/lib/tinkerforge/bricklet_isolator.rb +44 -11
- data/lib/tinkerforge/bricklet_joystick.rb +7 -19
- data/lib/tinkerforge/bricklet_joystick_v2.rb +6 -11
- data/lib/tinkerforge/bricklet_laser_range_finder.rb +8 -29
- data/lib/tinkerforge/bricklet_laser_range_finder_v2.rb +6 -17
- data/lib/tinkerforge/bricklet_lcd_128x64.rb +30 -63
- data/lib/tinkerforge/bricklet_lcd_16x2.rb +7 -9
- data/lib/tinkerforge/bricklet_lcd_20x4.rb +4 -8
- data/lib/tinkerforge/bricklet_led_strip.rb +12 -27
- data/lib/tinkerforge/bricklet_led_strip_v2.rb +17 -4
- data/lib/tinkerforge/bricklet_line.rb +4 -10
- data/lib/tinkerforge/bricklet_linear_poti.rb +5 -16
- data/lib/tinkerforge/bricklet_linear_poti_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_load_cell.rb +6 -19
- data/lib/tinkerforge/bricklet_load_cell_v2.rb +4 -13
- data/lib/tinkerforge/bricklet_moisture.rb +6 -16
- data/lib/tinkerforge/bricklet_motion_detector.rb +2 -2
- data/lib/tinkerforge/bricklet_motion_detector_v2.rb +3 -7
- data/lib/tinkerforge/bricklet_motorized_linear_poti.rb +3 -7
- data/lib/tinkerforge/bricklet_multi_touch.rb +2 -6
- data/lib/tinkerforge/bricklet_multi_touch_v2.rb +3 -13
- data/lib/tinkerforge/bricklet_nfc.rb +6 -20
- data/lib/tinkerforge/bricklet_nfc_rfid.rb +2 -2
- data/lib/tinkerforge/bricklet_oled_128x64.rb +4 -8
- data/lib/tinkerforge/bricklet_oled_128x64_v2.rb +12 -18
- data/lib/tinkerforge/bricklet_oled_64x48.rb +4 -8
- data/lib/tinkerforge/bricklet_one_wire.rb +2 -2
- data/lib/tinkerforge/bricklet_outdoor_weather.rb +16 -16
- data/lib/tinkerforge/bricklet_particulate_matter.rb +13 -9
- data/lib/tinkerforge/bricklet_piezo_buzzer.rb +3 -6
- data/lib/tinkerforge/bricklet_piezo_speaker.rb +3 -11
- data/lib/tinkerforge/bricklet_piezo_speaker_v2.rb +8 -18
- data/lib/tinkerforge/bricklet_ptc.rb +5 -11
- data/lib/tinkerforge/bricklet_ptc_v2.rb +4 -8
- data/lib/tinkerforge/bricklet_real_time_clock.rb +3 -5
- data/lib/tinkerforge/bricklet_real_time_clock_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_remote_switch.rb +2 -2
- data/lib/tinkerforge/bricklet_remote_switch_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_rgb_led.rb +2 -2
- data/lib/tinkerforge/bricklet_rgb_led_button.rb +2 -2
- data/lib/tinkerforge/bricklet_rgb_led_matrix.rb +2 -2
- data/lib/tinkerforge/bricklet_rgb_led_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_rotary_encoder.rb +4 -8
- data/lib/tinkerforge/bricklet_rotary_encoder_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_rotary_poti.rb +5 -11
- data/lib/tinkerforge/bricklet_rotary_poti_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_rs232.rb +2 -2
- data/lib/tinkerforge/bricklet_rs232_v2.rb +6 -5
- data/lib/tinkerforge/bricklet_rs485.rb +30 -71
- data/lib/tinkerforge/bricklet_segment_display_4x7.rb +2 -2
- data/lib/tinkerforge/bricklet_segment_display_4x7_v2.rb +3 -3
- data/lib/tinkerforge/bricklet_solid_state_relay.rb +2 -2
- data/lib/tinkerforge/bricklet_solid_state_relay_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_sound_intensity.rb +4 -8
- data/lib/tinkerforge/bricklet_sound_pressure_level.rb +8 -12
- data/lib/tinkerforge/bricklet_temperature.rb +6 -14
- data/lib/tinkerforge/bricklet_temperature_ir.rb +7 -26
- data/lib/tinkerforge/bricklet_temperature_ir_v2.rb +6 -19
- data/lib/tinkerforge/bricklet_temperature_v2.rb +4 -8
- data/lib/tinkerforge/bricklet_thermal_imaging.rb +16 -26
- data/lib/tinkerforge/bricklet_thermocouple.rb +4 -8
- data/lib/tinkerforge/bricklet_thermocouple_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_tilt.rb +2 -2
- data/lib/tinkerforge/bricklet_uv_light.rb +4 -8
- data/lib/tinkerforge/bricklet_uv_light_v2.rb +5 -11
- data/lib/tinkerforge/bricklet_voltage.rb +5 -11
- data/lib/tinkerforge/bricklet_voltage_current.rb +6 -14
- data/lib/tinkerforge/bricklet_voltage_current_v2.rb +5 -11
- data/lib/tinkerforge/bricklet_xmc1400_breakout.rb +4 -8
- data/lib/tinkerforge/ip_connection.rb +3 -0
- data/lib/tinkerforge/version.rb +1 -1
- metadata +2 -2
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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 #
|
@@ -71,7 +71,7 @@ module Tinkerforge
|
|
71
71
|
|
72
72
|
end
|
73
73
|
|
74
|
-
# Returns the dust density
|
74
|
+
# Returns the dust density.
|
75
75
|
#
|
76
76
|
# If you want to get the dust density periodically, it is recommended
|
77
77
|
# to use the CALLBACK_DUST_DENSITY callback and set the period with
|
@@ -80,13 +80,11 @@ module Tinkerforge
|
|
80
80
|
send_request FUNCTION_GET_DUST_DENSITY, [], '', 2, 'S'
|
81
81
|
end
|
82
82
|
|
83
|
-
# Sets the period
|
83
|
+
# Sets the period with which the CALLBACK_DUST_DENSITY callback is triggered
|
84
84
|
# periodically. A value of 0 turns the callback off.
|
85
85
|
#
|
86
86
|
# The CALLBACK_DUST_DENSITY callback is only triggered if the dust density has
|
87
87
|
# changed since the last triggering.
|
88
|
-
#
|
89
|
-
# The default value is 0.
|
90
88
|
def set_dust_density_callback_period(period)
|
91
89
|
send_request FUNCTION_SET_DUST_DENSITY_CALLBACK_PERIOD, [period], 'L', 0, ''
|
92
90
|
end
|
@@ -107,8 +105,6 @@ module Tinkerforge
|
|
107
105
|
# "'i'", "Callback is triggered when the dust density value is *inside* the min and max values"
|
108
106
|
# "'<'", "Callback is triggered when the dust density value is smaller than the min value (max is ignored)"
|
109
107
|
# "'>'", "Callback is triggered when the dust density value is greater than the min value (max is ignored)"
|
110
|
-
#
|
111
|
-
# The default value is ('x', 0, 0).
|
112
108
|
def set_dust_density_callback_threshold(option, min, max)
|
113
109
|
send_request FUNCTION_SET_DUST_DENSITY_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
|
114
110
|
end
|
@@ -118,7 +114,7 @@ module Tinkerforge
|
|
118
114
|
send_request FUNCTION_GET_DUST_DENSITY_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
|
119
115
|
end
|
120
116
|
|
121
|
-
# Sets the period
|
117
|
+
# Sets the period with which the threshold callback
|
122
118
|
#
|
123
119
|
# * CALLBACK_DUST_DENSITY_REACHED
|
124
120
|
#
|
@@ -127,8 +123,6 @@ module Tinkerforge
|
|
127
123
|
# * BrickletDustDetector#set_dust_density_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
|
@@ -139,14 +133,10 @@ module Tinkerforge
|
|
139
133
|
end
|
140
134
|
|
141
135
|
# Sets the length of a `moving averaging <https://en.wikipedia.org/wiki/Moving_average>`__
|
142
|
-
# for the
|
136
|
+
# for the dust density.
|
143
137
|
#
|
144
138
|
# Setting the length to 0 will turn the averaging completely off. With less
|
145
139
|
# averaging, there is more noise on the data.
|
146
|
-
#
|
147
|
-
# The range for the averaging is 0-100.
|
148
|
-
#
|
149
|
-
# The default value is 100.
|
150
140
|
def set_moving_average(average)
|
151
141
|
send_request FUNCTION_SET_MOVING_AVERAGE, [average], 'C', 0, ''
|
152
142
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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 #
|
@@ -147,9 +147,8 @@ module Tinkerforge
|
|
147
147
|
|
148
148
|
# Writes black/white pixels to the specified window into the buffer.
|
149
149
|
#
|
150
|
-
# The
|
151
|
-
#
|
152
|
-
# right.
|
150
|
+
# The pixels are written into the window line by line top to bottom
|
151
|
+
# and each line is written from left to right.
|
153
152
|
#
|
154
153
|
# The value 0 (false) corresponds to a black pixel and the value 1 (true) to a
|
155
154
|
# white pixel.
|
@@ -164,9 +163,8 @@ module Tinkerforge
|
|
164
163
|
|
165
164
|
# Returns the current content of the black/white pixel buffer for the specified window.
|
166
165
|
#
|
167
|
-
# The
|
168
|
-
#
|
169
|
-
# right.
|
166
|
+
# The pixels are read into the window line by line top to bottom and
|
167
|
+
# each line is read from left to right.
|
170
168
|
#
|
171
169
|
# The current content of the buffer does not have to be the current content of the display.
|
172
170
|
# It is possible that the data was not drawn to the display yet and after a restart of
|
@@ -179,9 +177,8 @@ module Tinkerforge
|
|
179
177
|
# black/white/gray. Depending on the model this function writes either red or
|
180
178
|
# gray pixels to the specified window into the buffer.
|
181
179
|
#
|
182
|
-
# The
|
183
|
-
#
|
184
|
-
# right.
|
180
|
+
# The pixels are written into the window line by line top to bottom
|
181
|
+
# and each line is written from left to right.
|
185
182
|
#
|
186
183
|
# The value 0 (false) means that this pixel does not have color. It will be either black
|
187
184
|
# or white (see BrickletEPaper296x128#write_black_white). The value 1 (true) corresponds to a red or gray
|
@@ -197,9 +194,8 @@ module Tinkerforge
|
|
197
194
|
|
198
195
|
# Returns the current content of the red or gray pixel buffer for the specified window.
|
199
196
|
#
|
200
|
-
# The
|
201
|
-
#
|
202
|
-
# right.
|
197
|
+
# The pixels are written into the window line by line top to bottom
|
198
|
+
# and each line is written from left to right.
|
203
199
|
#
|
204
200
|
# The current content of the buffer does not have to be the current content of the display.
|
205
201
|
# It is possible that the data was not drawn to the display yet and after a restart of
|
@@ -209,34 +205,39 @@ module Tinkerforge
|
|
209
205
|
end
|
210
206
|
|
211
207
|
# Fills the complete content of the display with the given color.
|
208
|
+
#
|
209
|
+
# This function writes the pixels into the black/white/red|gray pixel buffer, to draw the buffer
|
210
|
+
# to the display use BrickletEPaper296x128#draw.
|
212
211
|
def fill_display(color)
|
213
212
|
send_request FUNCTION_FILL_DISPLAY, [color], 'C', 0, ''
|
214
213
|
end
|
215
214
|
|
216
215
|
# Draws a text with up to 50 characters at the pixel position (x, y).
|
217
216
|
#
|
218
|
-
# The x values have to be within the range of 0 to 295 and the y
|
219
|
-
# values have to be within the range of 0 to 127.
|
220
|
-
#
|
221
217
|
# You can use one of 9 different font sizes and draw the text in
|
222
218
|
# black/white/red|gray. The text can be drawn horizontal or vertical.
|
219
|
+
#
|
220
|
+
# This function writes the pixels into the black/white/red|gray pixel buffer, to draw the buffer
|
221
|
+
# to the display use BrickletEPaper296x128#draw.
|
223
222
|
def draw_text(position_x, position_y, font, color, orientation, text)
|
224
223
|
send_request FUNCTION_DRAW_TEXT, [position_x, position_y, font, color, orientation, text], 'S C C C C Z50', 0, ''
|
225
224
|
end
|
226
225
|
|
227
226
|
# Draws a line from (x, y)-start to (x, y)-end in the given color.
|
228
|
-
#
|
229
|
-
#
|
227
|
+
#
|
228
|
+
# This function writes the pixels into the black/white/red|gray pixel buffer, to draw the buffer
|
229
|
+
# to the display use BrickletEPaper296x128#draw.
|
230
230
|
def draw_line(position_x_start, position_y_start, position_x_end, position_y_end, color)
|
231
231
|
send_request FUNCTION_DRAW_LINE, [position_x_start, position_y_start, position_x_end, position_y_end, color], 'S C S C C', 0, ''
|
232
232
|
end
|
233
233
|
|
234
234
|
# Draws a box from (x, y)-start to (x, y)-end in the given color.
|
235
|
-
# The x values have to be within the range of 0 to 295 and the y
|
236
|
-
# values have to be within the range of 0 to 127.
|
237
235
|
#
|
238
236
|
# If you set fill to true, the box will be filled with the
|
239
237
|
# color. Otherwise only the outline will be drawn.
|
238
|
+
#
|
239
|
+
# This function writes the pixels into the black/white/red|gray pixel buffer, to draw the buffer
|
240
|
+
# to the display use BrickletEPaper296x128#draw.
|
240
241
|
def draw_box(position_x_start, position_y_start, position_x_end, position_y_end, fill, color)
|
241
242
|
send_request FUNCTION_DRAW_BOX, [position_x_start, position_y_start, position_x_end, position_y_end, fill, color], 'S C S C ? C', 0, ''
|
242
243
|
end
|
@@ -418,9 +419,8 @@ module Tinkerforge
|
|
418
419
|
|
419
420
|
# Writes black/white pixels to the specified window into the buffer.
|
420
421
|
#
|
421
|
-
# The
|
422
|
-
#
|
423
|
-
# right.
|
422
|
+
# The pixels are written into the window line by line top to bottom
|
423
|
+
# and each line is written from left to right.
|
424
424
|
#
|
425
425
|
# The value 0 (false) corresponds to a black pixel and the value 1 (true) to a
|
426
426
|
# white pixel.
|
@@ -462,9 +462,8 @@ module Tinkerforge
|
|
462
462
|
|
463
463
|
# Returns the current content of the black/white pixel buffer for the specified window.
|
464
464
|
#
|
465
|
-
# The
|
466
|
-
#
|
467
|
-
# right.
|
465
|
+
# The pixels are read into the window line by line top to bottom and
|
466
|
+
# each line is read from left to right.
|
468
467
|
#
|
469
468
|
# The current content of the buffer does not have to be the current content of the display.
|
470
469
|
# It is possible that the data was not drawn to the display yet and after a restart of
|
@@ -506,9 +505,8 @@ module Tinkerforge
|
|
506
505
|
# black/white/gray. Depending on the model this function writes either red or
|
507
506
|
# gray pixels to the specified window into the buffer.
|
508
507
|
#
|
509
|
-
# The
|
510
|
-
#
|
511
|
-
# right.
|
508
|
+
# The pixels are written into the window line by line top to bottom
|
509
|
+
# and each line is written from left to right.
|
512
510
|
#
|
513
511
|
# The value 0 (false) means that this pixel does not have color. It will be either black
|
514
512
|
# or white (see BrickletEPaper296x128#write_black_white). The value 1 (true) corresponds to a red or gray
|
@@ -551,9 +549,8 @@ module Tinkerforge
|
|
551
549
|
|
552
550
|
# Returns the current content of the red or gray pixel buffer for the specified window.
|
553
551
|
#
|
554
|
-
# The
|
555
|
-
#
|
556
|
-
# right.
|
552
|
+
# The pixels are written into the window line by line top to bottom
|
553
|
+
# and each line is written from left to right.
|
557
554
|
#
|
558
555
|
# The current content of the buffer does not have to be the current content of the display.
|
559
556
|
# It is possible that the data was not drawn to the display yet and after a restart of
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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 #
|
@@ -94,14 +94,14 @@ module Tinkerforge
|
|
94
94
|
|
95
95
|
# Returns all of the measurements that are done by the Energy Monitor Bricklet.
|
96
96
|
#
|
97
|
-
# * Voltage
|
98
|
-
# * Current
|
99
|
-
# * Energy (
|
100
|
-
# * Real Power
|
101
|
-
# * Apparent Power
|
102
|
-
# * Reactive Power
|
103
|
-
# * Power Factor
|
104
|
-
# * Frequency (
|
97
|
+
# * Voltage RMS
|
98
|
+
# * Current RMS
|
99
|
+
# * Energy (integrated over time)
|
100
|
+
# * Real Power
|
101
|
+
# * Apparent Power
|
102
|
+
# * Reactive Power
|
103
|
+
# * Power Factor
|
104
|
+
# * Frequency (AC Frequency of the mains voltage)
|
105
105
|
#
|
106
106
|
# The frequency is recalculated every 6 seconds.
|
107
107
|
#
|
@@ -151,8 +151,6 @@ module Tinkerforge
|
|
151
151
|
#
|
152
152
|
# The calibration is saved in non-volatile memory, you only have to set it once.
|
153
153
|
#
|
154
|
-
# By default the voltage ratio is set to 1923 and the current ratio is set to 3000.
|
155
|
-
#
|
156
154
|
# Set the phase shift to 0. It is for future use and currently not supported by the Bricklet.
|
157
155
|
def set_transformer_calibration(voltage_ratio, current_ratio, phase_shift)
|
158
156
|
send_request FUNCTION_SET_TRANSFORMER_CALIBRATION, [voltage_ratio, current_ratio, phase_shift], 'S S s', 0, ''
|
@@ -179,7 +177,7 @@ module Tinkerforge
|
|
179
177
|
send_request FUNCTION_CALIBRATE_OFFSET, [], '', 0, ''
|
180
178
|
end
|
181
179
|
|
182
|
-
# The period
|
180
|
+
# The period is the period with which the CALLBACK_ENERGY_DATA
|
183
181
|
# callback is triggered periodically. A value of 0 turns the callback off.
|
184
182
|
#
|
185
183
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -188,8 +186,6 @@ module Tinkerforge
|
|
188
186
|
#
|
189
187
|
# If it is set to false, the callback is continuously triggered with the period,
|
190
188
|
# independent of the value.
|
191
|
-
#
|
192
|
-
# The default value is (0, false).
|
193
189
|
def set_energy_data_callback_configuration(period, value_has_to_change)
|
194
190
|
send_request FUNCTION_SET_ENERGY_DATA_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
|
195
191
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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 #
|
@@ -127,9 +127,9 @@ module Tinkerforge
|
|
127
127
|
# the additional multiplicative effect of GPS satellite geometry on GPS
|
128
128
|
# precision. See
|
129
129
|
# `here <https://en.wikipedia.org/wiki/Dilution_of_precision_(GPS)>`__
|
130
|
-
# for more information.
|
130
|
+
# for more information.
|
131
131
|
#
|
132
|
-
# EPE is the "Estimated Position Error".
|
132
|
+
# EPE is the "Estimated Position Error". This is not the
|
133
133
|
# absolute maximum error, it is the error with a specific confidence. See
|
134
134
|
# `here <https://www.nps.gov/gis/gps/WhatisEPE.html>`__ for more information.
|
135
135
|
#
|
@@ -158,16 +158,13 @@ module Tinkerforge
|
|
158
158
|
|
159
159
|
# Returns the current altitude and corresponding geoidal separation.
|
160
160
|
#
|
161
|
-
# Both values are given in cm.
|
162
|
-
#
|
163
161
|
# This data is only valid if there is currently a fix as indicated by
|
164
162
|
# BrickletGPS#get_status.
|
165
163
|
def get_altitude
|
166
164
|
send_request FUNCTION_GET_ALTITUDE, [], '', 8, 'l l'
|
167
165
|
end
|
168
166
|
|
169
|
-
# Returns the current course and speed.
|
170
|
-
# and speed is given in hundredths km/h. A course of 0° means the Bricklet is
|
167
|
+
# Returns the current course and speed. A course of 0° means the Bricklet is
|
171
168
|
# traveling north bound and 90° means it is traveling east bound.
|
172
169
|
#
|
173
170
|
# Please note that this only returns useful values if an actual movement
|
@@ -182,7 +179,7 @@ module Tinkerforge
|
|
182
179
|
# Returns the current date and time. The date is
|
183
180
|
# given in the format ``ddmmyy`` and the time is given
|
184
181
|
# in the format ``hhmmss.sss``. For example, 140713 means
|
185
|
-
# 14.
|
182
|
+
# 14.07.13 as date and 195923568 means 19:59:23.568 as time.
|
186
183
|
def get_date_time
|
187
184
|
send_request FUNCTION_GET_DATE_TIME, [], '', 8, 'L L'
|
188
185
|
end
|
@@ -199,13 +196,11 @@ module Tinkerforge
|
|
199
196
|
send_request FUNCTION_RESTART, [restart_type], 'C', 0, ''
|
200
197
|
end
|
201
198
|
|
202
|
-
# Sets the period
|
199
|
+
# Sets the period with which the CALLBACK_COORDINATES callback is triggered
|
203
200
|
# periodically. A value of 0 turns the callback off.
|
204
201
|
#
|
205
202
|
# The CALLBACK_COORDINATES callback is only triggered if the coordinates changed
|
206
203
|
# since the last triggering.
|
207
|
-
#
|
208
|
-
# The default value is 0.
|
209
204
|
def set_coordinates_callback_period(period)
|
210
205
|
send_request FUNCTION_SET_COORDINATES_CALLBACK_PERIOD, [period], 'L', 0, ''
|
211
206
|
end
|
@@ -215,13 +210,11 @@ module Tinkerforge
|
|
215
210
|
send_request FUNCTION_GET_COORDINATES_CALLBACK_PERIOD, [], '', 4, 'L'
|
216
211
|
end
|
217
212
|
|
218
|
-
# Sets the period
|
213
|
+
# Sets the period with which the CALLBACK_STATUS callback is triggered
|
219
214
|
# periodically. A value of 0 turns the callback off.
|
220
215
|
#
|
221
216
|
# The CALLBACK_STATUS callback is only triggered if the status changed since the
|
222
217
|
# last triggering.
|
223
|
-
#
|
224
|
-
# The default value is 0.
|
225
218
|
def set_status_callback_period(period)
|
226
219
|
send_request FUNCTION_SET_STATUS_CALLBACK_PERIOD, [period], 'L', 0, ''
|
227
220
|
end
|
@@ -231,13 +224,11 @@ module Tinkerforge
|
|
231
224
|
send_request FUNCTION_GET_STATUS_CALLBACK_PERIOD, [], '', 4, 'L'
|
232
225
|
end
|
233
226
|
|
234
|
-
# Sets the period
|
227
|
+
# Sets the period with which the CALLBACK_ALTITUDE callback is triggered
|
235
228
|
# periodically. A value of 0 turns the callback off.
|
236
229
|
#
|
237
230
|
# The CALLBACK_ALTITUDE callback is only triggered if the altitude changed since
|
238
231
|
# the last triggering.
|
239
|
-
#
|
240
|
-
# The default value is 0.
|
241
232
|
def set_altitude_callback_period(period)
|
242
233
|
send_request FUNCTION_SET_ALTITUDE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
243
234
|
end
|
@@ -247,13 +238,11 @@ module Tinkerforge
|
|
247
238
|
send_request FUNCTION_GET_ALTITUDE_CALLBACK_PERIOD, [], '', 4, 'L'
|
248
239
|
end
|
249
240
|
|
250
|
-
# Sets the period
|
241
|
+
# Sets the period with which the CALLBACK_MOTION callback is triggered
|
251
242
|
# periodically. A value of 0 turns the callback off.
|
252
243
|
#
|
253
244
|
# The CALLBACK_MOTION callback is only triggered if the motion changed since the
|
254
245
|
# last triggering.
|
255
|
-
#
|
256
|
-
# The default value is 0.
|
257
246
|
def set_motion_callback_period(period)
|
258
247
|
send_request FUNCTION_SET_MOTION_CALLBACK_PERIOD, [period], 'L', 0, ''
|
259
248
|
end
|
@@ -263,13 +252,11 @@ module Tinkerforge
|
|
263
252
|
send_request FUNCTION_GET_MOTION_CALLBACK_PERIOD, [], '', 4, 'L'
|
264
253
|
end
|
265
254
|
|
266
|
-
# Sets the period
|
255
|
+
# Sets the period with which the CALLBACK_DATE_TIME callback is triggered
|
267
256
|
# periodically. A value of 0 turns the callback off.
|
268
257
|
#
|
269
258
|
# The CALLBACK_DATE_TIME callback is only triggered if the date or time changed
|
270
259
|
# since the last triggering.
|
271
|
-
#
|
272
|
-
# The default value is 0.
|
273
260
|
def set_date_time_callback_period(period)
|
274
261
|
send_request FUNCTION_SET_DATE_TIME_CALLBACK_PERIOD, [period], 'L', 0, ''
|
275
262
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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 #
|
@@ -209,16 +209,13 @@ module Tinkerforge
|
|
209
209
|
|
210
210
|
# Returns the current altitude and corresponding geoidal separation.
|
211
211
|
#
|
212
|
-
# Both values are given in cm.
|
213
|
-
#
|
214
212
|
# This data is only valid if there is currently a fix as indicated by
|
215
213
|
# BrickletGPSV2#get_status.
|
216
214
|
def get_altitude
|
217
215
|
send_request FUNCTION_GET_ALTITUDE, [], '', 8, 'l l'
|
218
216
|
end
|
219
217
|
|
220
|
-
# Returns the current course and speed.
|
221
|
-
# and speed is given in hundredths km/h. A course of 0° means the Bricklet is
|
218
|
+
# Returns the current course and speed. A course of 0° means the Bricklet is
|
222
219
|
# traveling north bound and 90° means it is traveling east bound.
|
223
220
|
#
|
224
221
|
# Please note that this only returns useful values if an actual movement
|
@@ -233,7 +230,7 @@ module Tinkerforge
|
|
233
230
|
# Returns the current date and time. The date is
|
234
231
|
# given in the format ``ddmmyy`` and the time is given
|
235
232
|
# in the format ``hhmmss.sss``. For example, 140713 means
|
236
|
-
# 14.
|
233
|
+
# 14.07.13 as date and 195923568 means 19:59:23.568 as time.
|
237
234
|
def get_date_time
|
238
235
|
send_request FUNCTION_GET_DATE_TIME, [], '', 8, 'L L'
|
239
236
|
end
|
@@ -268,12 +265,7 @@ module Tinkerforge
|
|
268
265
|
send_request FUNCTION_GET_SATELLITE_SYSTEM_STATUS_LOW_LEVEL, [satellite_system], 'C', 20, 'C C12 C S S S'
|
269
266
|
end
|
270
267
|
|
271
|
-
# Returns the current
|
272
|
-
#
|
273
|
-
# * elevation (0° - 90°),
|
274
|
-
# * azimuth (0° - 359°) and
|
275
|
-
# * SNR (0dB - 99dB)
|
276
|
-
#
|
268
|
+
# Returns the current elevation, azimuth and SNR
|
277
269
|
# for a given satellite and satellite system.
|
278
270
|
#
|
279
271
|
# The satellite number here always goes from 1 to 32. For GLONASS it corresponds to
|
@@ -301,13 +293,11 @@ module Tinkerforge
|
|
301
293
|
send_request FUNCTION_GET_FIX_LED_CONFIG, [], '', 1, 'C'
|
302
294
|
end
|
303
295
|
|
304
|
-
# Sets the period
|
296
|
+
# Sets the period with which the CALLBACK_COORDINATES callback is triggered
|
305
297
|
# periodically. A value of 0 turns the callback off.
|
306
298
|
#
|
307
299
|
# The CALLBACK_COORDINATES callback is only triggered if the coordinates changed
|
308
300
|
# since the last triggering.
|
309
|
-
#
|
310
|
-
# The default value is 0.
|
311
301
|
def set_coordinates_callback_period(period)
|
312
302
|
send_request FUNCTION_SET_COORDINATES_CALLBACK_PERIOD, [period], 'L', 0, ''
|
313
303
|
end
|
@@ -317,13 +307,11 @@ module Tinkerforge
|
|
317
307
|
send_request FUNCTION_GET_COORDINATES_CALLBACK_PERIOD, [], '', 4, 'L'
|
318
308
|
end
|
319
309
|
|
320
|
-
# Sets the period
|
310
|
+
# Sets the period with which the CALLBACK_STATUS callback is triggered
|
321
311
|
# periodically. A value of 0 turns the callback off.
|
322
312
|
#
|
323
313
|
# The CALLBACK_STATUS callback is only triggered if the status changed since the
|
324
314
|
# last triggering.
|
325
|
-
#
|
326
|
-
# The default value is 0.
|
327
315
|
def set_status_callback_period(period)
|
328
316
|
send_request FUNCTION_SET_STATUS_CALLBACK_PERIOD, [period], 'L', 0, ''
|
329
317
|
end
|
@@ -333,13 +321,11 @@ module Tinkerforge
|
|
333
321
|
send_request FUNCTION_GET_STATUS_CALLBACK_PERIOD, [], '', 4, 'L'
|
334
322
|
end
|
335
323
|
|
336
|
-
# Sets the period
|
324
|
+
# Sets the period with which the CALLBACK_ALTITUDE callback is triggered
|
337
325
|
# periodically. A value of 0 turns the callback off.
|
338
326
|
#
|
339
327
|
# The CALLBACK_ALTITUDE callback is only triggered if the altitude changed since the
|
340
328
|
# last triggering.
|
341
|
-
#
|
342
|
-
# The default value is 0.
|
343
329
|
def set_altitude_callback_period(period)
|
344
330
|
send_request FUNCTION_SET_ALTITUDE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
345
331
|
end
|
@@ -349,13 +335,11 @@ module Tinkerforge
|
|
349
335
|
send_request FUNCTION_GET_ALTITUDE_CALLBACK_PERIOD, [], '', 4, 'L'
|
350
336
|
end
|
351
337
|
|
352
|
-
# Sets the period
|
338
|
+
# Sets the period with which the CALLBACK_MOTION callback is triggered
|
353
339
|
# periodically. A value of 0 turns the callback off.
|
354
340
|
#
|
355
341
|
# The CALLBACK_MOTION callback is only triggered if the motion changed since the
|
356
342
|
# last triggering.
|
357
|
-
#
|
358
|
-
# The default value is 0.
|
359
343
|
def set_motion_callback_period(period)
|
360
344
|
send_request FUNCTION_SET_MOTION_CALLBACK_PERIOD, [period], 'L', 0, ''
|
361
345
|
end
|
@@ -365,13 +349,11 @@ module Tinkerforge
|
|
365
349
|
send_request FUNCTION_GET_MOTION_CALLBACK_PERIOD, [], '', 4, 'L'
|
366
350
|
end
|
367
351
|
|
368
|
-
# Sets the period
|
352
|
+
# Sets the period with which the CALLBACK_DATE_TIME callback is triggered
|
369
353
|
# periodically. A value of 0 turns the callback off.
|
370
354
|
#
|
371
355
|
# The CALLBACK_DATE_TIME callback is only triggered if the date or time changed
|
372
356
|
# since the last triggering.
|
373
|
-
#
|
374
|
-
# The default value is 0.
|
375
357
|
def set_date_time_callback_period(period)
|
376
358
|
send_request FUNCTION_SET_DATE_TIME_CALLBACK_PERIOD, [period], 'L', 0, ''
|
377
359
|
end
|