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.
- data/lib/maygion-ipcam.rb +5 -5
- 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&
|
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
|
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
|
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
|
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
|
38
|
+
move_camera "&dir=btnPtzDown&tick=%s&nPtzTimes=%s" % [i, i * 100]
|
39
39
|
end
|
40
40
|
|
41
41
|
def login(username, password)
|