turtleshell 1.0.7 → 1.0.8

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
- SHA1:
3
- metadata.gz: eb5dc6ce3ad0ddb16c72026c295a72640f360a83
4
- data.tar.gz: 405f2ef9cccaf7630b4e3f83eea7b274b500f093
2
+ SHA256:
3
+ metadata.gz: 6ac8ed6b4ec4c0ad69fb05b3abe27b4c59f7845f325145bc7fd79adc46d48038
4
+ data.tar.gz: e0847f53c9c4c8ad748f3a600e62549825a429269a0e2aaba02cc12a41972281
5
5
  SHA512:
6
- metadata.gz: c3fc4a7d00175527c3871df711600a7e78ccf1cc9baa09c437cc5aad5672003fc65b547ae0c5e2cb7dee32a77779cb0254594e3551ff4f53fa8aac92dff19fa7
7
- data.tar.gz: 84e8c8563f2df9041ccfa56cd155924b813f0676bbde4ec095093a7e1de32e2399bad996a5fc7a7a1a44ac557ecc52dd98a24fdd94aa59c7bb6b142cd1b47c8f
6
+ metadata.gz: 90ea3606d39714081fcc3f56b0e704770d2e85023971c91e48682cdb154b5eee0f52e3ccb892e4154ffdff795b604c2d187cd70c71ee2c316b789aa145e26db0
7
+ data.tar.gz: 74b4bcf8e4b5880bcda074007a0c3e10ab19e2a8d721f7673db6fd98ed3f540b804de980a8789e7bec4158e74d83be98a98fd36bf2cc5cafb7c6a1200dff6475
@@ -244,6 +244,22 @@ static VALUE turtleshell_set_manual_gain(VALUE self, VALUE wrapped_device, VALUE
244
244
  return INT2NUM(result);
245
245
  }
246
246
 
247
+ static VALUE turtleshell_get_freq_correction(VALUE self, VALUE wrapped_device) {
248
+ rtlsdr_dev_t *device;
249
+ Data_Get_Struct(wrapped_device, rtlsdr_dev_t, device);
250
+ return INT2NUM(rtlsdr_get_freq_correction(device));
251
+ }
252
+
253
+ static VALUE turtleshell_set_freq_correction(VALUE self, VALUE wrapped_device, VALUE v) {
254
+ rtlsdr_dev_t *device;
255
+ Data_Get_Struct(wrapped_device, rtlsdr_dev_t, device);
256
+ if (rtlsdr_set_freq_correction(device, NUM2INT(v))) {
257
+ rb_raise(rb_eRuntimeError, "couldn't set PPM");
258
+ }
259
+
260
+ return v;
261
+ }
262
+
247
263
  void Init_librtlsdr() {
248
264
  VALUE tuner_hash;
249
265
  m_turtleshell = rb_define_module("TurtleShell");
@@ -273,6 +289,8 @@ void Init_librtlsdr() {
273
289
  rb_define_module_function(m_rtlsdr, "get_tuner_gains", turtleshell_get_gains, 1);
274
290
  rb_define_module_function(m_rtlsdr, "get_tuner_type", turtleshell_get_tuner_type, 1);
275
291
  rb_define_module_function(m_rtlsdr, "set_manual_gain", turtleshell_set_manual_gain, 2);
292
+ rb_define_module_function(m_rtlsdr, "get_freq_correction", turtleshell_get_freq_correction, 1);
293
+ rb_define_module_function(m_rtlsdr, "set_freq_correction", turtleshell_set_freq_correction, 2);
276
294
 
277
295
  tuner_hash = rb_hash_new();
278
296
  rb_hash_aset(tuner_hash, RTLSDR_TUNER_UNKNOWN, ID2SYM(rb_intern("unknown")));
@@ -24,6 +24,14 @@ module TurtleShell
24
24
  new(index)
25
25
  end
26
26
 
27
+ def freq_correction
28
+ TurtleShell::RTLSDR.get_freq_correction(@device)
29
+ end
30
+
31
+ def freq_correction=(v)
32
+ TurtleShell::RTLSDR.set_freq_correction(@device, v)
33
+ end
34
+
27
35
  def sample_rate
28
36
  TurtleShell::RTLSDR.get_sample_rate(@device)
29
37
  end
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'turtleshell'
3
- s.version = '1.0.7'
4
- s.date = '2013-11-05'
3
+ s.version = '1.0.8'
4
+ s.date = '2021-01-05'
5
5
  s.summary = 'A ruby wrapper for librtlsdr'
6
6
  s.description = 'ruby bindings for librtlsdr -- realtek USB software defined radio devices'
7
7
  s.authors = ['Tim Jarratt']
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
13
13
 
14
14
  s.extensions = ['ext/librtlsdr/extconf.rb']
15
15
 
16
- s.add_dependency 'rake', '~> 10.1'
17
- s.add_dependency 'rake-compiler', '~> 0.9'
16
+ s.add_dependency 'rake', '~> 13.0'
17
+ s.add_dependency 'rake-compiler', '~> 1.1'
18
18
  s.add_development_dependency 'rspec', '~> 2.14'
19
19
 
20
20
  ignores = File.readlines('.gitignore').grep(/\S+/).map(&:chomp)
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turtleshell
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Jarratt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-05 00:00:00.000000000 Z
11
+ date: 2021-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '10.1'
19
+ version: '13.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '10.1'
26
+ version: '13.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake-compiler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.9'
33
+ version: '1.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.9'
40
+ version: '1.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '2.14'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.14'
55
55
  description: ruby bindings for librtlsdr -- realtek USB software defined radio devices
@@ -59,7 +59,7 @@ extensions:
59
59
  - ext/librtlsdr/extconf.rb
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - .gitignore
62
+ - ".gitignore"
63
63
  - CHANGELOG.md
64
64
  - Gemfile
65
65
  - LICENSE
@@ -74,8 +74,8 @@ files:
74
74
  - lib/turtleshell/device.rb
75
75
  - spec/device_spec.rb
76
76
  - spec/turtleshell_spec.rb
77
- - tmp/x86_64-darwin13.0.0/librtlsdr/2.0.0/Makefile
78
- - tmp/x86_64-darwin13.0.0/librtlsdr/2.0.0/mkmf.log
77
+ - tmp/x86_64-darwin19/librtlsdr/2.6.3/Makefile
78
+ - tmp/x86_64-darwin19/librtlsdr/2.6.3/mkmf.log
79
79
  - turtleshell.gemspec
80
80
  homepage: http://github.com/tjarratt/turtleshell
81
81
  licenses:
@@ -87,17 +87,16 @@ require_paths:
87
87
  - lib
88
88
  required_ruby_version: !ruby/object:Gem::Requirement
89
89
  requirements:
90
- - - '>='
90
+ - - ">="
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - '>='
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  requirements: []
99
- rubyforge_project:
100
- rubygems_version: 2.1.11
99
+ rubygems_version: 3.0.3
101
100
  signing_key:
102
101
  specification_version: 4
103
102
  summary: A ruby wrapper for librtlsdr