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 +4 -4
- data/CHANGELOG.md +6 -3
- data/lib/lxp/packet/base.rb +5 -5
- data/lib/lxp/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 297e7f26d9fc8a69bfe411de6907a672fdbd1457eb35d1dc9354f18aea62db1a
|
4
|
+
data.tar.gz: 6b022bbca9e6b6a530f7b4182d18d64e5392d78617a4579c0faf86b07699da0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
## [
|
8
|
+
## [Unreleased]
|
9
|
+
|
10
|
+
|
11
|
+
## [0.2.0] - 2020-01-26
|
9
12
|
|
10
13
|
### Fixed
|
11
14
|
|
12
|
-
-
|
15
|
+
- bitshifting logic when reading packets
|
13
16
|
|
14
|
-
## [0.1.
|
17
|
+
## [0.1.2] - 2020-01-15
|
15
18
|
|
16
19
|
### Changed
|
17
20
|
|
data/lib/lxp/packet/base.rb
CHANGED
@@ -64,7 +64,7 @@ class LXP
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def protocol
|
67
|
-
@header[2] | @header[3]
|
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]
|
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]
|
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]
|
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]
|
151
|
+
@data[14] | @data[15] << 8
|
152
152
|
end
|
153
153
|
end
|
154
154
|
|
data/lib/lxp/version.rb
CHANGED
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.
|
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-
|
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.
|
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
|