my_gpsd_client 0.02.05 → 0.02.09
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/my_gpsd_client/version.rb +1 -1
- data/lib/my_gpsd_client.rb +10 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e66ae7bf6bd09eb05e520be8164ec0ae3de1355bd9a669ccbdb0061b82c48355
|
4
|
+
data.tar.gz: e4ce179d38060c3d95de7ff94eb35330d088084d4e7437d6ba105e8c48f575e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73fade347bd2b2529ae12180db62c2a3f5e723a9f2027fec72da6afef75e7379152e28a97a8fa8bf55b15e45e877ca81e12a2a3e3374638b174573a29dd78fa9
|
7
|
+
data.tar.gz: 247bb6e59725d2047e2664783fc420a2591427229012d8230dcd3a2dc8812e043dc81e2128a0eb70a5f874ee1e8de6662ffa4eb47ce4f9524d3579505395b2ee
|
data/lib/my_gpsd_client.rb
CHANGED
@@ -5,7 +5,7 @@ require 'date'
|
|
5
5
|
require 'logger'
|
6
6
|
|
7
7
|
class MyGpsdClient
|
8
|
-
attr_accessor :host, :port, :command, :min_speed, :watchdog_max, :watchdog_force, :watchdog_euthanized
|
8
|
+
attr_accessor :host, :port, :command, :min_speed, :watchdog_max, :watchdog_force, :watchdog_euthanized,
|
9
9
|
:log_progname, :log_level, :log_path, :log_format, :log_time_format
|
10
10
|
attr_reader :version, :last_watch, :socket_ready, :socket, :msg_counts, :watchdog_fired_count,
|
11
11
|
:readthread, :socket_init_thread, :watchdogthread, :watchdog_count
|
@@ -160,11 +160,16 @@ class MyGpsdClient
|
|
160
160
|
else
|
161
161
|
# it's ready, tell it to start watching and passing
|
162
162
|
my_logger msg: "Send_cmmd: socket ready, send cmmd"
|
163
|
-
|
163
|
+
if @command.size > 1
|
164
|
+
str = "?#{@command[:class].upcase}=#{@command.to_json}"
|
165
|
+
else
|
166
|
+
str = "?#{@command[:class].upcase};"
|
167
|
+
end
|
164
168
|
my_logger level: 'info', msg: "Send_cmmd: sending: #{str}"
|
165
169
|
@sent_raw_callback.call( str) if @sent_raw_callback
|
166
170
|
@socket.puts str
|
167
171
|
# If Enable was false in the last WATCH command, close the connecction
|
172
|
+
my_logger msg: "@last_watch.key?(:enable) #{@last_watch.key?(:enable)}, @last_watch[:enable] #{@last_watch[:enable]}"
|
168
173
|
stop if @last_watch.key?(:enable) && !@last_watch[:enable]
|
169
174
|
end
|
170
175
|
my_logger msg: "Send_cmmd: Exiting send_cmmd"
|
@@ -271,9 +276,12 @@ class MyGpsdClient
|
|
271
276
|
my_logger msg: "Entered Init_socket"
|
272
277
|
begin
|
273
278
|
close_socket if @socket && !@socket.closed?
|
279
|
+
mu_logger level: 'debug', msg: "Point 1: socket is closed?: #{@socket.closed?} "
|
274
280
|
|
275
281
|
# Send the 'Hello' message (Content apparently irrelevant)
|
276
282
|
@socket = TCPSocket.new(@host, @port)
|
283
|
+
mu_logger level: 'debug', msg: "Point 2: socket is open?: #{!@socket.closed?} "
|
284
|
+
|
277
285
|
msg="This space for rent"
|
278
286
|
my_logger level: 'info', msg: "Init_socket: Sending Cmmd: \"#{msg}\""
|
279
287
|
@socket.puts(msg)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: my_gpsd_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.02.
|
4
|
+
version: 0.02.09
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Finnegan
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
-
description:
|
41
|
+
description:
|
42
42
|
email:
|
43
43
|
- steven@rustyshamrock.com
|
44
44
|
executables: []
|
@@ -63,7 +63,7 @@ metadata:
|
|
63
63
|
allowed_push_host: https://rubygems.org
|
64
64
|
homepage_uri: https://github.com/sjf-control/my_gpsd_client
|
65
65
|
source_code_uri: https://github.com/sjf-control/my_gpsd_client
|
66
|
-
post_install_message:
|
66
|
+
post_install_message:
|
67
67
|
rdoc_options: []
|
68
68
|
require_paths:
|
69
69
|
- lib
|
@@ -78,8 +78,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '0'
|
80
80
|
requirements: []
|
81
|
-
rubygems_version: 3.
|
82
|
-
signing_key:
|
81
|
+
rubygems_version: 3.2.22
|
82
|
+
signing_key:
|
83
83
|
specification_version: 4
|
84
84
|
summary: My version of gpsd2json gem
|
85
85
|
test_files: []
|