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 #
@@ -46,7 +46,7 @@ module Tinkerforge
46
46
 
47
47
  # Sets the state of the relays *true* means on and *false* means off.
48
48
  #
49
- # Running monoflop timers will be overwritten if this function is called.
49
+ # A running monoflop timer will be aborted if this function is called.
50
50
  #
51
51
  # The default value is *false*.
52
52
  def set_state(state)
@@ -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 #
@@ -83,7 +83,7 @@ module Tinkerforge
83
83
 
84
84
  # Sets the state of the relays *true* means on and *false* means off.
85
85
  #
86
- # Running monoflop timers will be overwritten if this function is called.
86
+ # A running monoflop timer will be aborted if this function is called.
87
87
  #
88
88
  # The default value is *false*.
89
89
  def set_state(state)
@@ -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 #
@@ -231,6 +231,9 @@ module Tinkerforge
231
231
  #
232
232
  # The default emissivity is 1.0 (value of 65535) and the minimum emissivity the
233
233
  # sensor can handle is 0.1 (value of 6553).
234
+ #
235
+ # The emissivity is stored in non-volatile memory and will still be
236
+ # used after a restart or power cycle of the Bricklet.
234
237
  def set_emissivity(emissivity)
235
238
  send_request FUNCTION_SET_EMISSIVITY, [emissivity], 'S', 0, ''
236
239
  end
@@ -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 #
@@ -174,7 +174,7 @@ module Tinkerforge
174
174
  # bottom right.
175
175
  #
176
176
  # Each 16-bit value represents one temperature measurement in either
177
- # Kelvin/10 or Kelvin/100 (depending on the resolution set withBrickletThermalImaging#set_resolution).
177
+ # Kelvin/10 or Kelvin/100 (depending on the resolution set with BrickletThermalImaging#set_resolution).
178
178
  #
179
179
  # Before you can use this function you have to enable it with
180
180
  # BrickletThermalImaging#set_image_transfer_config.
@@ -507,7 +507,7 @@ module Tinkerforge
507
507
  # bottom right.
508
508
  #
509
509
  # Each 16-bit value represents one temperature measurement in either
510
- # Kelvin/10 or Kelvin/100 (depending on the resolution set withBrickletThermalImaging#set_resolution).
510
+ # Kelvin/10 or Kelvin/100 (depending on the resolution set with BrickletThermalImaging#set_resolution).
511
511
  #
512
512
  # Before you can use this function you have to enable it with
513
513
  # BrickletThermalImaging#set_image_transfer_config.
@@ -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 #
@@ -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,5 +1,5 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
- # Copyright (C) 2012-2014 Matthias Bolte <matthias@tinkerforge.com>
2
+ # Copyright (C) 2012-2014, 2019 Matthias Bolte <matthias@tinkerforge.com>
3
3
  #
4
4
  # Redistribution and use in source and binary forms of this file,
5
5
  # with or without modification, are permitted. See the Creative
@@ -30,6 +30,9 @@ module Tinkerforge
30
30
  base = 1
