lxp-packet 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7aaa9f0df8afa2c5c3c3c5652f8dc437c86fd400b499b400b61220c60795c88
4
- data.tar.gz: 73ec58f5d96b333555e6d6fd3e45c56c50e389bab58ab6e25b992276e9c6a4d3
3
+ metadata.gz: 297e7f26d9fc8a69bfe411de6907a672fdbd1457eb35d1dc9354f18aea62db1a
4
+ data.tar.gz: 6b022bbca9e6b6a530f7b4182d18d64e5392d78617a4579c0faf86b07699da0a
5
5
  SHA512:
6
- metadata.gz: 1874992682079715b761e8a68c8abc4c643c39b9398541934360e982eb91fb25e5f8e4cffbe504711edc38bd9b29cb42b89037ac7b5ea5c05dd792d790e235b0
7
- data.tar.gz: ae61d070c93e133eac2a3240c649c13184b1da69fe5f0faaa45fa15d7180d4022d690c8e72587f496aa692983f726524e60b1601db0fc10a6bfafbd7167da7ad
6
+ metadata.gz: f65e7eb3dc601ddd03ab19524a1c444a679c0c25b9c83022588f864e27dea46e82c3127e744e951bd9f984e9e71f2e3df973fcd8c1a436d29d1bed4fdb581d25
7
+ data.tar.gz: 00bdbddaf9cbddecd27a72602d8a4d832bcc6b2d06bea8b1ec2f2d43c64c4da9e8ac54143014a3e798408b255bc275c098d8e2f277b0a76e2a1b59903db4859e
data/CHANGELOG.md CHANGED
@@ -5,13 +5,16 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [0.1.2] - 2020-01-15
8
+ ## [Unreleased]
9
+
10
+
11
+ ## [0.2.0] - 2020-01-26
9
12
 
10
13
  ### Fixed
11
14
 
12
- - broken require 'utils' in 0.1.1
15
+ - bitshifting logic when reading packets
13
16
 
14
- ## [0.1.1] - 2020-01-15
17
+ ## [0.1.2] - 2020-01-15
15
18
 
16
19
  ### Changed
17
20
 
@@ -64,7 +64,7 @@ class LXP
64
64
  end
65
65
 
66
66
  def protocol
67
- @header[2] | @header[3] >> 8
67
+ @header[2] | @header[3] << 8
68
68
  end
69
69
 
70
70
  def protocol=(protocol)
@@ -73,7 +73,7 @@ class LXP
73
73
  end
74
74
 
75
75
  def packet_length
76
- @header[4] | @header[5] >> 8
76
+ @header[4] | @header[5] << 8
77
77
  end
78
78
 
79
79
  def packet_length=(packet_length)
@@ -95,7 +95,7 @@ class LXP
95
95
  end
96
96
 
97
97
  def data_length
98
- @header[18] | @header[19] >> 8
98
+ @header[18] | @header[19] << 8
99
99
  end
100
100
 
101
101
  def data_length=(data_length)
@@ -117,7 +117,7 @@ class LXP
117
117
  end
118
118
 
119
119
  def register
120
- @data[12] | @data[13] >> 8
120
+ @data[12] | @data[13] << 8
121
121
  end
122
122
 
123
123
  def register=(register)
@@ -148,7 +148,7 @@ class LXP
148
148
  if value_length_byte?
149
149
  @data[15, value_length]
150
150
  else
151
- @data[14] | @data[15] >> 8
151
+ @data[14] | @data[15] << 8
152
152
  end
153
153
  end
154
154
 
data/lib/lxp/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class LXP
4
- VERSION = '0.1.2'
4
+ VERSION = '0.2.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lxp-packet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Elsworth
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-15 00:00:00.000000000 Z
11
+ date: 2020-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  requirements: []
79
- rubygems_version: 3.0.3
79
+ rubygems_version: 3.0.6
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: Library to generate and parse LuxPower inverter packets