timex_datalink_caldav 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +12 -12
- data/README.md +1 -1
- data/lib/timex_datalink_caldav/client.rb +31 -4
- data/lib/timex_datalink_caldav/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d5a3f969562134331aad6dca68c643933c28fb0ff54b69b311d3a6869ffafda
|
4
|
+
data.tar.gz: 20540f73bc0cc75843b1a5a7b4dd677dcd5e90597b8bdf4d570faa6b2cc46dc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 146d615f4942b1bba8aabe4892c8764c78215e82a89006ae6ffe093f8d3d0622c8f1f2ec2e86344989374e9d8596dd7407b8ea5eece171f9a023ff2d5b48fc38
|
7
|
+
data.tar.gz: 64f141143666c103795713065ce8b663805474c5af44cdccc14bfffffd8b6e3619628ca5dc541e4061805e5646659d22078553a7fc79f5af62538f67237ef7cc
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
timex_datalink_caldav (1.
|
4
|
+
timex_datalink_caldav (1.1.2)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
activemodel (7.0.
|
10
|
-
activesupport (= 7.0.
|
11
|
-
activesupport (7.0.
|
9
|
+
activemodel (7.0.6)
|
10
|
+
activesupport (= 7.0.6)
|
11
|
+
activesupport (7.0.6)
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
13
|
i18n (>= 1.6, < 2)
|
14
14
|
minitest (>= 5.1)
|
@@ -39,7 +39,7 @@ GEM
|
|
39
39
|
domain_name (~> 0.5)
|
40
40
|
http-form_data (2.3.0)
|
41
41
|
humanize (2.5.1)
|
42
|
-
i18n (1.
|
42
|
+
i18n (1.14.1)
|
43
43
|
concurrent-ruby (~> 1.0)
|
44
44
|
icalendar (2.8.0)
|
45
45
|
ice_cube (~> 0.16)
|
@@ -51,11 +51,11 @@ GEM
|
|
51
51
|
ffi-compiler (~> 1.0)
|
52
52
|
rake (~> 13.0)
|
53
53
|
mdb (0.5.0)
|
54
|
-
minitest (5.18.
|
55
|
-
nokogiri (1.
|
54
|
+
minitest (5.18.1)
|
55
|
+
nokogiri (1.15.3-arm64-darwin)
|
56
56
|
racc (~> 1.4)
|
57
|
-
public_suffix (5.0.
|
58
|
-
racc (1.
|
57
|
+
public_suffix (5.0.3)
|
58
|
+
racc (1.7.1)
|
59
59
|
rake (13.0.6)
|
60
60
|
rspec (3.12.0)
|
61
61
|
rspec-core (~> 3.12.0)
|
@@ -69,12 +69,12 @@ GEM
|
|
69
69
|
rspec-mocks (3.12.5)
|
70
70
|
diff-lcs (>= 1.2.0, < 2.0)
|
71
71
|
rspec-support (~> 3.12.0)
|
72
|
-
rspec-support (3.12.
|
72
|
+
rspec-support (3.12.1)
|
73
73
|
ruby-progressbar (1.13.0)
|
74
74
|
rubyserial (0.6.0)
|
75
75
|
ffi (~> 1.9, >= 1.9.3)
|
76
76
|
text (1.3.1)
|
77
|
-
timex_datalink_client (0.
|
77
|
+
timex_datalink_client (0.12.1)
|
78
78
|
activemodel (~> 7.0.4)
|
79
79
|
crc (~> 0.4.2)
|
80
80
|
mdb (~> 0.5.0)
|
@@ -101,7 +101,7 @@ DEPENDENCIES
|
|
101
101
|
ruby-progressbar (~> 1.13)
|
102
102
|
text (~> 1.3)
|
103
103
|
timex_datalink_caldav!
|
104
|
-
timex_datalink_client (~> 0.
|
104
|
+
timex_datalink_client (~> 0.12.1)
|
105
105
|
tzinfo (~> 2.0)
|
106
106
|
yaml (~> 0.2.1)
|
107
107
|
|
data/README.md
CHANGED
@@ -72,7 +72,7 @@ endpoints:
|
|
72
72
|
|
73
73
|
The device is a serial device that flashes an led when it receives data. On Linux, this is usually `/dev/tty*`. On macOS, this is usually `$(ls /dev/tty.usbmodem* | head -n 1)`. On Windows, this is usually `COM1`.
|
74
74
|
|
75
|
-
If you want to use this, I highly recommend pairing it with the Raspberry Pi Pico and [this project](https://github.com/famiclone6502/DIY_Datalink_Adapter). It is the cheapest and easiest way to get a serial device that works with the Timex Datalink watch.
|
75
|
+
If you want to use this, I highly recommend pairing it with the Raspberry Pi Pico and [this project](https://github.com/famiclone6502/DIY_Datalink_Adapter) or [this one](https://github.com/synthead/timex-datalink-arduino). It is the cheapest and easiest way to get a serial device that works with the Timex Datalink watch.
|
76
76
|
|
77
77
|
## Notes
|
78
78
|
|
@@ -20,7 +20,9 @@ module TimexDatalinkCaldav
|
|
20
20
|
when 1 then TimexDatalinkClient::Protocol1
|
21
21
|
when 3 then TimexDatalinkClient::Protocol3
|
22
22
|
when 4 then TimexDatalinkClient::Protocol4
|
23
|
+
when 6 then TimexDatalinkClient::Protocol6
|
23
24
|
when 7 then TimexDatalinkClient::Protocol7
|
25
|
+
when 9 then TimexDatalinkClient::Protocol9
|
24
26
|
else
|
25
27
|
raise ArgumentError, "Invalid protocol version: #{@protocol_version}"
|
26
28
|
end
|
@@ -176,7 +178,7 @@ module TimexDatalinkCaldav
|
|
176
178
|
time1 = Time.now + 3
|
177
179
|
time2 = time1.dup.utc
|
178
180
|
|
179
|
-
if @protocol_version == 1
|
181
|
+
if @protocol_version == 1 or @protocol_version == 9
|
180
182
|
time_model = @protocol_class::Time.new(
|
181
183
|
zone: 1,
|
182
184
|
time: time1,
|
@@ -212,15 +214,40 @@ module TimexDatalinkCaldav
|
|
212
214
|
)
|
213
215
|
time_name_model = nil # Not needed for protocol version 3 and 4
|
214
216
|
utc_time_name_model = nil # Not needed for protocol version 3 and 4
|
215
|
-
|
217
|
+
elsif @protocol_version == 6
|
218
|
+
time_model = @protocol_class::Time.new(
|
219
|
+
zone: 1,
|
220
|
+
time: time1,
|
221
|
+
is_24h: false,
|
222
|
+
date_format: "%_m-%d-%y"
|
223
|
+
)
|
224
|
+
utc_time_model = @protocol_class::Time.new(
|
225
|
+
zone: 2,
|
226
|
+
flex_time: true,
|
227
|
+
flex_time_zone: true,
|
228
|
+
is_24h: true,
|
229
|
+
date_format: "%_m-%d-%y"
|
230
|
+
)
|
231
|
+
time_name_model = nil # Not needed for protocol version 6
|
232
|
+
utc_time_name_model = nil # Not needed for protocol version 6
|
216
233
|
else
|
217
234
|
time_model = nil
|
218
235
|
utc_time_model = nil
|
219
236
|
time_name_model = nil
|
220
237
|
utc_time_name_model = nil
|
221
238
|
end
|
222
|
-
|
223
|
-
if @protocol_version ==
|
239
|
+
|
240
|
+
if @protocol_version == 6 or @protocol_version == 9
|
241
|
+
models = [
|
242
|
+
@protocol_class::Sync.new,
|
243
|
+
@protocol_class::Start.new,
|
244
|
+
time_model,
|
245
|
+
time_name_model,
|
246
|
+
utc_time_model,
|
247
|
+
utc_time_name_model,
|
248
|
+
@protocol_class::End.new
|
249
|
+
].compact
|
250
|
+
elsif @protocol_version == 7
|
224
251
|
calendar = @protocol_class::Eeprom::Calendar.new(
|
225
252
|
time: time1,
|
226
253
|
events: appointments
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timex_datalink_caldav
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Willy Hardy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 'Adds a CLI and a feature to pull your next day of calendar events into
|
14
14
|
the Timex Datalink watch. Note: Hardcoded protocol1 and EST timezone. At the moment.'
|