tilt_hydrometer 0.2.0.pre3 → 0.2.0.pre7

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.

Potentially problematic release.


This version of tilt_hydrometer might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 288a9f630ede55728b28dab145c1d42c7e45772aacc742a765544b3d262350bf
4
- data.tar.gz: 3997de0fcbbd4444ab8192cf22fbfb882a62111ab30a31bb2e275e13e92d946a
3
+ metadata.gz: 0d94f4986105bc7fc8903c915d3f1bf21615002e1b20e2e35cd942db5b97746c
4
+ data.tar.gz: 9a54f4ded65c32a3ddf22e37a6e7aca74b16716cf200c05c70ccf08696866208
5
5
  SHA512:
6
- metadata.gz: 2a4bd6c46314fc146e3dc38d26761e32348aa29344010047d6de9bf797db6dcb1b240ba0d672aefbb7cfc1524d266f2f18430b274c5b3a89236b226ad7e6de49
7
- data.tar.gz: 3e6d12dda9ee288f26b0028598c7ed4a09c8a377e162ad5c835f9755360f0a067406061809a0370ade83b027f94dcfb2a20635b769685db7f80efff50eefbb26
6
+ metadata.gz: d14be5c2f70c64d066f495841805979d00ad51409ce1c37d667499036acf4684c68658faf62d0640268c2ea60c89dfb261fa7078aa4b39deb07f2bea9467e697
7
+ data.tar.gz: fe9f1d848b054b85c96fd546bd39979bda8ba481696d82daa385208db83c26ed5faecefd9ce6464912f7d9f33444737e5302691115be48c7ffa6a5e453598d84
@@ -9,7 +9,7 @@ module TiltHydrometer
9
9
  end
10
10
 
11
11
  def color
12
- TiltHydrometer::DEVICES[uuid]
12
+ TiltHydrometer::DEVICES[@uuid]
13
13
  end
14
14
 
15
15
  def temp
@@ -43,9 +43,11 @@ module TiltHydrometer
43
43
 
44
44
  def log
45
45
  LOGGER.debug("Beacon: #{inspect}")
46
- LOGGER.debug("Temp: #{temp.inspect}")
47
- LOGGER.debug("Gravity: #{gravity.inspect}")
48
- LOGGER.debug("UUID: #{uuid.inspect}")
46
+ LOGGER.debug("Temp: #{temp}")
47
+ LOGGER.debug("Celsius: #{celsius}")
48
+ LOGGER.debug("Gravity: #{gravity}")
49
+ LOGGER.debug("Color: #{color}")
50
+ LOGGER.debug("UUID: #{@uuid}")
49
51
  end
50
52
  end
51
53
  end
@@ -32,7 +32,7 @@ module TiltHydrometer
32
32
  if match = data.match(/\h{40}(A495BB[1-8]0C5B14B44B5121370F02D74DE)(\h{4})(\h{4})(\h{2})(\h{2})/i)
33
33
  uuid, temp, gravity, _power, _rssi = match.captures
34
34
 
35
- beacon = Beacon.new(uuid, temp, gravity)
35
+ beacon = Beacon.new(uuid, temp.to_i(16), gravity.to_i(16))
36
36
  beacon.log
37
37
 
38
38
  if beacon.values_out_of_range?
@@ -2,13 +2,13 @@
2
2
 
3
3
  module TiltHydrometer
4
4
  DEVICES = {
5
- 'A495BB10-C5B1-4B44-B512-1370F02D74DE' => 'Red',
6
- 'A495BB20-C5B1-4B44-B512-1370F02D74DE' => 'Green',
7
- 'A495BB30-C5B1-4B44-B512-1370F02D74DE' => 'Black',
8
- 'A495BB40-C5B1-4B44-B512-1370F02D74DE' => 'Purple',
9
- 'A495BB50-C5B1-4B44-B512-1370F02D74DE' => 'Orange',
10
- 'A495BB60-C5B1-4B44-B512-1370F02D74DE' => 'Blue',
11
- 'A495BB70-C5B1-4B44-B512-1370F02D74DE' => 'Yellow',
12
- 'A495BB80-C5B1-4B44-B512-1370F02D74DE' => 'Pink'
5
+ 'A495BB10C5B14B44B5121370F02D74DE' => 'Red',
6
+ 'A495BB20C5B14B44B5121370F02D74DE' => 'Green',
7
+ 'A495BB30C5B14B44B5121370F02D74DE' => 'Black',
8
+ 'A495BB40C5B14B44B5121370F02D74DE' => 'Purple',
9
+ 'A495BB50C5B14B44B5121370F02D74DE' => 'Orange',
10
+ 'A495BB60C5B14B44B5121370F02D74DE' => 'Blue',
11
+ 'A495BB70C5B14B44B5121370F02D74DE' => 'Yellow',
12
+ 'A495BB80C5B14B44B5121370F02D74DE' => 'Pink'
13
13
  }.freeze
14
14
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TiltHydrometer
4
- VERSION = '0.2.0.pre3'
4
+ VERSION = '0.2.0.pre7'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tilt_hydrometer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.pre3
4
+ version: 0.2.0.pre7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steffen Schröder