From 8f85e379dfdecdd7ed0eb2d2315ae8f08c086211 Mon Sep 17 00:00:00 2001 From: konradit Date: Sun, 19 Feb 2017 17:47:05 +0100 Subject: [PATCH] Add more info to info_camera() --- README.md | 7 ++++--- goprocam-1.1.0.gem | Bin 8192 -> 0 bytes goprocam.gemspec | 4 ++-- lib/constants.rb | 3 +++ lib/goprocam.rb | 2 ++ 5 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 goprocam-1.1.0.gem diff --git a/README.md b/README.md index ea0475d..b24149d 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ or require 'goprocam' ``` -###Imitialising: +###Initialising: ```ruby gpCamera = Camera.new @@ -61,6 +61,7 @@ gpCamera = Camera.new | status(X,Y) | Returns the status.
| | parse_value(option, param) | Parse the raw value of status and print a human value.
| overview() | Prints a human-readable overview | +| info_camera(option) | Returns camera information
option = Name/Number/Firmware/SSID/MacAddress/SerialNumber | delete() | Can be: delete(last) or delete(all) | | delete_file(folder,file) | Deletes a specific file | | hilight() | HiLights a moment in the video recording | @@ -90,7 +91,7 @@ gpCamera = Camera.new gpCamera = Camera.new puts gpCamera.status(Status::Status, Status::STATUS::Mode) #returns current mode >0 - puts gpCamera.status(Status::Status, Status::STATUS::isRecording) #returns recording status + puts gpCamera.status(Status::Status, Status::STATUS::IsRecording) #returns recording status >1 puts gpCamera.status(Status::Settings, Video::FRAME_RATE) #returns frame rate >3 @@ -140,7 +141,7 @@ gpCamera = Camera.new ```ruby gpCamera = Camera.new gpCamera.shutter(Shutter::ON) #takes a picture or starts a video - gpCamera.shutter(Shutter:OFF) #stops a video or timelapse + gpCamera.shutter(Shutter::OFF) #stops a video or timelapse ``` - **Change Modes:** diff --git a/goprocam-1.1.0.gem b/goprocam-1.1.0.gem deleted file mode 100644 index f166b8a70b373288107e8f6f16f1a3dd063485c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8192 zcmeHLWl$W*wjSIjSuD6a!8O24AOv?vkTAgp7=pV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|7!&P3#-q7+W-In diff --git a/goprocam.gemspec b/goprocam.gemspec index 4cab479..bf3b10b 100644 --- a/goprocam.gemspec +++ b/goprocam.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.name = 'goprocam' - s.version = '1.1.0' - s.date = '2017-02-18' + s.version = '1.1.1' + s.date = '2017-02-19' s.summary = "Interface for your WiFi GoPro camera." s.description = "Control and view status from your GoPro HERO4/HERO5 camera via WiFi." s.authors = ["Konrad Iturbe"] diff --git a/lib/constants.rb b/lib/constants.rb index 7dbaa8d..1401ed4 100644 --- a/lib/constants.rb +++ b/lib/constants.rb @@ -31,6 +31,9 @@ class Camera Name="model_name" Number="model_number" Firmware="firmware_version" + SSID="ap_ssid" + MacAddress="ap_mac" + SerialNumber="serial_number" end class Mode VideoMode = "0" diff --git a/lib/goprocam.rb b/lib/goprocam.rb index 7ba1e2e..fc1d8da 100644 --- a/lib/goprocam.rb +++ b/lib/goprocam.rb @@ -167,7 +167,9 @@ def overview() puts "Is Recording:", " " + parse_value("recording",status(Status::Status, Status::STATUS::IsRecording)) puts "Clients connected: ", " " + status(Status::Status, Status::STATUS::IsConnected).to_s puts "camera model: ", " " + info_camera(Camera::Name) + puts "camera ssid name: ", " " + info_camera(Camera::SSID) puts "firmware version: ", " " + info_camera(Camera::Firmware) + puts "serial number: ", " " + info_camera(Camera::SerialNumber) end def shutter(value) response = open(GOPROCONTROL + 'command/shutter?p=' + value).read