Skip to content

Commit

Permalink
Add more info to info_camera()
Browse files Browse the repository at this point in the history
  • Loading branch information
KonradIT committed Feb 19, 2017
1 parent 27bd84d commit 8f85e37
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ or
require 'goprocam'
```

###Imitialising:
###Initialising:

```ruby
gpCamera = Camera.new
Expand All @@ -61,6 +61,7 @@ gpCamera = Camera.new
| status(X,Y) | Returns the status. <br><ul><li>X = Status::Status or Status::Settings</li><li>Y = status id (Status/Setup/Video/Photo/MultiShot).</li><li>NOTE: This returns the status of the camera as an integer. To get the value in a human form use parse_value() </li></ul>|
| parse_value(option, param) | Parse the raw value of status and print a human value.<br><ul><li>option="mode","sub_mode","recording","battery","video_res","video_fr","rem_space"</li><li>param = Status ID</ul>
| overview() | Prints a human-readable overview |
| info_camera(option) | Returns camera information<br>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 |
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:**
Expand Down
Binary file removed goprocam-1.1.0.gem
Binary file not shown.
4 changes: 2 additions & 2 deletions goprocam.gemspec
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down
3 changes: 3 additions & 0 deletions lib/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions lib/goprocam.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f85e37

Please sign in to comment.