31
31
  encoded.reverse.split(//).each do |c|
32
32
  index = ALPHABET.index c
33
+ if index == nil
34
+ raise ArgumentError, "UID '#{encoded}' contains invalid character"
35
+ end
33
36
  value += index * base
34
37
  base *= 58
35
38
  end
@@ -49,9 +52,15 @@ module Tinkerforge
49
52
  class NotConnectedException < TinkerforgeException
50
53
  end
51
54
 
55
+ class InvalidParameterException < TinkerforgeException
56
+ end
57
+
52
58
  class NotSupportedException < TinkerforgeException
53
59
  end
54
60
 
61
+ class UnknownErrorCodeException < TinkerforgeException
62
+ end
63
+
55
64
  class StreamOutOfSyncException < TinkerforgeException
56
65
  end
57
66
 
@@ -216,7 +225,11 @@ module Tinkerforge
216
225
  def initialize(uid, ipcon)
217
226
  @uid = Base58.decode uid
218
227
 
219
- if @uid > 0xFFFFFFFF
228
+ if @uid > (1 << 64) - 1
229
+ raise ArgumentError, "UID '#{uid}' is too big"
230
+ end
231
+
232
+ if @uid > (1 << 32) - 1
220
233
  # convert from 64bit to 32bit
221
234
  value1 = @uid & 0xFFFFFFFF
222
235
  value2 = (@uid >> 32) & 0xFFFFFFFF
@@ -228,6 +241,10 @@ module Tinkerforge
228
241
  @uid |= (value2 & 0x3F000000) << 2
229
242
  end
230
243
 
244
+ if @uid == 0
245
+ raise ArgumentError, "UID '#{uid}' is empty or maps to zero"
246
+ end
247
+
231
248
  @api_version = [0, 0, 0]
232
249
 
233
250
  @ipcon = ipcon
@@ -387,11 +404,11 @@ module Tinkerforge
387
404
  if error_code == 0
388
405
  # no error
389
406
  elsif error_code == 1
390
- raise NotSupportedException, "Got invalid parameter for function ID #{function_id}"
407
+ raise InvalidParameterException, "Got invalid parameter for function ID #{function_id}"
391
408
  elsif error_code == 2
392
409
  raise NotSupportedException, "Function ID #{function_id} is not supported"
393
410
  else
394
- raise NotSupportedException, "Function ID #{function_id} returned an unknown error"
411
+ raise UnknownErrorCodeException, "Function ID #{function_id} returned an unknown error"
395
412
  end
396
413
 
397
414
  if response_length > 0
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Tinkerforge
3
- VERSION = '2.1.21'
3
+ VERSION = '2.1.22'
4
4
  end
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.21
4
+ version: 2.1.22
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-01-29 00:00:00.000000000 Z
11
+ date: 2019-05-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: matthias@tinkerforge.com
@@ -18,6 +18,8 @@ extra_rdoc_files: []
18
18
  files:
19
19
  - lib/tinkerforge.rb
20
20
  - lib/tinkerforge/brick_dc.rb
21
+ - lib/tinkerforge/brick_hat.rb
22
+ - lib/tinkerforge/brick_hat_zero.rb
21
23
  - lib/tinkerforge/brick_imu.rb
22
24
  - lib/tinkerforge/brick_imu_v2.rb
23
25
  - lib/tinkerforge/brick_master.rb
@@ -42,6 +44,7 @@ files:
42
44
  - lib/tinkerforge/bricklet_can.rb
43
45
  - lib/tinkerforge/bricklet_can_v2.rb
44
46
  - lib/tinkerforge/bricklet_co2.rb
47
+ - lib/tinkerforge/bricklet_co2_v2.rb
45
48
  - lib/tinkerforge/bricklet_color.rb
46
49
  - lib/tinkerforge/bricklet_current12.rb
47
50
  - lib/tinkerforge/bricklet_current25.rb
@@ -53,9 +56,11 @@ files:
53
56
  - lib/tinkerforge/bricklet_dual_button_v2.rb
54
57
  - lib/tinkerforge/bricklet_dual_relay.rb
55
58
  - lib/tinkerforge/bricklet_dust_detector.rb
59
+ - lib/tinkerforge/bricklet_e_paper_296x128.rb
56
60
  - lib/tinkerforge/bricklet_gps.rb
57
61
  - lib/tinkerforge/bricklet_gps_v2.rb
58
62
  - lib/tinkerforge/bricklet_hall_effect.rb
63
+ - lib/tinkerforge/bricklet_hall_effect_v2.rb
59
64
  - lib/tinkerforge/bricklet_humidity.rb
60
65
  - lib/tinkerforge/bricklet_humidity_v2.rb
61
66
  - lib/tinkerforge/bricklet_industrial_analog_out.rb
@@ -78,7 +83,9 @@ files:
78
83
  - lib/tinkerforge/bricklet_io4_v2.rb
79
84
  - lib/tinkerforge/bricklet_isolator.rb
80
85
  - lib/tinkerforge/bricklet_joystick.rb
86
+ - lib/tinkerforge/bricklet_joystick_v2.rb
81
87
  - lib/tinkerforge/bricklet_laser_range_finder.rb
88
+ - lib/tinkerforge/bricklet_laser_range_finder_v2.rb
82
89
  - lib/tinkerforge/bricklet_lcd_128x64.rb
83
90
  - lib/tinkerforge/bricklet_lcd_16x2.rb
84
91
  - lib/tinkerforge/bricklet_lcd_20x4.rb
@@ -86,6 +93,7 @@ files:
86
93
  - lib/tinkerforge/bricklet_led_strip_v2.rb
87
94
  - lib/tinkerforge/bricklet_line.rb
88
95
  - lib/tinkerforge/bricklet_linear_poti.rb
96
+ - lib/tinkerforge/bricklet_linear_poti_v2.rb
89
97
  - lib/tinkerforge/bricklet_load_cell.rb
90
98
  - lib/tinkerforge/bricklet_load_cell_v2.rb
91
99
  - lib/tinkerforge/bricklet_moisture.rb
@@ -103,6 +111,7 @@ files:
103
111
  - lib/tinkerforge/bricklet_particulate_matter.rb
104
112
  - lib/tinkerforge/bricklet_piezo_buzzer.rb
105
113
  - lib/tinkerforge/bricklet_piezo_speaker.rb
114
+ - lib/tinkerforge/bricklet_piezo_speaker_v2.rb
106
115
  - lib/tinkerforge/bricklet_ptc.rb
107
116
  - lib/tinkerforge/bricklet_ptc_v2.rb
108
117
  - lib/tinkerforge/bricklet_real_time_clock.rb
@@ -112,6 +121,7 @@ files:
112
121
  - lib/tinkerforge/bricklet_rgb_led.rb
113
122
  - lib/tinkerforge/bricklet_rgb_led_button.rb
114
123
  - lib/tinkerforge/bricklet_rgb_led_matrix.rb
124
+ - lib/tinkerforge/bricklet_rgb_led_v2.rb
115
125
  - lib/tinkerforge/bricklet_rotary_encoder.rb
116
126
  - lib/tinkerforge/bricklet_rotary_encoder_v2.rb
117
127
  - lib/tinkerforge/bricklet_rotary_poti.rb
@@ -119,6 +129,7 @@ files:
119
129
  - lib/tinkerforge/bricklet_rs232_v2.rb
120
130
  - lib/tinkerforge/bricklet_rs485.rb
121
131
  - lib/tinkerforge/bricklet_segment_display_4x7.rb
132
+ - lib/tinkerforge/bricklet_segment_display_4x7_v2.rb
122
133
  - lib/tinkerforge/bricklet_solid_state_relay.rb
123
134
  - lib/tinkerforge/bricklet_solid_state_relay_v2.rb
124
135
  - lib/tinkerforge/bricklet_sound_intensity.rb
@@ -160,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
171
  version: '0'
161
172
  requirements: []
162
173
  rubyforge_project:
163
- rubygems_version: 2.5.2.1
174
+ rubygems_version: 2.7.6
164
175
  signing_key:
165
176
  specification_version: 4
166
177
  summary: Ruby API Bindings for Tinkerforge Bricks and Bricklets