tinkerforge 2.1.23 → 2.1.24
Sign up to get free protection for your applications and to get access to all the features.
- 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 #
|
@@ -167,7 +167,7 @@ module Tinkerforge
|
|
167
167
|
send_request FUNCTION_GET_ADC_VALUES, [], '', 16, 'S8'
|
168
168
|
end
|
169
169
|
|
170
|
-
# The period
|
170
|
+
# The period is the period with which the CALLBACK_ADC_VALUES
|
171
171
|
# callback is triggered periodically. A value of 0 turns the callback off.
|
172
172
|
#
|
173
173
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -176,8 +176,6 @@ module Tinkerforge
|
|
176
176
|
#
|
177
177
|
# If it is set to false, the callback is continuously triggered with the period,
|
178
178
|
# independent of the value.
|
179
|
-
#
|
180
|
-
# The default value is (0, false).
|
181
179
|
def set_adc_values_callback_configuration(period, value_has_to_change)
|
182
180
|
send_request FUNCTION_SET_ADC_VALUES_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
|
183
181
|
end
|
@@ -202,7 +200,7 @@ module Tinkerforge
|
|
202
200
|
send_request FUNCTION_GET_COUNT, [], '', 4, 'L'
|
203
201
|
end
|
204
202
|
|
205
|
-
# The period
|
203
|
+
# The period is the period with which the CALLBACK_COUNT callback is triggered
|
206
204
|
# periodically. A value of 0 turns the callback off.
|
207
205
|
#
|
208
206
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -227,8 +225,6 @@ module Tinkerforge
|
|
227
225
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
228
226
|
#
|
229
227
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
230
|
-
#
|
231
|
-
# The default value is (0, false, 'x', 0, 0).
|
232
228
|
def set_count_callback_configuration(period, value_has_to_change, option, min, max)
|
233
229
|
send_request FUNCTION_SET_COUNT_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k L L', 0, ''
|
234
230
|
end
|
@@ -628,6 +628,9 @@ module Tinkerforge
|
|
628
628
|
# For more information about authentication see
|
629
629
|
# https://www.tinkerforge.com/en/doc/Tutorials/Tutorial_Authentication/Tutorial.html
|
630
630
|
def authenticate(secret)
|
631
|
+
if not secret.ascii_only?
|
632
|
+
raise ArgumentError, "Authentication secret contains non-ASCII characters"
|
633
|
+
end
|
631
634
|
@authentication_mutex.synchronize {
|
632
635
|
if @next_authentication_nonce == 0
|
633
636
|
@next_authentication_nonce = SecureRandom.random_number(1 << 32)
|
data/lib/tinkerforge/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tinkerforge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthias Bolte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: matthias@tinkerforge.com
|