maygion-ipcam 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/maygion-ipcam.rb +6 -5
  2. metadata +1 -1
data/lib/maygion-ipcam.rb CHANGED
@@ -8,7 +8,8 @@ require 'open-uri'
8
8
  class MayGionIPCam
9
9
 
10
10
  attr_reader :resp, :cookie
11
-
11
+ Factor = 500
12
+
12
13
  def initialize(opt)
13
14
 
14
15
  o = {username: 'user', password: 'user', address: '192.168.1.14', port: 80, cookie: ''}.merge(opt)
@@ -23,19 +24,19 @@ class MayGionIPCam
23
24
  end
24
25
 
25
26
  def left(i=1)
26
- move_camera "&dir=btnPtzLeft&tick=%s&nPtzTimes=%s" % [i * 100, i]
27
+ move_camera "&dir=btnPtzLeft&tick=%s&nPtzTimes=1" % [i * Factor]
27
28
  end
28
29
 
29
30
  def right(i=1)
30
- move_camera "&dir=btnPtzRight&tick=%s&nPtzTimes=%s" % [i * 100, i]
31
+ move_camera "&dir=btnPtzRight&tick=%s&nPtzTimes=1" % [i * Factor]
31
32
  end
32
33
 
33
34
  def up(i=1)
34
- move_camera "&dir=btnPtzUp&tick=%s&nPtzTimes=%s" % [i * 100, i]
35
+ move_camera "&dir=btnPtzUp&tick=%s&nPtzTimes=1" % [i * Factor]
35
36
  end
36
37
 
37
38
  def down(i=1)
38
- move_camera "&dir=btnPtzDown&tick=%s&nPtzTimes=%s" % [i * 100, i]
39
+ move_camera "&dir=btnPtzDown&tick=%s&nPtzTimes=1" % [i * Factor]
39
40
  end
40
41
 
41
42
  def login(username, password)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maygion-ipcam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors: []
7
7