tinderfridge 0.7.0 → 0.10.0
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/tinderfridge/device.rb +44 -3
- data/lib/tinderfridge/device_collection.rb +3 -1
- data/lib/tinderfridge/devices/brick_master/brick_master.json +11 -0
- data/lib/tinderfridge/devices/brick_master/brick_master.rb +11 -0
- data/lib/tinderfridge/devices/bricklet_accelerometer_v2/bricklet_accelerometer_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_air_quality/bricklet_air_quality.json +2 -1
- data/lib/tinderfridge/devices/bricklet_air_quality/bricklet_air_quality.rb +15 -0
- data/lib/tinderfridge/devices/bricklet_ambient_light_v3/bricklet_ambient_light_v3.json +2 -1
- data/lib/tinderfridge/devices/bricklet_analog_in_v3/bricklet_analog_in_v3.json +2 -1
- data/lib/tinderfridge/devices/bricklet_analog_out_v3/bricklet_analog_out_v3.json +2 -1
- data/lib/tinderfridge/devices/bricklet_barometer_v2/bricklet_barometer_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_co2_v2/bricklet_co2_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_co2_v2/bricklet_co2_v2.rb +19 -0
- data/lib/tinderfridge/devices/bricklet_color_v2/bricklet_color_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_compass/bricklet_compass.json +2 -1
- data/lib/tinderfridge/devices/bricklet_distance_ir_v2/bricklet_distance_ir_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_distance_us_v2/bricklet_distance_us_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_dmx/bricklet_dmx.json +2 -1
- data/lib/tinderfridge/devices/bricklet_dual_button_v2/bricklet_dual_button_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_e_paper_296x128/bricklet_e_paper_296x128.json +2 -1
- data/lib/tinderfridge/devices/bricklet_energy_monitor/bricklet_energy_monitor.json +2 -1
- data/lib/tinderfridge/devices/bricklet_gps_v2/bricklet_gps_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_gps_v2/bricklet_gps_v2.rb +21 -1
- data/lib/tinderfridge/devices/bricklet_hall_effect_v2/bricklet_hall_effect_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_hall_effect_v2/bricklet_hall_effect_v2.rb +16 -0
- data/lib/tinderfridge/devices/bricklet_humidity_v2/bricklet_humidity_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_imu_v3/bricklet_imu_v3.json +2 -1
- data/lib/tinderfridge/devices/bricklet_industrial_analog_out_v2/bricklet_industrial_analog_out_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_industrial_dual_0_20ma_v2/bricklet_industrial_dual_0_20ma_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_industrial_dual_ac_relay/bricklet_industrial_dual_ac_relay.json +11 -0
- data/lib/tinderfridge/devices/bricklet_industrial_dual_analog_in_v2/bricklet_industrial_dual_analog_in_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_industrial_dual_relay/bricklet_industrial_dual_relay.json +2 -1
- data/lib/tinderfridge/devices/bricklet_io16_v2/bricklet_io16_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_io4_v2/bricklet_io4_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_isolator/bricklet_isolator.json +2 -1
- data/lib/tinderfridge/devices/bricklet_joystick_v2/bricklet_joystick_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_laser_range_finder_v2/bricklet_laser_range_finder_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_lcd_128x64/bricklet_lcd_128x64.json +2 -1
- data/lib/tinderfridge/devices/bricklet_lcd_128x64/bricklet_lcd_128x64.rb +46 -0
- data/lib/tinderfridge/devices/bricklet_led_strip_v2/bricklet_led_strip_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_linear_poti_v2/bricklet_linear_poti_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_load_cell_v2/bricklet_load_cell_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_motion_detector_v2/bricklet_motion_detector_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_motorized_linear_poti/bricklet_motorized_linear_poti.json +2 -1
- data/lib/tinderfridge/devices/bricklet_multi_touch_v2/bricklet_multi_touch_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_nfc/bricklet_nfc.json +2 -1
- data/lib/tinderfridge/devices/bricklet_oled_128x64_v2/bricklet_oled_128x64_v2.rb +79 -0
- data/lib/tinderfridge/devices/bricklet_one_wire/bricklet_one_wire.json +11 -0
- data/lib/tinderfridge/devices/bricklet_outdoor_weather/bricklet_outdoor_weather.json +2 -1
- data/lib/tinderfridge/devices/bricklet_particulate_matter/bricklet_particulate_matter.json +11 -0
- data/lib/tinderfridge/devices/bricklet_piezo_speaker_v2/bricklet_piezo_speaker_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_ptc_v2/bricklet_ptc_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_real_time_clock_v2/bricklet_real_time_clock_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_remote_switch_v2/bricklet_remote_switch_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_rgb_led_button/bricklet_rgb_led_button.json +2 -1
- data/lib/tinderfridge/devices/bricklet_rgb_led_v2/bricklet_rgb_led_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_rotary_encoder_v2/bricklet_rotary_encoder_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_rotary_poti_v2/bricklet_rotary_poti_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_segment_display_4x7_v2/bricklet_segment_display_4x7_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_segment_display_4x7_v2/bricklet_segment_display_4x7_v2.rb +25 -1
- data/lib/tinderfridge/devices/bricklet_solid_state_relay_v2/bricklet_solid_state_relay_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_sound_pressure_level/bricklet_sound_pressure_level.json +2 -1
- data/lib/tinderfridge/devices/bricklet_sound_pressure_level/bricklet_sound_pressure_level.rb +20 -0
- data/lib/tinderfridge/devices/bricklet_temperature_ir_v2/bricklet_temperature_ir_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_temperature_ir_v2/bricklet_temperature_ir_v2.rb +14 -0
- data/lib/tinderfridge/devices/bricklet_temperature_v2/bricklet_temperature_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_thermal_imaging/bricklet_thermal_imaging.json +2 -1
- data/lib/tinderfridge/devices/bricklet_thermocouple_v2/bricklet_thermocouple_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_uv_light_v2/bricklet_uv_light_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_voltage_current_v2/bricklet_voltage_current_v2.json +2 -1
- data/lib/tinderfridge/devices/bricklet_xmc1400_breakout/bricklet_xmc1400_breakout.json +2 -1
- data/lib/tinderfridge/ip_connection.rb +19 -11
- data/lib/tinderfridge/shared/display_ibm437_encoding.rb +41 -0
- data/lib/tinderfridge/tinkerforge.rb +24 -9
- data/lib/tinderfridge/version.rb +1 -1
- metadata +27 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a38ff1936a5557806bbd57e497dedda5b7d244b0e5cc4773d89d38265343affa
|
|
4
|
+
data.tar.gz: 45b04a762c008a25d5bfc02d61cc254b4b655eaacc460e9f99b7308c47734ea7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2ab3a4497bfb859e8b4a82e37edbad2ebee17c1b9c830a5cda9030c206f7a4188987cef28f5420299555568b682e93ad48daec128d18190ec435b02b2a64a1d7
|
|
7
|
+
data.tar.gz: 7209808acb2f9bc4f7ef0ad9770f57f6e66837962f19480d88b91def64a15b3af6f19e761c47ed1623a38852efbb0de6aa5ad8348c5b08c65336f9e955e83a18
|
data/lib/tinderfridge/device.rb
CHANGED
|
@@ -109,7 +109,13 @@ module Tinkerforge
|
|
|
109
109
|
[ 'ipcon' , { 'host' => ipcon.host , 'port' => ipcon.port } ],
|
|
110
110
|
|
|
111
111
|
respond_to?('get_chip_temperature' ) ? [ 'chip_temperature' , get_chip_temperature ] : nil,
|
|
112
|
-
|
|
112
|
+
|
|
113
|
+
if respond_to?('get_spitfp_error_count') and (method(:get_spitfp_error_count).arity == 0)
|
|
114
|
+
[ 'spitfp_error_count', get_spitfp_error_count ]
|
|
115
|
+
else
|
|
116
|
+
nil
|
|
117
|
+
end,
|
|
118
|
+
|
|
113
119
|
respond_to?('get_status_led_config' ) ? [ 'status_led_config' , get_status_led_config ] : nil,
|
|
114
120
|
|
|
115
121
|
].compact.to_h
|
|
@@ -131,9 +137,30 @@ module Tinkerforge
|
|
|
131
137
|
|
|
132
138
|
# Identifies a Tinkerforge device by blinking its status led.
|
|
133
139
|
#
|
|
134
|
-
# Supports recent devices. When invoked on older devices, does nothing.
|
|
140
|
+
# Supports recent devices. When invoked on some older devices, does nothing.
|
|
135
141
|
def identify(seconds=10)
|
|
136
|
-
|
|
142
|
+
case status_led_api_variety
|
|
143
|
+
when 1
|
|
144
|
+
seconds = seconds.to_i
|
|
145
|
+
state = is_status_led_enabled
|
|
146
|
+
|
|
147
|
+
(seconds*2).times do |n|
|
|
148
|
+
if n.even?
|
|
149
|
+
disable_status_led
|
|
150
|
+
else
|
|
151
|
+
enable_status_led
|
|
152
|
+
end
|
|
153
|
+
sleep 0.5
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if state
|
|
157
|
+
enable_status_led
|
|
158
|
+
else
|
|
159
|
+
disable_status_led
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
seconds
|
|
163
|
+
when 2
|
|
137
164
|
seconds = seconds.to_i
|
|
138
165
|
state = get_status_led_config
|
|
139
166
|
|
|
@@ -175,6 +202,20 @@ module Tinkerforge
|
|
|
175
202
|
end
|
|
176
203
|
end
|
|
177
204
|
|
|
205
|
+
def status_led_api_variety
|
|
206
|
+
@status_led_api_variety ||=
|
|
207
|
+
if ( respond_to?('get_status_led_config') &&
|
|
208
|
+
respond_to?('set_status_led_config') )
|
|
209
|
+
2
|
|
210
|
+
elsif ( respond_to?('is_status_led_enabled') &&
|
|
211
|
+
respond_to?('enable_status_led') &&
|
|
212
|
+
respond_to?('disable_status_led') )
|
|
213
|
+
1
|
|
214
|
+
else
|
|
215
|
+
nil
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
|
|
178
219
|
end
|
|
179
220
|
|
|
180
221
|
end
|
|
@@ -5,6 +5,8 @@ module Tinkerforge
|
|
|
5
5
|
# Returns the temperatures as measured inside the microcontrollers of devices in the collection.
|
|
6
6
|
#
|
|
7
7
|
# Nil for devices that do not support the get_chip_temperature method.
|
|
8
|
+
#
|
|
9
|
+
# Note: most devices return temperature in °C, but a few return temperature in 1/10 °C.
|
|
8
10
|
def get_chip_temperature
|
|
9
11
|
smap 'get_chip_temperature'
|
|
10
12
|
end
|
|
@@ -135,7 +137,7 @@ module Tinkerforge
|
|
|
135
137
|
private
|
|
136
138
|
|
|
137
139
|
def smap(m)
|
|
138
|
-
map { |k,d| [ k, d.respond_to?(m) ? d.send(m) : nil ] }.to_h
|
|
140
|
+
map { |k,d| [ k, ( d.respond_to?(m) and (d.method(m).arity == 0) ) ? d.send(m) : nil ] }.to_h
|
|
139
141
|
end
|
|
140
142
|
|
|
141
143
|
end
|
|
@@ -15,6 +15,21 @@ module Tinkerforge
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
# Returns the derived air pressure at sea level.
|
|
19
|
+
#
|
|
20
|
+
# Air pressure is derived from:
|
|
21
|
+
# - air pressure as measured by the Bricklet itself
|
|
22
|
+
# - temperature as measured by the Bricklet itself
|
|
23
|
+
# - altitude of the Bricklet's location (meter)
|
|
24
|
+
#
|
|
25
|
+
# With help from:
|
|
26
|
+
# - https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Barometer_V2.html
|
|
27
|
+
# - https://keisan.casio.com/exec/system/1224575267
|
|
28
|
+
def qff(altitude)
|
|
29
|
+
# QFE / [1 - Tg * H / (273.15 + Tfe + Tg * H)] ^ (0.034163 / Tg)
|
|
30
|
+
(get_air_pressure / (1 - 0.0065 * altitude / (273.15 + (get_temperature * 0.01) + 0.0065 * altitude)) ** (0.034163 / 0.0065)).round
|
|
31
|
+
end
|
|
32
|
+
|
|
18
33
|
end
|
|
19
34
|
|
|
20
35
|
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Tinkerforge
|
|
2
|
+
|
|
3
|
+
class BrickletCO2V2
|
|
4
|
+
|
|
5
|
+
# Returns the device's state.
|
|
6
|
+
def state
|
|
7
|
+
av = get_all_values
|
|
8
|
+
super.merge(
|
|
9
|
+
'co2_concentration' => av[0],
|
|
10
|
+
'temperature' => av[1],
|
|
11
|
+
'temperature_offset' => get_temperature_offset,
|
|
12
|
+
'humidity' => av[2],
|
|
13
|
+
'air_pressure' => get_air_pressure,
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
end
|
|
@@ -2,11 +2,24 @@ module Tinkerforge
|
|
|
2
2
|
|
|
3
3
|
class BrickletGPSV2
|
|
4
4
|
|
|
5
|
+
# Returns the device's state.
|
|
6
|
+
def state
|
|
7
|
+
super.merge(
|
|
8
|
+
'fix_led_config' => get_fix_led_config,
|
|
9
|
+
'fix' => fix?,
|
|
10
|
+
)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Returns true if a fix is available.
|
|
14
|
+
def fix?
|
|
15
|
+
get_status[0]
|
|
16
|
+
end
|
|
17
|
+
|
|
5
18
|
# Returns latitude and longitude as reported by the GPS Bricklet.
|
|
6
19
|
#
|
|
7
20
|
# Nil when there is no fix (position not determined).
|
|
8
21
|
def coordinates
|
|
9
|
-
if
|
|
22
|
+
if fix?
|
|
10
23
|
c = get_coordinates
|
|
11
24
|
[
|
|
12
25
|
c[0] / (c[1] == 'N' ? 1000000.0 : -1000000.0),
|
|
@@ -26,6 +39,13 @@ module Tinkerforge
|
|
|
26
39
|
Time.gm *dt.map(&:to_i)
|
|
27
40
|
end
|
|
28
41
|
|
|
42
|
+
# Returns a URL for viewing the current coordinates on OpenStreetMap.
|
|
43
|
+
def openstreetmap_marker_url(zoom=12)
|
|
44
|
+
if c = coordinates
|
|
45
|
+
"https://www.openstreetmap.org/?mlat=%f&mlon=%f&zoom=%d" % [c, zoom].flatten
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
29
49
|
end
|
|
30
50
|
|
|
31
51
|
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module Tinkerforge
|
|
2
|
+
|
|
3
|
+
class BrickletHallEffectV2
|
|
4
|
+
|
|
5
|
+
# Returns the device's state.
|
|
6
|
+
def state
|
|
7
|
+
super.merge(
|
|
8
|
+
'magnetic_flux_density' => get_magnetic_flux_density,
|
|
9
|
+
'counter' => get_counter(false),
|
|
10
|
+
'counter_config' => get_counter_config,
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"dimensions": [
|
|
3
|
+
40,
|
|
4
|
+
40,
|
|
5
|
+
11
|
|
6
|
+
],
|
|
7
|
+
"weight": 9,
|
|
8
|
+
"documentation_en_url": "https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_Analog_Out_V2.html",
|
|
9
|
+
"versions_identifier": "bricklets:industrial_analog_out_v2",
|
|
10
|
+
"released": "2018-09-27"
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"dimensions": [
|
|
3
|
+
40,
|
|
4
|
+
40,
|
|
5
|
+
11
|
|
6
|
+
],
|
|
7
|
+
"weight": 8,
|
|
8
|
+
"documentation_en_url": "https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_Dual_020mA_V2.html",
|
|
9
|
+
"versions_identifier": "bricklets:industrial_dual_0_20ma_v2",
|
|
10
|
+
"released": "2018-09-27"
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"dimensions": [
|
|
3
|
+
40,
|
|
4
|
+
40,
|
|
5
|
+
16
|
|
6
|
+
],
|
|
7
|
+
"weight": 11,
|
|
8
|
+
"documentation_en_url": "https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_Dual_AC_Relay.html",
|
|
9
|
+
"versions_identifier": "bricklets:industrial_dual_ac_relay",
|
|
10
|
+
"released": "2020-10-27"
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"dimensions": [
|
|
3
|
+
40,
|
|
4
|
+
40,
|
|
5
|
+
11
|
|
6
|
+
],
|
|
7
|
+
"weight": 9,
|
|
8
|
+
"documentation_en_url": "https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_Dual_Analog_In_V2.html",
|
|
9
|
+
"versions_identifier": "bricklets:industrial_dual_analog_in_v2",
|
|
10
|
+
"released": "2018-09-27"
|
|
11
|
+
}
|
data/lib/tinderfridge/devices/bricklet_industrial_dual_relay/bricklet_industrial_dual_relay.json
CHANGED
|
@@ -6,5 +6,6 @@
|
|
|
6
6
|
],
|
|
7
7
|
"weight": 29.4,
|
|
8
8
|
"documentation_en_url": "https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_Dual_Relay.html",
|
|
9
|
-
"versions_identifier": "bricklets:industrial_dual_relay"
|
|
9
|
+
"versions_identifier": "bricklets:industrial_dual_relay",
|
|
10
|
+
"released": "2018-06-07"
|
|
10
11
|
}
|
data/lib/tinderfridge/devices/bricklet_laser_range_finder_v2/bricklet_laser_range_finder_v2.json
CHANGED
|
@@ -6,5 +6,6 @@
|
|
|
6
6
|
],
|
|
7
7
|
"weight": 30,
|
|
8
8
|
"documentation_en_url": "https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Laser_Range_Finder_V2.html",
|
|
9
|
-
"versions_identifier": "bricklets:laser_range_finder_v2"
|
|
9
|
+
"versions_identifier": "bricklets:laser_range_finder_v2",
|
|
10
|
+
"released": "2019-05-20"
|
|
10
11
|
}
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
+
require 'tinderfridge/shared/display_ibm437_encoding'
|
|
2
|
+
|
|
1
3
|
module Tinkerforge
|
|
2
4
|
|
|
3
5
|
class BrickletLCD128x64
|
|
4
6
|
|
|
7
|
+
include Tinkerforge::Shared::IBM437_encoding
|
|
8
|
+
|
|
9
|
+
# Encodes a string in the IBM437 character set used by some displays.
|
|
10
|
+
#
|
|
11
|
+
# Characters that can not be encoded are replaced with '?'.
|
|
12
|
+
#
|
|
13
|
+
# See:
|
|
14
|
+
# - https://en.wikipedia.org/wiki/Code_page_437
|
|
15
|
+
def encode(string)
|
|
16
|
+
ibm437_encode(string)
|
|
17
|
+
end
|
|
18
|
+
|
|
5
19
|
# Returns the current setting for the backlight (0..100).
|
|
6
20
|
def backlight
|
|
7
21
|
get_display_configuration[1]
|
|
@@ -20,12 +34,44 @@ module Tinkerforge
|
|
|
20
34
|
true
|
|
21
35
|
end
|
|
22
36
|
|
|
37
|
+
# Returns the current contrast setting (0..63).
|
|
38
|
+
def contrast
|
|
39
|
+
get_display_configuration[0]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Sets the contrast (0..63).
|
|
43
|
+
def contrast=(value)
|
|
44
|
+
state = get_display_configuration
|
|
45
|
+
state[0] = value.to_i
|
|
46
|
+
set_display_configuration *state
|
|
47
|
+
end
|
|
48
|
+
|
|
23
49
|
# Clears the display, including the GUI.
|
|
24
50
|
def clear
|
|
25
51
|
clear_display
|
|
26
52
|
remove_all_gui
|
|
27
53
|
end
|
|
28
54
|
|
|
55
|
+
# Returns true if automatic draw is set to false.
|
|
56
|
+
def buffered?
|
|
57
|
+
! get_display_configuration[3]
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Draws the currently buffered frame.
|
|
61
|
+
def redraw(force_complete_redraw=false)
|
|
62
|
+
draw_buffered_frame force_complete_redraw
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
alias flush redraw
|
|
66
|
+
|
|
67
|
+
# Returns the device's state.
|
|
68
|
+
def state
|
|
69
|
+
super.merge(
|
|
70
|
+
'touch_led_config' => get_touch_led_config,
|
|
71
|
+
'display_configuration' => get_display_configuration,
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
|
|
29
75
|
end
|
|
30
76
|
|
|
31
77
|
end
|
|
@@ -6,5 +6,6 @@
|
|
|
6
6
|
],
|
|
7
7
|
"weight": 6,
|
|
8
8
|
"documentation_en_url": "https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Motion_Detector_V2.html",
|
|
9
|
-
"versions_identifier": "bricklets:motion_detector_v2"
|
|
9
|
+
"versions_identifier": "bricklets:motion_detector_v2",
|
|
10
|
+
"released": "2018-02-26"
|
|
10
11
|
}
|
data/lib/tinderfridge/devices/bricklet_motorized_linear_poti/bricklet_motorized_linear_poti.json
CHANGED
|
@@ -6,5 +6,6 @@
|
|
|
6
6
|
],
|
|
7
7
|
"weight": 67,
|
|
8
8
|
"documentation_en_url": "https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Motorized_Linear_Poti.html",
|
|
9
|
-
"versions_identifier": "bricklets:motorized_linear_poti"
|
|
9
|
+
"versions_identifier": "bricklets:motorized_linear_poti",
|
|
10
|
+
"released": "2017-11-17"
|
|
10
11
|
}
|