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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf947122caab09ed616e7a81dc9e88c2b1d3a210814e4c40d340de888684826c
4
- data.tar.gz: de8330a9394d9fe2e1a54bc1a4eed14e2655e419a488ca6f1479f7598afcc9e0
3
+ metadata.gz: 6e16031b6fb7be30fcf5e298caff20e113ecd967a50e1e17ea91c4b2481024df
4
+ data.tar.gz: ba659cd2a69837466c6d7941dd8f7e8a9f9fecd9b0cd9cdfafebcc05b4e8bc93
5
5
  SHA512:
6
- metadata.gz: 3e9f46a09af303087acbd25f0b50b04bfa1dc176a8b78fcb31fd21b0d2da7157f83ea56540530b1eaea0e42a0b8c8627f5a333763f35da9f3fdf888d83b0f9fe
7
- data.tar.gz: 6ccb2e3fc79f077e09e1b5c215046c02adc059c66e5fbcae8752c918d6115c68b31c108c732f3a9b022fc7d07ac07e81fa06ffa737e531d2a37ec97e37c6eb4e
6
+ metadata.gz: e0f3d7c37ded477f631813a1f09f0c069ca55c54432b292a5a60bd73a6cd37c3f0983b6236ac062215445ba34583d3ac31aa5c779cd66572f422bd0f99bc6942
7
+ data.tar.gz: be703b74bc4fa90993fcf8bcc81ec978b6022b9e6846a347c491d8750de36269e42d4fbf4994150ec59ec9ef7e0d805086459a1d07263bde82e5afab1e6419be
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "serialport"
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
- packets.each do |packet|
32
- packet.each do |byte|
33
- printf("%.2X ", byte) if verbose
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
- serial_port.write(byte.chr)
36
+ serial_port.write(byte.chr)
36
37
 
37
- sleep(byte_sleep)
38
- end
38
+ sleep(byte_sleep)
39
+ end
39
40
 
40
- sleep(packet_sleep)
41
+ sleep(packet_sleep)
41
42
 
42
- puts if verbose
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class TimexDatalinkClient
4
- VERSION = "0.12.3"
4
+ VERSION = "0.12.4"
5
5
  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.3
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: 2023-08-13 00:00:00.000000000 Z
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: serialport
56
+ name: uart
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.3.2
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.3.2
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.3
153
+ homepage: https://github.com/synthead/timex_datalink_client/tree/v0.12.4
154
154
  licenses:
155
155
  - MIT
156
156
  metadata: {}