maygion-ipcam 0.1.2 → 0.1.3

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 +5 -5
  2. metadata +1 -1
data/lib/maygion-ipcam.rb CHANGED
@@ -13,7 +13,7 @@ class MayGionIPCam
13
13
 
14
14
  o = {username: 'user', password: 'user', address: '192.168.1.14', port: 80, cookie: ''}.merge(opt)
15
15
  @addr, @port = o[:address], o[:port]
16
- @raw_url = "http://#{@addr}/cgi.cmd?cmd=moveptz&tick=100&user=user&pwd=user"
16
+ @raw_url = "http://#{@addr}/cgi.cmd?cmd=moveptz&user=user&pwd=user"
17
17
  @cookie = o[:cookie]
18
18
 
19
19
  if @cookie.empty? then
@@ -23,19 +23,19 @@ class MayGionIPCam
23
23
  end
24
24
 
25
25
  def left(i=1)
26
- move_camera '&dir=btnPtzLeft&nPtzTimes=' + i.to_s
26
+ move_camera "&dir=btnPtzLeft&tick=%s&nPtzTimes=%s" % [i, i * 100]
27
27
  end
28
28
 
29
29
  def right(i=1)
30
- move_camera '&dir=btnPtzRight&nPtzTimes=' + i.to_s
30
+ move_camera "&dir=btnPtzRight&tick=%s&nPtzTimes=%s" % [i, i * 100]
31
31
  end
32
32
 
33
33
  def up(i=1)
34
- move_camera '&dir=btnPtzUp&nPtzTimes=' + i.to_s
34
+ move_camera "&dir=btnPtzUp&tick=%s&nPtzTimes=%s" % [i, i * 100]
35
35
  end
36
36
 
37
37
  def down(i=1)
38
- move_camera '&dir=btnPtzDown&nPtzTimes=' + i.to_s
38
+ move_camera "&dir=btnPtzDown&tick=%s&nPtzTimes=%s" % [i, i * 100]
39
39
  end
40
40
 
41
41
  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.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors: []
7
7