timex_datalink_client 0.12.0 → 0.12.2

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: 6b3a3f3ffde31a9f937f60f6ebba23851aeacc62d49b5677f7769f7392a9a1ea
4
- data.tar.gz: 5a9f3acd574998d9bf430225459bb7f98f2954b5e1f6fff038a240145c5ffef5
3
+ metadata.gz: 04efc1048bf18dfffcca9859dc88248f834dad97074ca4e9c3f74ef3cc55d86a
4
+ data.tar.gz: b8722c9865c6a148a38f0f041d26c1fbfbfb729984500f3e8354693c4213b85e
5
5
  SHA512:
6
- metadata.gz: 93da0a4e3153cbeb4feaae86574a25034e315d82182833f5b7822796d00cc6d4dbc8f57830bde9e906b6e21471a6829808f0e621b432937314cfefb2090d52f7
7
- data.tar.gz: b4c516c8b2db51e393b60324ed0d723f00562f34823a6e43c62b07c276b6bfae7edaa9c4f8ab338af6b2fe395afed38729f4e072381d977baef6371c08370802
6
+ metadata.gz: 6345d5eab984a5898f0b0630cbac1149e0ccabc01f26df7533d90ff0b477c27cfaed51274c421f11f6867e070d72fa39530971d4703cf3d2afb83bd79b9439b1
7
+ data.tar.gz: e8f1f6773e5b3d0fef20da0ec0fd695510f93d902c37e5bf8bf9ce1efd03e822cde0fe69224dc5881e4d33d812ab210db841df829c90be8c1eebe31c3f7630d4
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "rubyserial"
3
+ require "serialport"
4
4
 
5
5
  class TimexDatalinkClient
6
6
  class NotebookAdapter
@@ -32,7 +32,7 @@ class TimexDatalinkClient
32
32
  packet.each do |byte|
33
33
  printf("%.2X ", byte) if verbose
34
34
 
35
- serial.write(byte.chr)
35
+ serial_port.write(byte.chr)
36
36
 
37
37
  sleep(byte_sleep)
38
38
  end
@@ -45,8 +45,8 @@ class TimexDatalinkClient
45
45
 
46
46
  private
47
47
 
48
- def serial
49
- @serial ||= Serial.new(serial_device)
48
+ def serial_port
49
+ @serial_port ||= SerialPort.new(serial_device)
50
50
  end
51
51
  end
52
52
  end
@@ -141,23 +141,23 @@ class TimexDatalinkClient
141
141
  end
142
142
 
143
143
  def second
144
- flex_time ? 0 : formatted_time.sec
144
+ flex_time ? 0 : time.sec
145
145
  end
146
146
 
147
147
  def hour
148
- flex_time ? 0 : formatted_time.hour
148
+ flex_time ? 0 : time.hour
149
149
  end
150
150
 
151
151
  def minute
152
- flex_time ? 0 : formatted_time.min
152
+ flex_time ? 0 : time.min
153
153
  end
154
154
 
155
155
  def month
156
- flex_time ? 0 : formatted_time.month
156
+ flex_time ? 0 : time.month
157
157
  end
158
158
 
159
159
  def day
160
- flex_time ? 0 : formatted_time.day
160
+ flex_time ? 0 : time.day
161
161
  end
162
162
 
163
163
  def formatted_name
@@ -169,15 +169,11 @@ class TimexDatalinkClient
169
169
  end
170
170
 
171
171
  def year_mod_1900
172
- flex_time ? 0 : formatted_time.year % 100
172
+ flex_time ? 0 : time.year % 100
173
173
  end
174
174
 
175
175
  def wday_from_monday
176
- flex_time ? 0 : (formatted_time.wday + 6) % 7
177
- end
178
-
179
- def formatted_time
180
- time.dst? ? time + 3600 : time
176
+ flex_time ? 0 : (time.wday + 6) % 7
181
177
  end
182
178
 
183
179
  def formatted_utc_offset
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class TimexDatalinkClient
4
- VERSION = "0.12.0"
4
+ VERSION = "0.12.2"
5
5
  end
@@ -86,11 +86,13 @@ class TimexDatalinkClient
86
86
  # @param serial_device [String, nil] Path to serial device.
87
87
  # @param models [Array<Protocol1::Sync, Protocol1::Start, Protocol1::Time, Protocol1::TimeName, Protocol1::Alarm,
88
88
  # Protocol1::Eeprom, Protocol1::End, Protocol3::Sync, Protocol3::Start, Protocol3::Time, Protocol3::Alarm,
89
- # Protocol3::Eeprom, Protocol3::SoundTheme, Protocol3::SoundOptions, Protocol3::WristApp, Protocol3::End,
90
- # Protocol4::Sync, Protocol4::Start, Protocol4::Time, Protocol4::Alarm, Protocol4::Eeprom, Protocol4::SoundTheme,
91
- # Protocol4::SoundOptions, Protocol4::WristApp, Protocol4::End, Protocol7::Sync, Protocol7::Start,
89
+ # Protocol3::SoundTheme, Protocol3::SoundOptions, Protocol3::WristApp, Protocol3::Eeprom, Protocol3::End,
90
+ # Protocol4::Sync, Protocol4::Start, Protocol4::Time, Protocol4::Alarm, Protocol4::SoundTheme,
91
+ # Protocol4::SoundOptions, Protocol4::WristApp, Protocol4::Eeprom, Protocol4::End, Protocol6::Sync,
92
+ # Protocol6::Start, Protocol6::Time, Protocol6::Alarm, Protocol6::PagerOptions, Protocol6::NightModeOptions,
93
+ # Protocol6::SoundScrollOptions, Protocol6::Eeprom, Protocol6::End, Protocol7::Sync, Protocol7::Start,
92
94
  # Protocol7::Eeprom, Protocol7::End, Protocol9::Sync, Protocol9::Start, Protocol9::Time, Protocol9::TimeName,
93
- # Protocol9::Timer, Protocol9::Alarm, Protocol9::Eeprom, Protocol9::SoundOptions, Protocol9::End>] Models to compile
95
+ # Protocol9::Alarm, Protocol9::Timer, Protocol9::SoundOptions, Protocol9::Eeprom, Protocol9::End>] Models to compile
94
96
  # data for.
95
97
  # @param byte_sleep [Integer, nil] Time to sleep after sending byte.
96
98
  # @param packet_sleep [Integer, nil] Time to sleep after sending packet of bytes.
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.0
4
+ version: 0.12.2
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-07-05 00:00:00.000000000 Z
11
+ date: 2023-07-27 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: rubyserial
56
+ name: serialport
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.6.0
61
+ version: 1.3.2
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: 0.6.0
68
+ version: 1.3.2
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.0
153
+ homepage: https://github.com/synthead/timex_datalink_client/tree/v0.12.2
154
154
  licenses:
155
155
  - MIT
156
156
  metadata: {}