timex_datalink_client 0.12.3 → 0.12.4
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/timex_datalink_client/notebook_adapter.rb +11 -15
- data/lib/timex_datalink_client/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e16031b6fb7be30fcf5e298caff20e113ecd967a50e1e17ea91c4b2481024df
|
4
|
+
data.tar.gz: ba659cd2a69837466c6d7941dd8f7e8a9f9fecd9b0cd9cdfafebcc05b4e8bc93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0f3d7c37ded477f631813a1f09f0c069ca55c54432b292a5a60bd73a6cd37c3f0983b6236ac062215445ba34583d3ac31aa5c779cd66572f422bd0f99bc6942
|
7
|
+
data.tar.gz: be703b74bc4fa90993fcf8bcc81ec978b6022b9e6846a347c491d8750de36269e42d4fbf4994150ec59ec9ef7e0d805086459a1d07263bde82e5afab1e6419be
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "
|
3
|
+
require "uart"
|
4
4
|
|
5
5
|
class TimexDatalinkClient
|
6
6
|
class NotebookAdapter
|
@@ -28,25 +28,21 @@ class TimexDatalinkClient
|
|
28
28
|
# @param packets [Array<Array<Integer>>] Two-dimensional array of integers that represent bytes.
|
29
29
|
# @return [void]
|
30
30
|
def write(packets)
|
31
|
-
|
32
|
-
|
33
|
-
|
31
|
+
UART.open(serial_device) do |serial_port|
|
32
|
+
packets.each do |packet|
|
33
|
+
packet.each do |byte|
|
34
|
+
printf("%.2X ", byte) if verbose
|
34
35
|
|
35
|
-
|
36
|
+
serial_port.write(byte.chr)
|
36
37
|
|
37
|
-
|
38
|
-
|
38
|
+
sleep(byte_sleep)
|
39
|
+
end
|
39
40
|
|
40
|
-
|
41
|
+
sleep(packet_sleep)
|
41
42
|
|
42
|
-
|
43
|
+
puts if verbose
|
44
|
+
end
|
43
45
|
end
|
44
46
|
end
|
45
|
-
|
46
|
-
private
|
47
|
-
|
48
|
-
def serial_port
|
49
|
-
@serial_port ||= SerialPort.new(serial_device)
|
50
|
-
end
|
51
47
|
end
|
52
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timex_datalink_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maxwell Pray
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -53,19 +53,19 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.5.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: uart
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.0.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: 1.0.0
|
69
69
|
description:
|
70
70
|
email: synthead@gmail.com
|
71
71
|
executables: []
|
@@ -150,7 +150,7 @@ files:
|
|
150
150
|
- lib/timex_datalink_client/protocol_9/time_name.rb
|
151
151
|
- lib/timex_datalink_client/protocol_9/timer.rb
|
152
152
|
- lib/timex_datalink_client/version.rb
|
153
|
-
homepage: https://github.com/synthead/timex_datalink_client/tree/v0.12.
|
153
|
+
homepage: https://github.com/synthead/timex_datalink_client/tree/v0.12.4
|
154
154
|
licenses:
|
155
155
|
- MIT
|
156
156
|
metadata: {}
|